Rev 2364: (broken) Add a simplified test which exposes the bug. in http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/dirstate_93681

John Arbash Meinel john at arbash-meinel.com
Tue Mar 20 00:41:18 GMT 2007


At http://bzr.arbash-meinel.com/branches/bzr/0.15-dev/dirstate_93681

------------------------------------------------------------
revno: 2364
revision-id: john at arbash-meinel.com-20070320004104-mwai9d85fym5n0hf
parent: pqm at pqm.ubuntu.com-20070317015305-7b7562331da9f786
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: dirstate_93681
timestamp: Mon 2007-03-19 19:41:04 -0500
message:
  (broken) Add a simplified test which exposes the bug.
modified:
  bzrlib/tests/workingtree_implementations/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
-------------- next part --------------
=== modified file 'bzrlib/tests/workingtree_implementations/test_commit.py'
--- a/bzrlib/tests/workingtree_implementations/test_commit.py	2007-03-06 12:58:22 +0000
+++ b/bzrlib/tests/workingtree_implementations/test_commit.py	2007-03-20 00:41:04 +0000
@@ -199,6 +199,25 @@
         self.assertFalse(wt.has_filename('d'))
         wt.unlock()
 
+    def test_commit_deleted_subtree_with_rename(self):
+        wt = self.make_branch_and_tree('.')
+        self.build_tree(['a', 'b/', 'b/c', 'd'])
+        wt.add(['a', 'b', 'b/c'], ['a-id', 'b-id', 'c-id'])
+        wt.commit('first')
+        wt.rename_one('b/c', 'b/d')
+        this_dir = self.get_transport()
+        this_dir.delete_tree('b')
+        wt.lock_write()
+        wt.commit('commit deleted rename')
+        self.assertTrue(wt.has_id('a-id'))
+        self.assertFalse(wt.has_or_had_id('b-id'))
+        self.assertFalse(wt.has_or_had_id('c-id'))
+        self.assertTrue(wt.has_filename('a'))
+        self.assertFalse(wt.has_filename('b'))
+        self.assertFalse(wt.has_filename('b/c'))
+        self.assertFalse(wt.has_filename('b/d'))
+        wt.unlock()
+
     def test_commit_move_new(self):
         wt = self.make_branch_and_tree('first')
         wt.commit('first')



More information about the bazaar-commits mailing list