Rev 4605: Add a safety check that there is an inventory being transmitted for in http://bazaar.launchpad.net/~jameinel/bzr/1.19-bug-402778
John Arbash Meinel
john at arbash-meinel.com
Wed Aug 12 19:58:15 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.19-bug-402778
------------------------------------------------------------
revno: 4605
revision-id: john at arbash-meinel.com-20090812185805-5q9zxhgojtzxbwry
parent: john at arbash-meinel.com-20090812185050-uaxyadgdkzb3ukym
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.19-bug-402778
timestamp: Wed 2009-08-12 13:58:05 -0500
message:
Add a safety check that there is an inventory being transmitted for
all revisions which we are processing.
-------------- next part --------------
=== modified file 'bzrlib/repofmt/groupcompress_repo.py'
--- a/bzrlib/repofmt/groupcompress_repo.py 2009-08-12 18:49:22 +0000
+++ b/bzrlib/repofmt/groupcompress_repo.py 2009-08-12 18:58:05 +0000
@@ -416,6 +416,11 @@
# get_parent_map(self.revision_keys), but that shouldn't be any faster
# than this.
inventory_keys = source_vf.keys()
+ missing_inventories = set(self.revision_keys).difference(inventory_keys)
+ if missing_inventories:
+ missing_inventories = sorted(missing_inventories)
+ raise ValueError('We are missing inventories for revisions: %s'
+ % (missing_inventories,))
self._copy_stream(source_vf, target_vf, inventory_keys,
'inventories', self._get_filtered_inv_stream, 2)
More information about the bazaar-commits
mailing list