/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/graph.py

  • Committer: Martin
  • Date: 2017-05-25 01:35:55 UTC
  • mto: This revision was merged to the branch mainline in revision 6637.
  • Revision ID: gzlist@googlemail.com-20170525013555-lepzczdnzb9r272j
Apply 2to3 next fixer and make compatible

Show diffs side-by-side

added added

removed removed

Lines of Context:
481
481
        unique_searcher = self._make_breadth_first_searcher(unique_revisions)
482
482
        # we know that unique_revisions aren't in common_revisions, so skip
483
483
        # past them.
484
 
        unique_searcher.next()
 
484
        next(unique_searcher)
485
485
        common_searcher = self._make_breadth_first_searcher(common_revisions)
486
486
 
487
487
        # As long as we are still finding unique nodes, keep searching
836
836
        active_searchers = dict(searchers)
837
837
        # skip over the actual candidate for each searcher
838
838
        for searcher in active_searchers.itervalues():
839
 
            searcher.next()
 
839
            next(searcher)
840
840
        # The common walker finds nodes that are common to two or more of the
841
841
        # input keys, so that we don't access all history when a currently
842
842
        # uncommon search point actually meets up with something behind a
848
848
            ancestors = set()
849
849
            # advance searches
850
850
            try:
851
 
                common_walker.next()
 
851
                next(common_walker)
852
852
            except StopIteration:
853
853
                # No common points being searched at this time.
854
854
                pass
861
861
                    # a descendant of another candidate.
862
862
                    continue
863
863
                try:
864
 
                    ancestors.update(searcher.next())
 
864
                    ancestors.update(next(searcher))
865
865
                except StopIteration:
866
866
                    del active_searchers[candidate]
867
867
                    continue
1384
1384
 
1385
1385
    def step(self):
1386
1386
        try:
1387
 
            return self.next()
 
1387
            return next(self)
1388
1388
        except StopIteration:
1389
1389
            return ()
1390
1390
 
1391
 
    def next(self):
 
1391
    def __next__(self):
1392
1392
        """Return the next ancestors of this revision.
1393
1393
 
1394
1394
        Ancestors are returned in the order they are seen in a breadth-first
1414
1414
        self.seen.update(self._next_query)
1415
1415
        return self._next_query
1416
1416
 
 
1417
    next = __next__
 
1418
 
1417
1419
    def next_with_ghosts(self):
1418
1420
        """Return the next found ancestors, with ghosts split out.
1419
1421