55
56
self.branch.lock_read()
57
self.progress = bzrlib.ui.ui_factory.progress_bar()
57
59
self.history = self.branch.revision_history()
58
60
if not len(self.history):
59
61
# nothing to see here
61
self.planned_revisions = self.branch.get_ancestry(self.history[-1])
62
self.planned_revisions.remove(None)
63
if not self.branch.revision_store.listable():
64
raise BzrCheckError("Branch must be local")
65
self.planned_revisions = set(self.branch.revision_store)
66
inventoried = set(self.inventory_weave.names())
67
awol = self.planned_revisions - inventoried
69
raise BzrCheckError('Stored revisions missing from inventory'
70
'{%s}' % ','.join([f for f in awol]))
65
self.progress = bzrlib.ui.ui_factory.progress_bar()
66
while revno < len(self.planned_revisions):
67
rev_id = self.planned_revisions[revno]
68
self.progress.update('checking revision', revno,
72
for revno, rev_id in enumerate(self.planned_revisions):
73
self.progress.update('checking revision', revno+1,
69
74
len(self.planned_revisions))
71
75
self.check_one_rev(rev_id)
72
77
self.progress.clear()
74
78
self.branch.unlock()
76
80
def report_results(self, verbose):