Patchwork [5,of,9] verify: use similar language for missing manifest and file revisions

login
register
mail settings
Submitter Martin von Zweigbergk
Date Feb. 12, 2016, 10:40 p.m.
Message ID <CAESOdVC3gg89S4C5bw8Mceiu2L+xs4wqv7JUjAUgE1=-3TU51A@mail.gmail.com>
Download mbox | patch
Permalink /patch/13159/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Feb. 12, 2016, 10:40 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1454913980 28800
#      Sun Feb 07 22:46:20 2016 -0800
# Node ID 683fb192518dfed2824cec992f5e2ac5b224c27c
# Parent  417947371ab0f3fdce01d8c5425be537d82b4552
verify: use similar language for missing manifest and file revisions

When a changeset refers to a manifest revision that's not found in the
manifest log, we say "changeset refers to missing revision X", but
when a manifest refers to file revision that's not found in the
filelog, we say "X in manifests not found". The language used for
missing manifest revisions seems clearer, so let's use that for
missing filelog revisions too.

Patch

diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -371,8 +371,8 @@ 
             if f in filenodes:
                 fns = [(lr, n) for n, lr in filenodes[f].iteritems()]
                 for lr, node in sorted(fns):
-                    self.err(lr, _("%s in manifests not found") % short(node),
-                             f)
+                    self.err(lr, _("manifest refers to unknown revision %s") %
+                             short(node), f)
         ui.progress(_('checking'), None)

         for f in storefiles:
diff --git a/tests/test-push-validation.t b/tests/test-push-validation.t
--- a/tests/test-push-validation.t
+++ b/tests/test-push-validation.t
@@ -72,7 +72,7 @@ 
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   beta@1: dddc47b3ba30 in manifests not found
+   beta@1: manifest refers to unknown revision dddc47b3ba30
   2 files, 2 changesets, 2 total revisions
   1 integrity errors encountered!
   (first damaged changeset appears to be 1)
diff --git a/tests/test-verify.t b/tests/test-verify.t
--- a/tests/test-verify.t
+++ b/tests/test-verify.t
@@ -46,13 +46,13 @@ 
   checking files
    warning: revlog 'data/FOO.txt.i' not in fncache!
    0: empty or missing FOO.txt
-   FOO.txt@0: f62022d3d590 in manifests not found
+   FOO.txt@0: manifest refers to unknown revision f62022d3d590
    warning: revlog 'data/QUICK.txt.i' not in fncache!
    0: empty or missing QUICK.txt
-   QUICK.txt@0: 88b857db8eba in manifests not found
+   QUICK.txt@0: manifest refers to unknown revision 88b857db8eba
    warning: revlog 'data/bar.txt.i' not in fncache!
    0: empty or missing bar.txt
-   bar.txt@0: 256559129457 in manifests not found
+   bar.txt@0: manifest refers to unknown revision 256559129457
   3 files, 1 changesets, 0 total revisions
   3 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
@@ -102,8 +102,8 @@ 
   $ hg verify -q
    warning: revlog 'data/file.i' not in fncache!
    0: empty or missing file
-   file@0: 362fef284ce2 in manifests not found
-   file@1: c10f2164107d in manifests not found
+   file@0: manifest refers to unknown revision 362fef284ce2
+   file@1: manifest refers to unknown revision c10f2164107d
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   3 integrity errors encountered!
@@ -130,8 +130,8 @@ 
    manifest@1: 941fc4534185 not in changesets
    warning: revlog 'data/file.i' not in fncache!
    ?: empty or missing file
-   file@0: 362fef284ce2 in manifests not found
-   file@1: c10f2164107d in manifests not found
+   file@0: manifest refers to unknown revision 362fef284ce2
+   file@1: manifest refers to unknown revision c10f2164107d
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   6 integrity errors encountered!
@@ -182,7 +182,7 @@ 

   $ cp -f .hg/store-partial/data/file.* .hg/store/data
   $ hg verify -q
-   file@1: c10f2164107d in manifests not found
+   file@1: manifest refers to unknown revision c10f2164107d
   1 integrity errors encountered!
   (first damaged changeset appears to be 1)
   [1]
@@ -208,7 +208,7 @@ 
   $ hg verify -q
    manifest@?: rev 1 points to nonexistent changeset 1
    manifest@?: 941fc4534185 not in changesets
-   file@?: c10f2164107d in manifests not found
+   file@?: manifest refers to unknown revision c10f2164107d
   3 integrity errors encountered!
   [1]
   $ cp -rT .hg/store-full .hg/store