changeset 8394:850b5a7c210d

verify: detect manifest revs not in any changeset
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Thu, 14 May 2009 16:22:49 +0200
parents 59160ca338f7
children 475552c03496
files mercurial/verify.py tests/test-repair-strip.out
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/verify.py	Thu May 14 16:11:45 2009 +0200
+++ b/mercurial/verify.py	Thu May 14 16:22:49 2009 +0200
@@ -128,6 +128,8 @@
         lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest")
         if n in mflinkrevs:
             del mflinkrevs[n]
+        else:
+            err(lr, _("%s not in changesets") % short(n), "manifest")
 
         try:
             for f, fn in mf.readdelta(n).iteritems():
--- a/tests/test-repair-strip.out	Thu May 14 16:11:45 2009 +0200
+++ b/tests/test-repair-strip.out	Thu May 14 16:22:49 2009 +0200
@@ -62,7 +62,9 @@
 checking changesets
 checking manifests
  manifest@?: rev 2 points to nonexistent changeset 2
+ manifest@?: 3362547cdf64 not in changesets
  manifest@?: rev 3 points to nonexistent changeset 3
+ manifest@?: 265a85892ecb not in changesets
 crosschecking files in changesets and manifests
  c@3: in manifest but not in changeset
 checking files
@@ -71,7 +73,7 @@
  c@?: rev 0 points to nonexistent changeset 3
 3 files, 2 changesets, 4 total revisions
 1 warnings encountered!
-5 integrity errors encountered!
+7 integrity errors encountered!
 (first damaged changeset appears to be 3)
 % journal contents
 00changelog.i