~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
        for searcher in active_searchers.itervalues():
235
235
            searcher.next()
236
236
        while len(active_searchers) > 0:
237
 
            for candidate, searcher in list(active_searchers.iteritems()):
 
237
            for candidate in active_searchers.keys():
 
238
                try:
 
239
                    searcher = active_searchers[candidate]
 
240
                except KeyError:
 
241
                    # rare case: we deleted candidate in a previous iteration
 
242
                    # through this for loop, because it was determined to be
 
243
                    # a descendant of another candidate.
 
244
                    continue
238
245
                try:
239
246
                    ancestors = searcher.next()
240
247
                except StopIteration: