fix for a keyerror in finding least common ancestors
Michael Hudson
michael.hudson at canonical.com
Mon Jul 30 11:35:42 BST 2007
I have an branch of launchpad with pretty complicated merge history.
Attempting to merge a particular revision of launchpad head into it
yields an exception like:
Traceback (most recent call last):
File "/home/mwh/bzr/bzrlib/commands.py", line 729, in run_bzr_catch_errors
return run_bzr(argv)
File "/home/mwh/bzr/bzrlib/commands.py", line 691, in run_bzr
ret = run(*run_argv)
File "/home/mwh/bzr/bzrlib/commands.py", line 389, in run_argv_aliases
return self.run(**all_cmd_args)
File "/home/mwh/bzr/bzrlib/builtins.py", line 2709, in run
change_reporter=change_reporter)
File "/home/mwh/bzr/bzrlib/builtins.py", line 3724, in _merge_helper
merger.set_base(base_revision)
File "/home/mwh/bzr/bzrlib/merge.py", line 268, in set_base
self.base_rev_id = graph.find_unique_lca(*revisions)
File "/home/mwh/bzr/bzrlib/graph.py", line 279, in find_unique_lca
lca = self.find_lca(*revisions)
File "/home/mwh/bzr/bzrlib/graph.py", line 140, in find_lca
return self._filter_candidate_lca(border_common)
File "/home/mwh/bzr/bzrlib/graph.py", line 244, in _filter_candidate_lca
del active_searchers[candidate]
KeyError: 'pqm at pqm.ubuntu.com-20070712051010-4o5ij0wgrvhvdf0o'
I think the most obvious fix (attached) is actually the right fix (it's
not at all obvious to me that the candidate being deleted here hasn't
already been deleted by line 249). In a half an hour of trying, I
haven't been able to make a test case, but that's not surprising as I
spent most of that time trying to understand the terminology of this file...
Cheers,
mwh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: find-lca-problem.bundle
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070730/ce546052/attachment.diff
More information about the bazaar
mailing list