Example #1
0
 /// <exception cref="NGit.Errors.MissingObjectException"></exception>
 /// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception>
 /// <exception cref="System.IO.IOException"></exception>
 internal BlockRevQueue(Generator s)
 {
     free = new BlockRevQueue.BlockFreeList();
     outputType = s.OutputType();
     s.ShareFreeList(this);
     for (; ; )
     {
         RevCommit c = s.Next();
         if (c == null)
         {
             break;
         }
         Add(c);
     }
 }
 /// <exception cref="NGit.Errors.MissingObjectException"></exception>
 /// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception>
 /// <exception cref="System.IO.IOException"></exception>
 internal BlockRevQueue(Generator s)
 {
     free       = new BlockRevQueue.BlockFreeList();
     outputType = s.OutputType();
     s.ShareFreeList(this);
     for (; ;)
     {
         RevCommit c = s.Next();
         if (c == null)
         {
             break;
         }
         Add(c);
     }
 }
Example #3
0
 /// <summary>Create a new sorter and completely spin the generator.</summary>
 /// <remarks>
 /// 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.
 /// </remarks>
 /// <param name="s">generator to pull all commits out of, and into this buffer.</param>
 /// <exception cref="NGit.Errors.MissingObjectException">NGit.Errors.MissingObjectException
 ///     </exception>
 /// <exception cref="NGit.Errors.IncorrectObjectTypeException">NGit.Errors.IncorrectObjectTypeException
 ///     </exception>
 /// <exception cref="System.IO.IOException">System.IO.IOException</exception>
 internal 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);
     }
 }
Example #4
0
 /// <summary>Create a new sorter and completely spin the generator.</summary>
 /// <remarks>
 /// 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.
 /// </remarks>
 /// <param name="s">generator to pull all commits out of, and into this buffer.</param>
 /// <exception cref="NGit.Errors.MissingObjectException">NGit.Errors.MissingObjectException
 /// 	</exception>
 /// <exception cref="NGit.Errors.IncorrectObjectTypeException">NGit.Errors.IncorrectObjectTypeException
 /// 	</exception>
 /// <exception cref="System.IO.IOException">System.IO.IOException</exception>
 internal 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);
     }
 }
 internal override int OutputType()
 {
     return(pending.OutputType());
 }
Example #6
0
 internal override int OutputType()
 {
     return(source.OutputType() & ~NEEDS_REWRITE);
 }