BlockRevQueue(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { free = new BlockFreeList(); outputType = s.outputType(); s.shareFreeList(this); for (;;) { final RevCommit c = s.next(); if (c == null) break; add(c); } }
@Override RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { return g.next(); }
@Override int outputType() { return pending.outputType(); }
this.DEEPEN_NOT = w.getDeepenNotFlag(); s.shareFreeList(pending); RevCommit c = s.next(); if (c == null) break;
if ((g.outputType() & NEEDS_REWRITE) != 0) { && (g.outputType() & SORT_TOPO) == 0) g = new TopoSortGenerator(g); if (walker.hasRevSort(RevSort.REVERSE)) return g.next();
@Override void shareFreeList(BlockRevQueue q) { source.shareFreeList(q); }
@Override RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { for (;;) { final RevCommit c = pending.next(); if (c == null) return null; if ((c.flags & RevWalk.UNINTERESTING) == 0) return c; } } }
@Override int outputType() { return source.outputType() & ~NEEDS_REWRITE; }
/** * @param w * @param s Parent generator * @throws MissingObjectException * @throws IncorrectObjectTypeException * @throws IOException */ DepthGenerator(DepthWalk w, Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { pending = new FIFORevQueue(); walk = (RevWalk)w; this.depth = w.getDepth(); this.UNSHALLOW = w.getUnshallowFlag(); this.REINTERESTING = w.getReinterestingFlag(); s.shareFreeList(pending); // Begin by sucking out all of the source's commits, and // adding them to the pending queue for (;;) { RevCommit c = s.next(); if (c == null) break; if (((DepthWalk.Commit) c).getDepth() == 0) pending.add(c); } }
if ((g.outputType() & NEEDS_REWRITE) != 0) { && (g.outputType() & SORT_TOPO) == 0) g = new TopoSortGenerator(g); if (walker.hasRevSort(RevSort.REVERSE)) return g.next();
@Override void shareFreeList(BlockRevQueue q) { g.shareFreeList(q); }
/** * Create a new sorter and completely spin the generator. * <p> * When the constructor completes the supplied generator will have no * commits remaining, as all of the commits will be held inside of this * generator's internal buffer. * * @param s * generator to pull all commits out of, and into this buffer. * @throws MissingObjectException * @throws IncorrectObjectTypeException * @throws IOException */ TopoSortGenerator(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { pending = new FIFORevQueue(); outputType = s.outputType() | SORT_TOPO; s.shareFreeList(pending); for (;;) { final RevCommit c = s.next(); if (c == null) break; for (RevCommit p : c.parents) p.inDegree++; pending.add(c); } }
/** * Pop the next most recent commit. * * @return next most recent commit; null if traversal is over. * @throws org.eclipse.jgit.errors.MissingObjectException * one or or more of the next commit's parents are not available * from the object database, but were thought to be candidates * for traversal. This usually indicates a broken link. * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * one or or more of the next commit's parents are not actually * commit objects. * @throws java.io.IOException * a pack file or loose object could not be read. */ public RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { return pending.next(); }
@Override int outputType() { return pending.outputType(); }
/** * @param w * @param s Parent generator * @throws MissingObjectException * @throws IncorrectObjectTypeException * @throws IOException */ DepthGenerator(DepthWalk w, Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { pending = new FIFORevQueue(); walk = (RevWalk)w; this.depth = w.getDepth(); this.UNSHALLOW = w.getUnshallowFlag(); this.REINTERESTING = w.getReinterestingFlag(); s.shareFreeList(pending); // Begin by sucking out all of the source's commits, and // adding them to the pending queue for (;;) { RevCommit c = s.next(); if (c == null) break; if (((DepthWalk.Commit) c).getDepth() == 0) pending.add(c); } }
if ((g.outputType() & NEEDS_REWRITE) != 0) { && (g.outputType() & SORT_TOPO) == 0) g = new TopoSortGenerator(g); if (walker.hasRevSort(RevSort.REVERSE)) return g.next();
InitialGenerator(RevWalk w, Generator s) { walk = w; held = new FIFORevQueue(); source = s; source.shareFreeList(held); }
BlockRevQueue(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { free = new BlockFreeList(); outputType = s.outputType(); s.shareFreeList(this); for (;;) { final RevCommit c = s.next(); if (c == null) break; add(c); } }
DateRevQueue(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { for (;;) { final RevCommit c = s.next(); if (c == null) break; add(c); } }
@Override int outputType() { return source.outputType(); }