diff --git a/mercurial/verify.py b/mercurial/verify.py --- a/mercurial/verify.py +++ b/mercurial/verify.py @@ -153,6 +153,34 @@ class verifier(object): ui.status(_("repository uses revlog format %d\n") % (revlogv1 and 1 or 0)) + self._verifychangelog(mflinkrevs, filelinkrevs) + + self._verifymanifest(mflinkrevs, filenodes) + + self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) + + totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) + revisions += filerevisions + + ui.status(_("%d files, %d changesets, %d total revisions\n") % + (totalfiles, len(cl), revisions)) + if self.warnings: + ui.warn(_("%d warnings encountered!\n") % self.warnings) + if self.fncachewarned: + ui.warn(_('hint: run "hg debugrebuildfncache" to recover from ' + 'corrupt fncache\n')) + if self.errors: + ui.warn(_("%d integrity errors encountered!\n") % self.errors) + if badrevs: + ui.warn(_("(first damaged changeset appears to be %d)\n") + % min(badrevs)) + return 1 + + def _verifychangelog(self, mflinkrevs, filelinkrevs): + ui = self.ui + repo = self.repo + cl = repo.changelog + ui.status(_("checking changesets\n")) seen = {} self.checklog(cl, "changelog", 0) @@ -175,27 +203,6 @@ class verifier(object): self.exc(i, _("unpacking changeset %s") % short(n), inst) ui.progress(_('checking'), None) - self._verifymanifest(mflinkrevs, filenodes) - - self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) - - totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) - revisions += filerevisions - - ui.status(_("%d files, %d changesets, %d total revisions\n") % - (totalfiles, len(cl), revisions)) - if self.warnings: - ui.warn(_("%d warnings encountered!\n") % self.warnings) - if self.fncachewarned: - ui.warn(_('hint: run "hg debugrebuildfncache" to recover from ' - 'corrupt fncache\n')) - if self.errors: - ui.warn(_("%d integrity errors encountered!\n") % self.errors) - if badrevs: - ui.warn(_("(first damaged changeset appears to be %d)\n") - % min(badrevs)) - return 1 - def _verifymanifest(self, mflinkrevs, filenodes): repo = self.repo ui = self.ui