/// <exception cref="NGit.Errors.MissingObjectException"></exception> /// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception> /// <exception cref="System.IO.IOException"></exception> internal override RevCommit Next() { for (; ;) { RevCommit c = source.Next(); if (c == null) { return(null); } bool rewrote = false; RevCommit[] pList = c.parents; int nParents = pList.Length; for (int i = 0; i < nParents; i++) { RevCommit oldp = pList[i]; RevCommit newp = Rewrite(oldp); if (oldp != newp) { pList[i] = newp; rewrote = true; } } if (rewrote) { c.parents = Cleanup(pList); } return(c); } }
/// <exception cref="NGit.Errors.MissingObjectException"></exception> /// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception> /// <exception cref="System.IO.IOException"></exception> internal DateRevQueue(Generator s) { 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 DateRevQueue(Generator s) { 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); } }
/// <exception cref="NGit.Errors.MissingObjectException"></exception> /// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception> /// <exception cref="System.IO.IOException"></exception> internal override RevCommit Next() { for (; ;) { RevCommit c = pending.Next(); if (c == null) { return(null); } if ((c.flags & RevWalk.UNINTERESTING) == 0) { return(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); } }
/// <exception cref="NGit.Errors.MissingObjectException"></exception> /// <exception cref="NGit.Errors.IncorrectObjectTypeException"></exception> /// <exception cref="System.IO.IOException"></exception> internal override RevCommit Next() { while (size < OVER_SCAN) { RevCommit c = pending.Next(); if (c == null) { break; } delay.Add(c); size++; } RevCommit c_1 = delay.Next(); if (c_1 == null) { return(null); } size--; return(c_1); }
/// <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); } } }