[PATCH 2 of 3] test-narrow-clone-stream: include no usefncache case which is broken

Yuya Nishihara yuya at tcha.org
Fri Nov 9 22:25:04 EST 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1541818056 -32400
#      Sat Nov 10 11:47:36 2018 +0900
# Node ID b299e20775e4d6d504a0ed4c81de6050dd4ad191
# Parent  2016ce0a58b83c08f110ee52feb1dd23c4179871
test-narrow-clone-stream: include no usefncache case which is broken

Since 9aeb9e2d28a7, encoded filenames are filtered by the narrow matcher,
which is clearly wrong.

diff --git a/tests/test-narrow-clone-stream.t b/tests/test-narrow-clone-stream.t
--- a/tests/test-narrow-clone-stream.t
+++ b/tests/test-narrow-clone-stream.t
@@ -1,4 +1,4 @@
-#testcases tree flat
+#testcases tree flat-fncache flat-nofncache
 
 Tests narrow stream clones
 
@@ -11,6 +11,13 @@ Tests narrow stream clones
   > EOF
 #endif
 
+#if flat-nofncache
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > usefncache = 0
+  > EOF
+#endif
+
 Server setup
 
   $ hg init master
@@ -54,8 +61,8 @@ Cloning a specific file when stream clon
 Making sure we have the correct set of requirements
 
   $ cat .hg/requires
-  dotencode
-  fncache
+  dotencode (tree flat-fncache !)
+  fncache (tree flat-fncache !)
   generaldelta
   narrowhg-experimental
   revlogv1
@@ -67,8 +74,8 @@ Making sure store has the required files
   $ ls .hg/store/
   00changelog.i
   00manifest.i
-  data
-  fncache
+  data (tree flat-fncache !)
+  fncache (tree flat-fncache !)
   meta (tree !)
   narrowspec
   undo
@@ -77,6 +84,22 @@ Making sure store has the required files
 
 Checking that repository has all the required data and not broken
 
+#if flat-nofncache
+  $ hg verify
+  checking changesets
+  checking manifests
+  crosschecking files in changesets and manifests
+  checking files
+   warning: revlog 'data/dir/src/F10.i' not in fncache!
+   9: empty or missing dir/src/F10
+   dir/src/F10 at 9: manifest refers to unknown revision 419ee72d626b
+  checked 40 changesets with 0 changes to 1 files
+  1 warnings encountered!
+  hint: run "hg debugrebuildfncache" to recover from corrupt fncache
+  2 integrity errors encountered!
+  (first damaged changeset appears to be 9)
+  [1]
+#else
   $ hg verify
   checking changesets
   checking manifests
@@ -84,3 +107,4 @@ Checking that repository has all the req
   crosschecking files in changesets and manifests
   checking files
   checked 40 changesets with 1 changes to 1 files
+#endif


More information about the Mercurial-devel mailing list