Package org.eclipse.jgit.revwalk

Examples of org.eclipse.jgit.revwalk.RevFlagSet


    PEER_HAS = walk.newFlag("PEER_HAS");
    COMMON = walk.newFlag("COMMON");
    SATISFIED = walk.newFlag("SATISFIED");
    walk.carry(PEER_HAS);

    SAVE = new RevFlagSet();
    SAVE.add(WANT);
    SAVE.add(PEER_HAS);
    refFilter = RefFilter.DEFAULT;
  }
View Full Code Here


    final Map<ObjectId, CachedPack> tipToPack = new HashMap<ObjectId, CachedPack>();
    final ObjectWalk walker = new ObjectWalk(reader);
    final RevFlag inCachedPack = walker.newFlag("inCachedPack");
    final RevFlag include = walker.newFlag("include");

    final RevFlagSet keepOnRestart = new RevFlagSet();
    keepOnRestart.add(inCachedPack);

    walker.setRetainBody(false);
    walker.carry(include);

    int haveEst = have.size();
View Full Code Here

    PEER_HAS = walk.newFlag("PEER_HAS");
    COMMON = walk.newFlag("COMMON");
    SATISFIED = walk.newFlag("SATISFIED");
    walk.carry(PEER_HAS);

    SAVE = new RevFlagSet();
    SAVE.add(WANT);
    SAVE.add(PEER_HAS);
    SAVE.add(COMMON);
    SAVE.add(SATISFIED);
    refFilter = RefFilter.DEFAULT;
View Full Code Here

    PEER_HAS = walk.newFlag("PEER_HAS"); //$NON-NLS-1$
    COMMON = walk.newFlag("COMMON"); //$NON-NLS-1$
    SATISFIED = walk.newFlag("SATISFIED"); //$NON-NLS-1$
    walk.carry(PEER_HAS);

    SAVE = new RevFlagSet();
    SAVE.add(WANT);
    SAVE.add(PEER_HAS);
    SAVE.add(COMMON);
    SAVE.add(SATISFIED);
View Full Code Here

          key = r.getObjectId();
        tags.put(key, r);
      }

      // combined flags of all the candidate instances
      final RevFlagSet allFlags = new RevFlagSet();

      /**
       * Tracks the depth of each tag as we find them.
       */
      class Candidate {
        final Ref tag;
        final RevFlag flag;

        /**
         * This field counts number of commits that are reachable from
         * the tip but not reachable from the tag.
         */
        int depth;

        Candidate(RevCommit commit, Ref tag) {
          this.tag = tag;
          this.flag = w.newFlag(tag.getName());
          // we'll mark all the nodes reachable from this tag accordingly
          allFlags.add(flag);
          w.carry(flag);
          commit.add(flag);
          // As of this writing, JGit carries a flag from a child to its parents
          // right before RevWalk.next() returns, so all the flags that are added
          // must be manually carried to its parents. If that gets fixed,
View Full Code Here

   * @param a
   *            the flag to test.
   * @return filter that selects only commits with flag <code>a</code>.
   */
  public static RevFilter has(final RevFlag a) {
    final RevFlagSet s = new RevFlagSet();
    s.add(a);
    return new HasAll(s);
  }
View Full Code Here

   * @param a
   *            set of flags to test.
   * @return filter that selects only commits with all flags in <code>a</code>.
   */
  public static RevFilter hasAll(final RevFlag... a) {
    final RevFlagSet set = new RevFlagSet();
    for (final RevFlag flag : a)
      set.add(flag);
    return new HasAll(set);
  }
View Full Code Here

   * @param a
   *            set of flags to test.
   * @return filter that selects only commits with all flags in <code>a</code>.
   */
  public static RevFilter hasAll(final RevFlagSet a) {
    return new HasAll(new RevFlagSet(a));
  }
View Full Code Here

   * @param a
   *            set of flags to test.
   * @return filter that selects only commits with any flag in <code>a</code>.
   */
  public static RevFilter hasAny(final RevFlag... a) {
    final RevFlagSet set = new RevFlagSet();
    for (final RevFlag flag : a)
      set.add(flag);
    return new HasAny(set);
  }
View Full Code Here

   * @param a
   *            set of flags to test.
   * @return filter that selects only commits with any flag in <code>a</code>.
   */
  public static RevFilter hasAny(final RevFlagSet a) {
    return new HasAny(new RevFlagSet(a));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.revwalk.RevFlagSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.