Show More
@@ -137,10 +137,8 b' class verifier(object):' | |||||
137 | mflinkrevs = {} |
|
137 | mflinkrevs = {} | |
138 | filelinkrevs = {} |
|
138 | filelinkrevs = {} | |
139 | filenodes = {} |
|
139 | filenodes = {} | |
140 | revisions = 0 |
|
140 | ||
141 | badrevs = self.badrevs |
|
|||
142 | ui = repo.ui |
|
141 | ui = repo.ui | |
143 | cl = repo.changelog |
|
|||
144 |
|
142 | |||
145 | if not repo.url().startswith('file:'): |
|
143 | if not repo.url().startswith('file:'): | |
146 | raise error.Abort(_("cannot verify bundle or remote repos")) |
|
144 | raise error.Abort(_("cannot verify bundle or remote repos")) | |
@@ -148,10 +146,9 b' class verifier(object):' | |||||
148 | if os.path.exists(repo.sjoin("journal")): |
|
146 | if os.path.exists(repo.sjoin("journal")): | |
149 | ui.warn(_("abandoned transaction found - run hg recover\n")) |
|
147 | ui.warn(_("abandoned transaction found - run hg recover\n")) | |
150 |
|
148 | |||
151 |
|
|
149 | if ui.verbose or not self.revlogv1: | |
152 | if ui.verbose or not revlogv1: |
|
|||
153 | ui.status(_("repository uses revlog format %d\n") % |
|
150 | ui.status(_("repository uses revlog format %d\n") % | |
154 | (revlogv1 and 1 or 0)) |
|
151 | (self.revlogv1 and 1 or 0)) | |
155 |
|
152 | |||
156 | self._verifychangelog(mflinkrevs, filelinkrevs) |
|
153 | self._verifychangelog(mflinkrevs, filelinkrevs) | |
157 |
|
154 | |||
@@ -160,10 +157,9 b' class verifier(object):' | |||||
160 | self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) |
|
157 | self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) | |
161 |
|
158 | |||
162 | totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) |
|
159 | totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) | |
163 | revisions += filerevisions |
|
|||
164 |
|
160 | |||
165 | ui.status(_("%d files, %d changesets, %d total revisions\n") % |
|
161 | ui.status(_("%d files, %d changesets, %d total revisions\n") % | |
166 | (totalfiles, len(cl), revisions)) |
|
162 | (totalfiles, len(repo.changelog), filerevisions)) | |
167 | if self.warnings: |
|
163 | if self.warnings: | |
168 | ui.warn(_("%d warnings encountered!\n") % self.warnings) |
|
164 | ui.warn(_("%d warnings encountered!\n") % self.warnings) | |
169 | if self.fncachewarned: |
|
165 | if self.fncachewarned: | |
@@ -171,9 +167,9 b' class verifier(object):' | |||||
171 | 'corrupt fncache\n')) |
|
167 | 'corrupt fncache\n')) | |
172 | if self.errors: |
|
168 | if self.errors: | |
173 | ui.warn(_("%d integrity errors encountered!\n") % self.errors) |
|
169 | ui.warn(_("%d integrity errors encountered!\n") % self.errors) | |
174 | if badrevs: |
|
170 | if self.badrevs: | |
175 | ui.warn(_("(first damaged changeset appears to be %d)\n") |
|
171 | ui.warn(_("(first damaged changeset appears to be %d)\n") | |
176 | % min(badrevs)) |
|
172 | % min(self.badrevs)) | |
177 | return 1 |
|
173 | return 1 | |
178 |
|
174 | |||
179 | def _verifychangelog(self, mflinkrevs, filelinkrevs): |
|
175 | def _verifychangelog(self, mflinkrevs, filelinkrevs): |
General Comments 0
You need to be logged in to leave comments.
Login now