test-narrow-clone-stream: include no usefncache case which is broken
authorYuya Nishihara <yuya@tcha.org>
Sat, 10 Nov 2018 11:47:36 +0900
changeset 40583 186921bc8e66
parent 40582 a4c2788e8f48
child 40584 a694a7159125
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.
tests/test-narrow-clone-stream.t
--- a/tests/test-narrow-clone-stream.t	Sat Nov 10 11:36:22 2018 +0900
+++ b/tests/test-narrow-clone-stream.t	Sat Nov 10 11:47:36 2018 +0900
@@ -1,4 +1,4 @@
-#testcases tree flat
+#testcases tree flat-fncache flat-nofncache
 
 Tests narrow stream clones
 
@@ -11,6 +11,13 @@
   > EOF
 #endif
 
+#if flat-nofncache
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > usefncache = 0
+  > EOF
+#endif
+
 Server setup
 
   $ hg init master
@@ -54,8 +61,8 @@
 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 @@
   $ 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 @@
 
 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@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 @@
   crosschecking files in changesets and manifests
   checking files
   checked 40 changesets with 1 changes to 1 files
+#endif