Rev 2509: Cancelling directories with cancelled children works correctly in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Jun 6 03:27:04 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2509
revision-id: pqm at pqm.ubuntu.com-20070606022703-i49zqzf2wa4kq7fr
parent: pqm at pqm.ubuntu.com-20070606015859-rwlz810cte7l1row
parent: aaron.bentley at utoronto.ca-20070606012818-ubf8cmaj1imntttb
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-06-06 03:27:03 +0100
message:
Cancelling directories with cancelled children works correctly
modified:
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
------------------------------------------------------------
revno: 2502.1.13
merged: aaron.bentley at utoronto.ca-20070606012818-ubf8cmaj1imntttb
parent: aaron.bentley at utoronto.ca-20070605223321-69qk2lxdg9d554at
committer: Aaron Bentley <aaron.bentley at utoronto.ca>
branch nick: fast-checkout
timestamp: Tue 2007-06-05 21:28:18 -0400
message:
Updates from review
------------------------------------------------------------
revno: 2502.1.12
merged: aaron.bentley at utoronto.ca-20070605223321-69qk2lxdg9d554at
parent: abentley at panoramicfeedback.com-20070605161922-0j7x00tazfnh5zf1
committer: Aaron Bentley <aaron.bentley at utoronto.ca>
branch nick: fast-checkout
timestamp: Tue 2007-06-05 18:33:21 -0400
message:
Avoid renaming children with no content
=== modified file 'bzrlib/tests/test_transform.py'
--- a/bzrlib/tests/test_transform.py 2007-06-05 15:45:20 +0000
+++ b/bzrlib/tests/test_transform.py 2007-06-06 01:28:18 +0000
@@ -934,6 +934,14 @@
except OSError:
self.fail('Tried to remove parent before child1')
+ def test_cancel_with_cancelled_child_should_succeed(self):
+ transform, root = self.get_transform()
+ parent = transform.new_directory('parent', root)
+ child = transform.new_directory('child', parent)
+ transform.cancel_creation(child)
+ transform.cancel_creation(parent)
+ transform.finalize()
+
class TransformGroup(object):
def __init__(self, dirname, root_id):
=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py 2007-06-05 14:14:43 +0000
+++ b/bzrlib/transform.py 2007-06-06 01:28:18 +0000
@@ -206,6 +206,9 @@
suitable, so we have to rename them.
"""
for trans_id in trans_ids:
+ if trans_id not in self._new_contents:
+ del self._limbo_files[trans_id]
+ continue
old_path = self._limbo_files[trans_id]
new_path = self._limbo_name(trans_id, from_scratch=True)
os.rename(old_path, new_path)
More information about the bazaar-commits
mailing list