Rev 2510: Don't crash on merging renames of deleted files (#110279) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Jun 6 05:32:19 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2510
revision-id: pqm at pqm.ubuntu.com-20070606043217-jlt8hu49sk54tsag
parent: pqm at pqm.ubuntu.com-20070606022703-i49zqzf2wa4kq7fr
parent: aaron.bentley at utoronto.ca-20070606015055-h01xm6jeddm630up
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-06-06 05:32:17 +0100
message:
Don't crash on merging renames of deleted files (#110279)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
------------------------------------------------------------
revno: 1551.2.49.1.40.1.22.1.42.1.31.1.39.1.17.1.15.1.3
merged: aaron.bentley at utoronto.ca-20070606015055-h01xm6jeddm630up
parent: aaron.bentley at utoronto.ca-20070606010725-cusa72npg70khhkk
committer: Aaron Bentley <aaron.bentley at utoronto.ca>
branch nick: Aaron's mergeable stuff
timestamp: Tue 2007-06-05 21:50:55 -0400
message:
Rename test case
------------------------------------------------------------
revno: 1551.2.49.1.40.1.22.1.42.1.31.1.39.1.17.1.15.1.2
merged: aaron.bentley at utoronto.ca-20070606010725-cusa72npg70khhkk
parent: aaron.bentley at utoronto.ca-20070606010518-kmhq36e8pomuzio7
committer: Aaron Bentley <aaron.bentley at utoronto.ca>
branch nick: Aaron's mergeable stuff
timestamp: Tue 2007-06-05 21:07:25 -0400
message:
Don't crash on merging renamed deleted files (#110279)
------------------------------------------------------------
revno: 1551.2.49.1.40.1.22.1.42.1.31.1.39.1.17.1.15.1.1
merged: aaron.bentley at utoronto.ca-20070606010518-kmhq36e8pomuzio7
parent: abentley at panoramicfeedback.com-20070524153619-o4ici00lpcmbshiw
parent: pqm at pqm.ubuntu.com-20070605164810-ay1hxyvqofffy0me
committer: Aaron Bentley <aaron.bentley at utoronto.ca>
branch nick: Aaron's mergeable stuff
timestamp: Tue 2007-06-05 21:05:18 -0400
message:
Merge bzr.dev
=== modified file 'NEWS'
--- a/NEWS 2007-06-05 16:19:22 +0000
+++ b/NEWS 2007-06-06 01:07:25 +0000
@@ -54,6 +54,9 @@
* WorkingTree.remove works correctly with tree references, and when pwd is
not the tree root. (Aaron Bentley)
+ * Merge no longer fails when a file is renamed in one tree and deleted
+ in the other. (Aaron Bentley, #110279)
+
bzr 0.16 2007-05-07
BUGFIXES:
=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py 2007-03-21 01:34:41 +0000
+++ b/bzrlib/merge.py 2007-06-06 01:07:25 +0000
@@ -870,7 +870,7 @@
except KeyError:
this_name = other_name = self.tt.final_name(trans_id)
other_path = fp.get_path(trans_id)
- if this_parent is not None:
+ if this_parent is not None and this_name is not None:
this_parent_path = \
fp.get_path(self.tt.trans_id_file_id(this_parent))
this_path = pathjoin(this_parent_path, this_name)
=== modified file 'bzrlib/tests/test_merge.py'
--- a/bzrlib/tests/test_merge.py 2007-03-06 10:22:33 +0000
+++ b/bzrlib/tests/test_merge.py 2007-06-06 01:50:55 +0000
@@ -249,3 +249,24 @@
registry.remove('merge4')
self.assertFalse('merge4' in [x[0] for x in
merge_type_option.iter_switches()])
+
+ def test_merge_other_moves_we_deleted(self):
+ tree_a = self.make_branch_and_tree('A')
+ tree_a.lock_write()
+ self.addCleanup(tree_a.unlock)
+ self.build_tree(['A/a'])
+ tree_a.add('a')
+ tree_a.commit('1', rev_id='rev-1')
+ tree_a.flush()
+ tree_a.rename_one('a', 'b')
+ tree_a.commit('2')
+ bzrdir_b = tree_a.bzrdir.sprout('B', revision_id='rev-1')
+ tree_b = bzrdir_b.open_workingtree()
+ tree_b.lock_write()
+ self.addCleanup(tree_b.unlock)
+ os.unlink('B/a')
+ tree_b.commit('3')
+ try:
+ tree_b.merge_from_branch(tree_a.branch)
+ except AttributeError:
+ self.fail('tried to join a path when name was None')
More information about the bazaar-commits
mailing list