Rev 4601: Fix one test that assumed get_inventory_xml worked. in http://bazaar.launchpad.net/~jameinel/bzr/1.19-bug-402778
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 11 22:05:37 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.19-bug-402778
------------------------------------------------------------
revno: 4601
revision-id: john at arbash-meinel.com-20090811210532-e6mewt2b8u16gugx
parent: john at arbash-meinel.com-20090811210246-c5r6zaze1hyyfxvm
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.19-bug-402778
timestamp: Tue 2009-08-11 16:05:32 -0500
message:
Fix one test that assumed get_inventory_xml worked.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_interrepository/test_fetch.py'
--- a/bzrlib/tests/per_interrepository/test_fetch.py 2009-08-11 17:29:31 +0000
+++ b/bzrlib/tests/per_interrepository/test_fetch.py 2009-08-11 21:05:32 +0000
@@ -296,8 +296,12 @@
to_repo = self.make_to_repository('to')
to_repo.fetch(from_tree.branch.repository)
recorded_inv_sha1 = to_repo.get_inventory_sha1('foo-id')
- xml = to_repo.get_inventory_xml('foo-id')
- computed_inv_sha1 = osutils.sha_string(xml)
+ to_repo.lock_read()
+ self.addCleanup(to_repo.unlock)
+ stream = to_repo.inventories.get_record_stream([('foo-id',)],
+ 'unordered', True)
+ bytes = stream.next().get_bytes_as('fulltext')
+ computed_inv_sha1 = osutils.sha_string(bytes)
self.assertEqual(computed_inv_sha1, recorded_inv_sha1)
More information about the bazaar-commits
mailing list