/// <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); } }
/// <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); } }
/// <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); } }
/// <param name="w"></param> /// <param name="s">Parent generator</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 DepthGenerator(DepthWalk w, Generator s) { 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 (((NGit.Revwalk.Depthwalk.Commit)c).GetDepth() == 0) { pending.Add(c); } } }
/// <param name="w"></param> /// <param name="s">Parent generator</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 DepthGenerator(DepthWalk w, Generator s) { 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 (((NGit.Revwalk.Depthwalk.Commit)c).GetDepth() == 0) { pending.Add(c); } } }
internal override void ShareFreeList(BlockRevQueue q) { source.ShareFreeList(q); }