[Pkg-bazaar-commits] ./bzr/unstable r819: - check command checks that all inventory-ids are the same as in the revision.
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:21:08 UTC 2009
------------------------------------------------------------
revno: 819
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Mon 2005-07-04 22:26:02 +1000
message:
- check command checks that all inventory-ids are the same as in the revision.
modified:
bzrlib/check.py
doc/formats.txt
-------------- next part --------------
=== modified file 'bzrlib/check.py'
--- a/bzrlib/check.py 2005-07-04 07:34:44 +0000
+++ b/bzrlib/check.py 2005-07-04 12:26:02 +0000
@@ -42,6 +42,7 @@
history = branch.revision_history()
revno = 0
revcount = len(history)
+ mismatch_inv_id = []
# for all texts checked, text_id -> sha1
checked_texts = {}
@@ -85,6 +86,9 @@
"by {%s}"
% (rev_id, last_rev_id))
+ if rev.inventory_id != rev_id:
+ mismatch_inv_id.append(rev_id)
+
## TODO: Check all the required fields are present on the revision.
if rev.inventory_sha1:
@@ -166,3 +170,8 @@
if (missing_inventory_sha_cnt
or missing_revision_sha_cnt):
print ' (use "bzr upgrade" to fix them)'
+
+ if mismatch_inv_id:
+ print '%d revisions have mismatched inventory ids:' % len(mismatch_inv_id)
+ for rev_id in mismatch_inv_id:
+ print ' ', rev_id
=== modified file 'doc/formats.txt'
--- a/doc/formats.txt 2005-07-04 07:34:19 +0000
+++ b/doc/formats.txt 2005-07-04 12:26:02 +0000
@@ -174,6 +174,10 @@
An inventory is stored for recorded revisions, also a
``pending-inventory`` for a working directory.
+Inventories always have the same id as the revision they correspond
+to. bzr up to 0.0.5 explicitly stores an inventory-id; in future
+versions this may be implied.
+
Revision
More information about the Pkg-bazaar-commits
mailing list