~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: Robert Collins
  • Date: 2005-09-06 09:47:19 UTC
  • mfrom: (1092.1.45)
  • mto: (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050906094719-a7e1f8ed80fe4280
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
    TODO: Check for extra files in the control directory.
84
84
    """
85
85
    from bzrlib.trace import mutter
86
 
    from bzrlib.errors import BzrCheckError, NoSuchRevision
 
86
    from bzrlib.errors import BzrCheckError
87
87
    from bzrlib.osutils import fingerprint_file
88
88
    from bzrlib.inventory import ROOT_ID
89
89
    from bzrlib.branch import gen_root_id
95
95
 
96
96
        missing_inventory_sha_cnt = 0
97
97
        missing_revision_sha_cnt = 0
98
 
        missing_revision_cnt = 0
99
98
 
100
99
        history = branch.revision_history()
101
100
        revno = 0
135
134
                        missing_revision_sha_cnt += 1
136
135
                        continue
137
136
                    prid = prr.revision_id
138
 
                    
139
 
                    try:
140
 
                        actual_sha = branch.get_revision_sha1(prid)
141
 
                    except NoSuchRevision:
142
 
                        missing_revision_cnt += 1
143
 
                        mutter("parent {%s} of {%s} not present in store",
144
 
                               prid, rev_id)
145
 
                        continue
146
 
                        
 
137
                    actual_sha = branch.get_revision_sha1(prid)
147
138
                    if prr.revision_sha1 != actual_sha:
148
139
                        raise BzrCheckError("mismatched revision sha1 for "
149
140
                                            "parent {%s} of {%s}: %s vs %s"
235
226
    if missing_revision_sha_cnt:
236
227
        print '%d parent links are missing revision_sha1' % missing_revision_sha_cnt
237
228
 
238
 
    if missing_revision_cnt:
239
 
        print '%d revisions are mentioned but not present' % missing_revision_cnt
240
 
 
241
229
    # stub this out for now because the main bzr branch has references
242
230
    # to revisions that aren't present in the store -- mbp 20050804
243
231
#    if (missing_inventory_sha_cnt