diff tests/test-verify.t @ 49921:c84844cd523a

verify: also check dirstate The dirstate already is capable of verifying its integrity (although v2 features are not yet checked), let's run that code in `hg verify`.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 02 May 2022 11:27:20 +0200
parents 2f2682f40ea0
children d09a57ce6fc4
line wrap: on
line diff
--- a/tests/test-verify.t	Mon May 02 17:47:38 2022 +0200
+++ b/tests/test-verify.t	Mon May 02 11:27:20 2022 +0200
@@ -20,6 +20,7 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
+  checking dirstate
   checked 1 changesets with 3 changes to 3 files
 
 verify with journal
@@ -31,6 +32,7 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
+  checking dirstate
   checked 1 changesets with 3 changes to 3 files
   $ rm .hg/store/journal
 
@@ -55,6 +57,7 @@
    warning: revlog 'data/bar.txt.i' not in fncache!
    0: empty or missing bar.txt
    bar.txt@0: manifest refers to unknown revision 256559129457
+  not checking dirstate because of previous errors
   checked 1 changesets with 0 changes to 3 files
   3 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
@@ -83,6 +86,7 @@
    0: empty or missing changelog
    manifest@0: d0b6632564d4 not in changesets
    manifest@1: 941fc4534185 not in changesets
+  not checking dirstate because of previous errors
   3 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
@@ -93,6 +97,7 @@
   $ rm .hg/store/00manifest.*
   $ hg verify -q
    0: empty or missing manifest
+  not checking dirstate because of previous errors
   1 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
@@ -106,6 +111,7 @@
    0: empty or missing file
    file@0: manifest refers to unknown revision 362fef284ce2
    file@1: manifest refers to unknown revision c10f2164107d
+  not checking dirstate because of previous errors
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   3 integrity errors encountered!
@@ -119,7 +125,13 @@
   $ rm .hg/store/00manifest.*
   $ hg verify -q
   warning: orphan data file 'data/file.i'
+  warning: ignoring unknown working parent c5ddb05ab828!
+  file marked as tracked in p1 but not in manifest1
   1 warnings encountered!
+  1 integrity errors encountered!
+  dirstate inconsistent with current parent's manifest
+  1 dirstate errors
+  [1]
   $ cp -R .hg/store-full/. .hg/store
 
 Entire changelog and filelog missing
@@ -134,6 +146,7 @@
    ?: empty or missing file
    file@0: manifest refers to unknown revision 362fef284ce2
    file@1: manifest refers to unknown revision c10f2164107d
+  not checking dirstate because of previous errors
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   6 integrity errors encountered!
@@ -149,6 +162,7 @@
    0: empty or missing manifest
    warning: revlog 'data/file.i' not in fncache!
    0: empty or missing file
+  not checking dirstate because of previous errors
   1 warnings encountered!
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
   2 integrity errors encountered!
@@ -164,6 +178,7 @@
    manifest@?: 941fc4534185 not in changesets
    file@?: rev 1 points to nonexistent changeset 1
    (expected 0)
+  not checking dirstate because of previous errors
   1 warnings encountered!
   3 integrity errors encountered!
   [1]
@@ -175,6 +190,7 @@
   $ hg verify -q
    manifest@1: changeset refers to unknown revision 941fc4534185
    file@1: c10f2164107d not in manifests
+  not checking dirstate because of previous errors
   2 integrity errors encountered!
   (first damaged changeset appears to be 1)
   [1]
@@ -185,6 +201,7 @@
   $ cp -f .hg/store-partial/data/file.* .hg/store/data
   $ hg verify -q
    file@1: manifest refers to unknown revision c10f2164107d
+  not checking dirstate because of previous errors
   1 integrity errors encountered!
   (first damaged changeset appears to be 1)
   [1]
@@ -198,6 +215,7 @@
    file@?: rev 1 points to nonexistent changeset 1
    (expected 0)
    file@?: c10f2164107d not in manifests
+  not checking dirstate because of previous errors
   1 warnings encountered!
   2 integrity errors encountered!
   [1]
@@ -211,6 +229,7 @@
    manifest@?: rev 1 points to nonexistent changeset 1
    manifest@?: 941fc4534185 not in changesets
    file@?: manifest refers to unknown revision c10f2164107d
+  not checking dirstate because of previous errors
   3 integrity errors encountered!
   [1]
   $ cp -R .hg/store-full/. .hg/store
@@ -221,6 +240,7 @@
   $ cp -f .hg/store-partial/data/file.* .hg/store/data
   $ hg verify -q
    manifest@1: changeset refers to unknown revision 941fc4534185
+  not checking dirstate because of previous errors
   1 integrity errors encountered!
   (first damaged changeset appears to be 1)
   [1]
@@ -236,6 +256,7 @@
    manifest@?: d0b6632564d4 not in changesets
    file@?: rev 0 points to unexpected changeset 0
    (expected 1)
+  not checking dirstate because of previous errors
   1 warnings encountered!
   4 integrity errors encountered!
   (first damaged changeset appears to be 0)
@@ -249,6 +270,7 @@
   $ hg verify -q
    manifest@0: reading delta d0b6632564d4: * (glob)
    file@0: 362fef284ce2 not in manifests
+  not checking dirstate because of previous errors
   2 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
@@ -260,6 +282,7 @@
   >   2> /dev/null
   $ hg verify -q
    file@0: unpacking 362fef284ce2: * (glob)
+  not checking dirstate because of previous errors
   1 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
@@ -290,6 +313,7 @@
   $ hg verify -q
    a@1: broken revlog! (index a is corrupted)
   warning: orphan data file 'data/a.i'
+  not checking dirstate because of previous errors
   1 warnings encountered!
   1 integrity errors encountered!
   (first damaged changeset appears to be 1)
@@ -307,6 +331,7 @@
   checking manifests
   crosschecking files in changesets and manifests
   checking files
+  checking dirstate
   checked 1 changesets with 1 changes to 1 files
   $ cd ..
 
@@ -332,6 +357,7 @@
 
   $ hg verify -q
    base64@0: unpacking 794cee7777cb: integrity check failed on base64:0
+  not checking dirstate because of previous errors
   1 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]