Show More
@@ -197,7 +197,7 b' class verifier(object):' | |||||
197 | ui.progress(_('checking'), None) |
|
197 | ui.progress(_('checking'), None) | |
198 | return mflinkrevs, filelinkrevs |
|
198 | return mflinkrevs, filelinkrevs | |
199 |
|
199 | |||
200 | def _verifymanifest(self, mflinkrevs, dir=""): |
|
200 | def _verifymanifest(self, mflinkrevs, dir="", storefiles=None): | |
201 | repo = self.repo |
|
201 | repo = self.repo | |
202 | ui = self.ui |
|
202 | ui = self.ui | |
203 | mf = self.repo.manifest.dirlog(dir) |
|
203 | mf = self.repo.manifest.dirlog(dir) | |
@@ -211,6 +211,8 b' class verifier(object):' | |||||
211 | label = "manifest" |
|
211 | label = "manifest" | |
212 | if dir: |
|
212 | if dir: | |
213 | label = dir |
|
213 | label = dir | |
|
214 | revlogfiles = mf.files() | |||
|
215 | storefiles.difference_update(revlogfiles) | |||
214 | if self.refersmf: |
|
216 | if self.refersmf: | |
215 | # Do not check manifest if there are only changelog entries with |
|
217 | # Do not check manifest if there are only changelog entries with | |
216 | # null manifests. |
|
218 | # null manifests. | |
@@ -260,11 +262,23 b' class verifier(object):' | |||||
260 |
|
262 | |||
261 | if not dir and subdirnodes: |
|
263 | if not dir and subdirnodes: | |
262 | self.ui.status(_("checking directory manifests\n")) |
|
264 | self.ui.status(_("checking directory manifests\n")) | |
|
265 | storefiles = set() | |||
|
266 | revlogv1 = self.revlogv1 | |||
|
267 | for f, f2, size in repo.store.datafiles(): | |||
|
268 | if not f: | |||
|
269 | self.err(None, _("cannot decode filename '%s'") % f2) | |||
|
270 | elif (size > 0 or not revlogv1) and f.startswith('meta/'): | |||
|
271 | storefiles.add(_normpath(f)) | |||
|
272 | ||||
263 | for subdir, linkrevs in subdirnodes.iteritems(): |
|
273 | for subdir, linkrevs in subdirnodes.iteritems(): | |
264 | subdirfilenodes = self._verifymanifest(linkrevs, subdir) |
|
274 | subdirfilenodes = self._verifymanifest(linkrevs, subdir, storefiles) | |
265 | for f, onefilenodes in subdirfilenodes.iteritems(): |
|
275 | for f, onefilenodes in subdirfilenodes.iteritems(): | |
266 | filenodes.setdefault(f, {}).update(onefilenodes) |
|
276 | filenodes.setdefault(f, {}).update(onefilenodes) | |
267 |
|
277 | |||
|
278 | if not dir and subdirnodes: | |||
|
279 | for f in sorted(storefiles): | |||
|
280 | self.warn(_("warning: orphan revlog '%s'") % f) | |||
|
281 | ||||
268 | return filenodes |
|
282 | return filenodes | |
269 |
|
283 | |||
270 | def _crosscheckfiles(self, filelinkrevs, filenodes): |
|
284 | def _crosscheckfiles(self, filelinkrevs, filenodes): | |
@@ -402,7 +416,7 b' class verifier(object):' | |||||
402 | short(node), f) |
|
416 | short(node), f) | |
403 | ui.progress(_('checking'), None) |
|
417 | ui.progress(_('checking'), None) | |
404 |
|
418 | |||
405 | for f in storefiles: |
|
419 | for f in sorted(storefiles): | |
406 | self.warn(_("warning: orphan revlog '%s'") % f) |
|
420 | self.warn(_("warning: orphan revlog '%s'") % f) | |
407 |
|
421 | |||
408 | return len(files), revisions |
|
422 | return len(files), revisions |
@@ -517,6 +517,12 b' Verify reports missing dirlog' | |||||
517 | b/@0: parent-directory manifest refers to unknown revision 67688a370455 |
|
517 | b/@0: parent-directory manifest refers to unknown revision 67688a370455 | |
518 | b/@1: parent-directory manifest refers to unknown revision f38e85d334c5 |
|
518 | b/@1: parent-directory manifest refers to unknown revision f38e85d334c5 | |
519 | b/@2: parent-directory manifest refers to unknown revision 99c9792fd4b0 |
|
519 | b/@2: parent-directory manifest refers to unknown revision 99c9792fd4b0 | |
|
520 | warning: orphan revlog 'meta/b/bar/00manifest.i' | |||
|
521 | warning: orphan revlog 'meta/b/bar/orange/00manifest.i' | |||
|
522 | warning: orphan revlog 'meta/b/bar/orange/fly/00manifest.i' | |||
|
523 | warning: orphan revlog 'meta/b/foo/00manifest.i' | |||
|
524 | warning: orphan revlog 'meta/b/foo/apple/00manifest.i' | |||
|
525 | warning: orphan revlog 'meta/b/foo/apple/bees/00manifest.i' | |||
520 | crosschecking files in changesets and manifests |
|
526 | crosschecking files in changesets and manifests | |
521 | b/bar/fruits.txt@0: in changeset but not in manifest |
|
527 | b/bar/fruits.txt@0: in changeset but not in manifest | |
522 | b/bar/orange/fly/gnat.py@0: in changeset but not in manifest |
|
528 | b/bar/orange/fly/gnat.py@0: in changeset but not in manifest | |
@@ -524,6 +530,7 b' Verify reports missing dirlog' | |||||
524 | b/foo/apple/bees/flower.py@0: in changeset but not in manifest |
|
530 | b/foo/apple/bees/flower.py@0: in changeset but not in manifest | |
525 | checking files |
|
531 | checking files | |
526 | 8 files, 3 changesets, 10 total revisions |
|
532 | 8 files, 3 changesets, 10 total revisions | |
|
533 | 6 warnings encountered! | |||
527 | 8 integrity errors encountered! |
|
534 | 8 integrity errors encountered! | |
528 | (first damaged changeset appears to be 0) |
|
535 | (first damaged changeset appears to be 0) | |
529 | [1] |
|
536 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now