Rev 3234: Review Repository test_revision tests for use with a read-instance repository. in http://people.ubuntu.com/~robertc/baz2.0/shallow-branch
Robert Collins
robertc at robertcollins.net
Tue Feb 19 01:54:25 GMT 2008
At http://people.ubuntu.com/~robertc/baz2.0/shallow-branch
------------------------------------------------------------
revno: 3234
revision-id:robertc at robertcollins.net-20080219015420-x5qjnashrvde6q9x
parent: robertc at robertcollins.net-20080219013542-9ehe02ek6mje4sqs
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository_implementations.split_read_write
timestamp: Tue 2008-02-19 12:54:20 +1100
message:
Review Repository test_revision tests for use with a read-instance repository.
modified:
bzrlib/tests/repository_implementations/test_revision.py testrevprops.py-20051013073044-92bc3c68302ce1bf
=== modified file 'bzrlib/tests/repository_implementations/test_revision.py'
--- a/bzrlib/tests/repository_implementations/test_revision.py 2006-08-15 17:01:22 +0000
+++ b/bzrlib/tests/repository_implementations/test_revision.py 2008-02-19 01:54:20 +0000
@@ -35,7 +35,8 @@
revprops=props,
allow_pointless=True,
rev_id='test at user-1')
- rev = b.repository.get_revision('test at user-1')
+ rev = self._make_test_read_instance(b.repository).get_revision(
+ 'test at user-1')
self.assertTrue('flavor' in rev.properties)
self.assertEquals(rev.properties['flavor'], 'choc-mint')
self.assertEquals([('branch-nick', 'Nicholas'),
@@ -50,11 +51,11 @@
wt = self.make_branch_and_tree('.')
b = wt.branch
self.assertRaises(ValueError,
- wt.commit,
+ wt.commit,
message='invalid',
revprops={'what a silly property': 'fine'})
self.assertRaises(ValueError,
- wt.commit,
+ wt.commit,
message='invalid',
revprops=dict(number=13))
@@ -76,8 +77,8 @@
'multiline':'foo\nbar\n\n'
})
assert len(tree1.branch.revision_history()) > 0
- rev_a = tree1.branch.repository.get_revision(
- tree1.branch.last_revision())
+ rev_a = self._make_test_read_instance(
+ tree1.branch.repository).get_revision(tree1.branch.last_revision())
tree2 = self.make_branch_and_tree("br2")
tree2.commit(message=rev_a.message,
@@ -89,8 +90,8 @@
allow_pointless=True, # there's nothing in this commit
strict=True,
verbose=True)
- rev_b = tree2.branch.repository.get_revision(
- tree2.branch.last_revision())
+ rev_b = self._make_test_read_instance(
+ tree2.branch.repository).get_revision(tree2.branch.last_revision())
self.assertEqual(rev_a.message, rev_b.message)
self.assertEqual(rev_a.timestamp, rev_b.timestamp)
@@ -104,5 +105,6 @@
# create a revision
tree1.commit(message="quux", timezone=0, rev_id='r1')
- rev_a = tree1.branch.repository.get_revision('r1')
+ rev_a = self._make_test_read_instance(
+ tree1.branch.repository).get_revision('r1')
self.assertEqual(0, rev_a.timezone)
More information about the bazaar-commits
mailing list