コード例 #1
0
        public override RevCommit next()
        {
            while (_size < PendingGenerator.OVER_SCAN)
            {
                RevCommit c = _pending.next();
                if (c == null)
                {
                    break;
                }
                _delay.add(c);
                _size++;
            }

            RevCommit cc = _delay.next();

            if (cc == null)
            {
                return(null);
            }
            _size--;
            return(cc);
        }
コード例 #2
0
        public override RevCommit next()
        {
            while (true)
            {
                RevCommit c = _pending.next();
                if (c == null)
                {
                    return(null);
                }

                if (c.InDegree > 0)
                {
                    // At least one of our children is missing. We delay
                    // production until all of our children are output.
                    //
                    c.Flags |= TopoDelay;
                    continue;
                }

                // All of our children have already produced,
                // so it is OK for us to produce now as well.
                //
                foreach (RevCommit p in c.Parents)
                {
                    if (--p.InDegree == 0 && (p.Flags & TopoDelay) != 0)
                    {
                        // This parent tried to come before us, but we are
                        // his last child. unpop the parent so it goes right
                        // behind this child.
                        //
                        p.Flags &= ~TopoDelay;
                        _pending.unpop(p);
                    }
                }
                return(c);
            }
        }
コード例 #3
0
            public override RevCommit next()
            {
                RevCommit c = _source.next();
                if (c != null)
                {
                    foreach (RevCommit p in c.Parents)
                    {
                        if ((p.Flags & RevWalk.UNINTERESTING) != 0)
                        {
                            _held.add(p);
                        }
                    }
                    return c;
                }

                var boundary = new FIFORevQueue();
                boundary.shareFreeList(_held);
                while (true)
                {
                    c = _held.next();
                    if (c == null)
                        break;
                    if ((c.Flags & Duplicate) != 0) continue;
                    if ((c.Flags & Parsed) == 0)
                    {
                        c.parseHeaders(_walk);
                    }
                    c.Flags |= Duplicate;
                    boundary.add(c);
                }
                boundary.removeFlag(Duplicate);
                _parent._generator = boundary;
                return boundary.next();
            }
コード例 #4
0
            public override RevCommit next()
            {
                RevCommit c = source.next();
                if (c != null)
                {
                    foreach (RevCommit p in c.parents)
                        if ((p.flags & UNINTERESTING) != 0)
                            held.add(p);
                    return c;
                }

                FIFORevQueue boundary = new FIFORevQueue();
                boundary.shareFreeList(held);
                for (; ; )
                {
                    c = held.next();
                    if (c == null)
                        break;
                    if ((c.flags & DUPLICATE) != 0)
                        continue;
                    if ((c.flags & PARSED) == 0)
                        c.parse(walk);
                    c.flags |= DUPLICATE;
                    boundary.add(c);
                }
                boundary.removeFlag(DUPLICATE);
                parent.g = boundary;
                return boundary.next();
            }