~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/check.py

  • Committer: Martin Pool
  • Date: 2006-03-10 06:29:53 UTC
  • mfrom: (1608 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1611.
  • Revision ID: mbp@sourcefrog.net-20060310062953-bc1c7ade75c89a7a
[merge] bzr.dev; pycurl not updated for readv yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
 
56
56
    def check(self):
57
57
        self.branch.lock_read()
58
 
        self.progress = bzrlib.ui.ui_factory.progress_bar()
 
58
        self.progress = bzrlib.ui.ui_factory.nested_progress_bar()
59
59
        try:
60
60
            self.progress.update('retrieving inventory', 0, 0)
61
61
            # do not put in init, as it should be done with progess,
75
75
                revno += 1
76
76
                self.check_one_rev(rev_id)
77
77
        finally:
78
 
            self.progress.clear()
 
78
            self.progress.finished()
79
79
            self.branch.unlock()
80
80
 
81
81
    def plan_revisions(self):
82
82
        repository = self.branch.repository
83
 
        if not repository.revision_store.listable():
84
 
            self.planned_revisions = repository.get_ancestry(self.history[-1])
85
 
            self.planned_revisions.remove(None)
86
 
            # FIXME progress bars should support this more nicely.
87
 
            self.progress.clear()
88
 
            print ("Checking reachable history -"
89
 
                   " for a complete check use a local branch.")
90
 
            return
91
 
        
92
 
        self.planned_revisions = set(repository.revision_store)
93
 
        inventoried = set(self.inventory_weave.names())
 
83
        self.planned_revisions = set(repository.all_revision_ids())
 
84
        self.progress.clear()
 
85
        inventoried = set(self.inventory_weave.versions())
94
86
        awol = self.planned_revisions - inventoried
95
87
        if len(awol) > 0:
96
88
            raise BzrCheckError('Stored revisions missing from inventory'