Rev 5135: Handle path conflicts involving different root-ids in file:///home/vila/src/bzr/bugs/805809-no-final-path/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Jul 5 09:12:52 UTC 2011
At file:///home/vila/src/bzr/bugs/805809-no-final-path/
------------------------------------------------------------
revno: 5135
revision-id: v.ladeuil+lp at free.fr-20110705091252-7qpkbzgr4wyrvwvq
parent: v.ladeuil+lp at free.fr-20110705090205-vduyrqt0llpaks8w
fixes bug(s): https://launchpad.net/bugs/805809
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 805809-no-final-path
timestamp: Tue 2011-07-05 11:12:52 +0200
message:
Handle path conflicts involving different root-ids
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2011-05-17 09:57:58 +0000
+++ b/NEWS 2011-07-05 09:12:52 +0000
@@ -24,6 +24,9 @@
doubly-stacked branch.
(James Westby, Martin Pool, #715000)
+* Don't crash while merging and encountering obscure path conflicts
+ involving different root-ids. (Vincent Ladeuil, #805809)
+
Improvements
************
=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py 2010-07-29 03:56:54 +0000
+++ b/bzrlib/merge.py 2011-07-05 09:12:52 +0000
@@ -1624,8 +1624,14 @@
if other_parent is None or other_name is None:
other_path = '<deleted>'
else:
- parent_path = fp.get_path(
- self.tt.trans_id_file_id(other_parent))
+ if other_parent == self.other_tree.get_root_id():
+ # The tree transform don't know about the other root,
+ # so we special case here to avoid a NoFinalPath
+ # exception
+ parent_path = ''
+ else:
+ parent_path = fp.get_path(
+ self.tt.trans_id_file_id(other_parent))
other_path = osutils.pathjoin(parent_path, other_name)
c = _mod_conflicts.Conflict.factory(
'path conflict', path=this_path,
More information about the bazaar-commits
mailing list