~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: Martin Pool
  • Date: 2005-07-04 12:26:02 UTC
  • Revision ID: mbp@sourcefrog.net-20050704122602-69901910521e62c3
- check command checks that all inventory-ids are the same as in the revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        history = branch.revision_history()
43
43
        revno = 0
44
44
        revcount = len(history)
 
45
        mismatch_inv_id = []
45
46
 
46
47
        # for all texts checked, text_id -> sha1
47
48
        checked_texts = {}
85
86
                                    "by {%s}"
86
87
                                    % (rev_id, last_rev_id))
87
88
 
 
89
            if rev.inventory_id != rev_id:
 
90
                mismatch_inv_id.append(rev_id)
 
91
 
88
92
            ## TODO: Check all the required fields are present on the revision.
89
93
 
90
94
            if rev.inventory_sha1:
166
170
    if (missing_inventory_sha_cnt
167
171
        or missing_revision_sha_cnt):
168
172
        print '  (use "bzr upgrade" to fix them)'
 
173
 
 
174
    if mismatch_inv_id:
 
175
        print '%d revisions have mismatched inventory ids:' % len(mismatch_inv_id)
 
176
        for rev_id in mismatch_inv_id:
 
177
            print '  ', rev_id