Rev 5622: Fix bug #715058 and cleanup ParentLoop.action_take_other which did the right thing before everyone else ; -/ in file:///home/vila/src/bzr/bugs/715058-resolve-text-subdir/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Feb 8 10:52:37 UTC 2011
At file:///home/vila/src/bzr/bugs/715058-resolve-text-subdir/
------------------------------------------------------------
revno: 5622
revision-id: v.ladeuil+lp at free.fr-20110208105237-0g0r5q65rslvzrfx
parent: v.ladeuil+lp at free.fr-20110208101738-zvs9r18xy7youyhq
fixes bug(s): https://launchpad.net/bugs/715058
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 715058-resolve-text-subdir
timestamp: Tue 2011-02-08 11:52:37 +0100
message:
Fix bug #715058 and cleanup ParentLoop.action_take_other which did the right thing before everyone else ;-/
-------------- next part --------------
=== modified file 'bzrlib/conflicts.py'
--- a/bzrlib/conflicts.py 2011-01-15 17:29:41 +0000
+++ b/bzrlib/conflicts.py 2011-02-08 10:52:37 +0000
@@ -644,8 +644,9 @@
winner_tid = tt.trans_id_tree_path(winner_path)
winner_parent_tid = tt.get_tree_parent(winner_tid)
# Switch the paths to preserve the content
- tt.adjust_path(self.path, winner_parent_tid, winner_tid)
- tt.adjust_path(winner_path, item_parent_tid, item_tid)
+ tt.adjust_path(osutils.basename(self.path),
+ winner_parent_tid, winner_tid)
+ tt.adjust_path(osutils.basename(winner_path), item_parent_tid, item_tid)
# Associate the file_id to the right content
tt.unversion_file(item_tid)
tt.version_file(self.file_id, winner_tid)
@@ -755,18 +756,15 @@
pass
def action_take_other(self, tree):
- # FIXME: We shouldn't have to manipulate so many paths here (and there
- # is probably a bug or two...)
- base_path = osutils.basename(self.path)
- conflict_base_path = osutils.basename(self.conflict_path)
tt = transform.TreeTransform(tree)
try:
p_tid = tt.trans_id_file_id(self.file_id)
parent_tid = tt.get_tree_parent(p_tid)
cp_tid = tt.trans_id_file_id(self.conflict_file_id)
cparent_tid = tt.get_tree_parent(cp_tid)
- tt.adjust_path(base_path, cparent_tid, cp_tid)
- tt.adjust_path(conflict_base_path, parent_tid, p_tid)
+ tt.adjust_path(osutils.basename(self.path), cparent_tid, cp_tid)
+ tt.adjust_path(osutils.basename(self.conflict_path),
+ parent_tid, p_tid)
tt.apply()
finally:
tt.finalize()
More information about the bazaar-commits
mailing list