Exemplo n.º 1
0
 public BlockRevQueue(Generator s)
 {
     free = new BlockFreeList();
     _outputType = s.outputType();
     s.shareFreeList(this);
     for (; ; )
     {
         RevCommit c = s.next();
         if (c == null)
             break;
         add(c);
     }
 }
Exemplo n.º 2
0
 /**
  * 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
  * @
  */
 public TopoSortGenerator(Generator s)
 {
     pending = new FIFORevQueue();
     _outputType = s.outputType() | SORT_TOPO;
     s.shareFreeList(pending);
     for (; ; )
     {
         RevCommit c = s.next();
         if (c == null)
             break;
         foreach (RevCommit p in c.parents)
             p.inDegree++;
         pending.add(c);
     }
 }