Rev 3233: Cherry pick branch implementations subtree fix. in http://people.ubuntu.com/~robertc/baz2.0/shallow-branch
Robert Collins
robertc at robertcollins.net
Mon Feb 25 02:29:30 GMT 2008
At http://people.ubuntu.com/~robertc/baz2.0/shallow-branch
------------------------------------------------------------
revno: 3233
revision-id:robertc at robertcollins.net-20080225022925-jo7ynu2gjgamp781
parent: robertc at robertcollins.net-20080222015839-hylnnuh74gw9mnpw
committer: Robert Collins <robertc at robertcollins.net>
branch nick: StackableBranch
timestamp: Mon 2008-02-25 13:29:25 +1100
message:
Cherry pick branch implementations subtree fix.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/branch_implementations/test_commit.py test_commit.py-20070206022134-117z1i5b644p63r0-1
=== modified file 'NEWS'
--- a/NEWS 2008-02-22 01:53:18 +0000
+++ b/NEWS 2008-02-25 02:29:25 +0000
@@ -33,6 +33,9 @@
* ``bzrlib.tests.adapt_tests`` was broken and unused - it has been fixed.
(Robert Collins)
+ * The branch interface tests were invalid for branches using subtree
+ repositories by default. This has been fixed. (Robert Collins)
+
INTERNALS:
* New remote method ``RemoteBzrDir.find_repositoryV2`` adding support for
=== modified file 'bzrlib/tests/branch_implementations/test_commit.py'
--- a/bzrlib/tests/branch_implementations/test_commit.py 2007-09-03 12:32:14 +0000
+++ b/bzrlib/tests/branch_implementations/test_commit.py 2008-02-25 02:29:25 +0000
@@ -123,10 +123,10 @@
def test_pre_commit_passes(self):
empty_delta = TreeDelta()
root_delta = TreeDelta()
- root_delta.added = [('', '', 'directory')]
tree = self.make_branch_and_memory_tree('branch')
tree.lock_write()
- tree.add('', '')
+ tree.add('')
+ root_delta.added = [('', tree.path2id(''), 'directory')]
Branch.hooks.install_hook("pre_commit", self.capture_pre_commit_hook)
revid1 = tree.commit('first revision')
revid2 = tree.commit('second revision')
@@ -140,10 +140,10 @@
def test_pre_commit_fails(self):
empty_delta = TreeDelta()
root_delta = TreeDelta()
- root_delta.added = [('', '', 'directory')]
tree = self.make_branch_and_memory_tree('branch')
tree.lock_write()
- tree.add('', '')
+ tree.add('')
+ root_delta.added = [('', tree.path2id(''), 'directory')]
class PreCommitException(Exception): pass
def hook_func(local, master,
old_revno, old_revid, new_revno, new_revid,
More information about the bazaar-commits
mailing list