~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-07 20:01:09 UTC
  • mfrom: (1551.15.82 Aaron's integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070807200109-d25wg4bqp97uo9d5
Fix KeyError in Graph.filter_candidate_lca corner case

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: