/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: Andrew Bennetts
  • Date: 2007-10-26 06:48:09 UTC
  • mto: This revision was merged to the branch mainline in revision 2945.
  • Revision ID: andrew.bennetts@canonical.com-20071026064809-4f9fi8h5we7ob7wg
Display number of file versions not referenced by their corresponding inventory (i.e. dangling versions) in bzr check output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
            self.repository)
61
61
        self.unreferenced_ancestors = set()
62
62
        self.inconsistent_parents = []
 
63
        self.dangling_versions = set()
63
64
 
64
65
    def check(self):
65
66
        self.repository.lock_read()
156
157
                        '       %s has wrong parents in index: '
157
158
                        '%r should be %r',
158
159
                        revision_id, index_parents, actual_parents)
 
160
        if self.dangling_versions:
 
161
            note('%6d file versions are not referenced by their inventory',
 
162
                 len(self.dangling_versions))
159
163
 
160
164
    def check_one_rev(self, rev_id):
161
165
        """Check one revision.
225
229
                for unreferenced_parent in unreferenced_parents:
226
230
                    self.unreferenced_ancestors.add(
227
231
                        (weave_id, unreferenced_parent))
 
232
            self.dangling_versions.update(dangling_versions)
228
233
            self.checked_weaves[weave_id] = True
229
234
 
230
235
    def _check_revision_tree(self, rev_id):