Rev 2460: in test_inv, stop abusing the inventory interface to get tree alterations to occur. in file:///home/robertc/source/baz/dirstate/
Robert Collins
robertc at robertcollins.net
Thu Mar 1 05:01:55 GMT 2007
At file:///home/robertc/source/baz/dirstate/
------------------------------------------------------------
revno: 2460
revision-id: robertc at robertcollins.net-20070301050153-9wdn7gdori263v9e
parent: robertc at robertcollins.net-20070301050053-u0ac7vavyzplbjz1
committer: Robert Collins <robertc at robertcollins.net>
branch nick: dirstate
timestamp: Thu 2007-03-01 16:01:53 +1100
message:
in test_inv, stop abusing the inventory interface to get tree alterations to occur.
modified:
bzrlib/tests/test_inv.py testinv.py-20050722220913-1dc326138d1a5892
=== modified file 'bzrlib/tests/test_inv.py'
--- a/bzrlib/tests/test_inv.py 2007-02-02 04:49:38 +0000
+++ b/bzrlib/tests/test_inv.py 2007-03-01 05:01:53 +0000
@@ -411,6 +411,8 @@
self.tree_1 = self.branch.repository.revision_tree('1')
self.inv_1 = self.branch.repository.get_inventory('1')
self.file_1 = self.inv_1['fileid']
+ self.wt.lock_write()
+ self.addCleanup(self.wt.unlock)
self.file_active = self.wt.inventory['fileid']
self.builder = self.branch.get_commit_builder([], timestamp=time.time(), revision_id='2')
@@ -465,8 +467,8 @@
def test_snapshot_changed(self):
# This tests that a commit with one different parent results in a new
# revision id in the entry.
- self.file_active.name='newname'
- rename('subdir/file', 'subdir/newname')
+ self.wt.rename_one('subdir/file', 'subdir/newname')
+ self.file_active = self.wt.inventory['fileid']
self.file_active.snapshot('2', 'subdir/newname', {'1':self.file_1},
self.wt, self.builder)
# expected outcome - file_1 has a revision id of '2'
More information about the bazaar-commits
mailing list