Show More
@@ -154,9 +154,6 class verifier(object): | |||||
154 | ui.status(_("repository uses revlog format %d\n") % |
|
154 | ui.status(_("repository uses revlog format %d\n") % | |
155 | (revlogv1 and 1 or 0)) |
|
155 | (revlogv1 and 1 or 0)) | |
156 |
|
156 | |||
157 | havecl = self.havecl |
|
|||
158 | havemf = self.havemf |
|
|||
159 |
|
||||
160 | ui.status(_("checking changesets\n")) |
|
157 | ui.status(_("checking changesets\n")) | |
161 | seen = {} |
|
158 | seen = {} | |
162 | self.checklog(cl, "changelog", 0) |
|
159 | self.checklog(cl, "changelog", 0) | |
@@ -208,11 +205,33 class verifier(object): | |||||
208 | self.exc(lr, _("reading manifest delta %s") % short(n), inst) |
|
205 | self.exc(lr, _("reading manifest delta %s") % short(n), inst) | |
209 | ui.progress(_('checking'), None) |
|
206 | ui.progress(_('checking'), None) | |
210 |
|
207 | |||
|
208 | self._crosscheckfiles(mflinkrevs, filelinkrevs, filenodes) | |||
|
209 | ||||
|
210 | totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) | |||
|
211 | revisions += filerevisions | |||
|
212 | ||||
|
213 | ui.status(_("%d files, %d changesets, %d total revisions\n") % | |||
|
214 | (totalfiles, len(cl), revisions)) | |||
|
215 | if self.warnings: | |||
|
216 | ui.warn(_("%d warnings encountered!\n") % self.warnings) | |||
|
217 | if self.fncachewarned: | |||
|
218 | ui.warn(_('hint: run "hg debugrebuildfncache" to recover from ' | |||
|
219 | 'corrupt fncache\n')) | |||
|
220 | if self.errors: | |||
|
221 | ui.warn(_("%d integrity errors encountered!\n") % self.errors) | |||
|
222 | if badrevs: | |||
|
223 | ui.warn(_("(first damaged changeset appears to be %d)\n") | |||
|
224 | % min(badrevs)) | |||
|
225 | return 1 | |||
|
226 | ||||
|
227 | def _crosscheckfiles(self, mflinkrevs, filelinkrevs, filenodes): | |||
|
228 | repo = self.repo | |||
|
229 | ui = self.ui | |||
211 | ui.status(_("crosschecking files in changesets and manifests\n")) |
|
230 | ui.status(_("crosschecking files in changesets and manifests\n")) | |
212 |
|
231 | |||
213 | total = len(mflinkrevs) + len(filelinkrevs) + len(filenodes) |
|
232 | total = len(mflinkrevs) + len(filelinkrevs) + len(filenodes) | |
214 | count = 0 |
|
233 | count = 0 | |
215 | if havemf: |
|
234 | if self.havemf: | |
216 | for c, m in sorted([(c, m) for m in mflinkrevs |
|
235 | for c, m in sorted([(c, m) for m in mflinkrevs | |
217 | for c in mflinkrevs[m]]): |
|
236 | for c in mflinkrevs[m]]): | |
218 | count += 1 |
|
237 | count += 1 | |
@@ -230,7 +249,7 class verifier(object): | |||||
230 | lr = filelinkrevs[f][0] |
|
249 | lr = filelinkrevs[f][0] | |
231 | self.err(lr, _("in changeset but not in manifest"), f) |
|
250 | self.err(lr, _("in changeset but not in manifest"), f) | |
232 |
|
251 | |||
233 | if havecl: |
|
252 | if self.havecl: | |
234 | for f in sorted(filenodes): |
|
253 | for f in sorted(filenodes): | |
235 | count += 1 |
|
254 | count += 1 | |
236 | ui.progress(_('crosschecking'), count, total=total) |
|
255 | ui.progress(_('crosschecking'), count, total=total) | |
@@ -244,23 +263,6 class verifier(object): | |||||
244 |
|
263 | |||
245 | ui.progress(_('crosschecking'), None) |
|
264 | ui.progress(_('crosschecking'), None) | |
246 |
|
265 | |||
247 | totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) |
|
|||
248 | revisions += filerevisions |
|
|||
249 |
|
||||
250 | ui.status(_("%d files, %d changesets, %d total revisions\n") % |
|
|||
251 | (totalfiles, len(cl), revisions)) |
|
|||
252 | if self.warnings: |
|
|||
253 | ui.warn(_("%d warnings encountered!\n") % self.warnings) |
|
|||
254 | if self.fncachewarned: |
|
|||
255 | ui.warn(_('hint: run "hg debugrebuildfncache" to recover from ' |
|
|||
256 | 'corrupt fncache\n')) |
|
|||
257 | if self.errors: |
|
|||
258 | ui.warn(_("%d integrity errors encountered!\n") % self.errors) |
|
|||
259 | if badrevs: |
|
|||
260 | ui.warn(_("(first damaged changeset appears to be %d)\n") |
|
|||
261 | % min(badrevs)) |
|
|||
262 | return 1 |
|
|||
263 |
|
||||
264 | def _verifyfiles(self, filenodes, filelinkrevs): |
|
266 | def _verifyfiles(self, filenodes, filelinkrevs): | |
265 | repo = self.repo |
|
267 | repo = self.repo | |
266 | ui = self.ui |
|
268 | ui = self.ui |
General Comments 0
You need to be logged in to leave comments.
Login now