changeset 37432:28ee8b28b213

tests: conditionalize test-treemanifest.t Parts of the test were assuming the use of revlogs with fnstore path encoding. Other parts of the test assumed we could create repos with different store encodings and that stream clone bundles worked. Make all of this conditional on running a revlog repo. Differential Revision: https://phab.mercurial-scm.org/D3112
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 04 Apr 2018 17:12:00 -0700
parents 5ac84b20f184
children 9168792422a0
files tests/test-treemanifest.t
diffstat 1 files changed, 39 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-treemanifest.t	Wed Apr 04 17:02:54 2018 -0700
+++ b/tests/test-treemanifest.t	Wed Apr 04 17:12:00 2018 -0700
@@ -474,7 +474,12 @@
 
 Test files for a subdirectory.
 
+#if reporevlogstore
   $ rm -r .hg/store/meta/~2e_a
+#endif
+#if reposimplestore
+  $ rm -r .hg/store/meta/._a
+#endif
   $ hg files -r . b
   b/bar/fruits.txt
   b/bar/orange/fly/gnat.py
@@ -490,7 +495,12 @@
 
 Test files with just includes and excludes.
 
+#if reporevlogstore
   $ rm -r .hg/store/meta/~2e_a
+#endif
+#if reposimplestore
+  $ rm -r .hg/store/meta/._a
+#endif
   $ rm -r .hg/store/meta/b/bar/orange/fly
   $ rm -r .hg/store/meta/b/foo/apple/bees
   $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
@@ -502,7 +512,12 @@
 
 Test files for a subdirectory, excluding a directory within it.
 
+#if reporevlogstore
   $ rm -r .hg/store/meta/~2e_a
+#endif
+#if reposimplestore
+  $ rm -r .hg/store/meta/._a
+#endif
   $ rm -r .hg/store/meta/b/foo
   $ hg files -r . -X path:b/foo b
   b/bar/fruits.txt
@@ -518,7 +533,12 @@
 Test files for a sub directory, including only a directory within it, and
 including an unrelated directory.
 
+#if reporevlogstore
   $ rm -r .hg/store/meta/~2e_a
+#endif
+#if reposimplestore
+  $ rm -r .hg/store/meta/._a
+#endif
   $ rm -r .hg/store/meta/b/foo
   $ hg files -r . -I path:b/bar/orange -I path:a b
   b/bar/orange/fly/gnat.py
@@ -532,7 +552,12 @@
 Test files for a pattern, including a directory, and excluding a directory
 within that.
 
+#if reporevlogstore
   $ rm -r .hg/store/meta/~2e_a
+#endif
+#if reposimplestore
+  $ rm -r .hg/store/meta/._a
+#endif
   $ rm -r .hg/store/meta/b/foo
   $ rm -r .hg/store/meta/b/bar/orange
   $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
@@ -601,12 +626,12 @@
    b/@1: parent-directory manifest refers to unknown revision f065da70369e
    b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
    b/@3: parent-directory manifest refers to unknown revision 367152e6af28
-  warning: orphan data file 'meta/b/bar/00manifest.i'
-  warning: orphan data file 'meta/b/bar/orange/00manifest.i'
-  warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i'
-  warning: orphan data file 'meta/b/foo/00manifest.i'
-  warning: orphan data file 'meta/b/foo/apple/00manifest.i'
-  warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i'
+  warning: orphan data file 'meta/b/bar/00manifest.i' (reporevlogstore !)
+  warning: orphan data file 'meta/b/bar/orange/00manifest.i' (reporevlogstore !)
+  warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i' (reporevlogstore !)
+  warning: orphan data file 'meta/b/foo/00manifest.i' (reporevlogstore !)
+  warning: orphan data file 'meta/b/foo/apple/00manifest.i' (reporevlogstore !)
+  warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i' (reporevlogstore !)
   crosschecking files in changesets and manifests
    b/bar/fruits.txt@0: in changeset but not in manifest
    b/bar/orange/fly/gnat.py@0: in changeset but not in manifest
@@ -614,7 +639,7 @@
    b/foo/apple/bees/flower.py@0: in changeset but not in manifest
   checking files
   8 files, 4 changesets, 18 total revisions
-  6 warnings encountered!
+  6 warnings encountered! (reporevlogstore !)
   9 integrity errors encountered!
   (first damaged changeset appears to be 0)
   [1]
@@ -669,6 +694,8 @@
 Tree manifest revlogs exist.
   $ find deepclone/.hg/store/meta | sort
   deepclone/.hg/store/meta
+  deepclone/.hg/store/meta/._a (reposimplestore !)
+  deepclone/.hg/store/meta/._a/00manifest.i (reposimplestore !)
   deepclone/.hg/store/meta/b
   deepclone/.hg/store/meta/b/00manifest.i
   deepclone/.hg/store/meta/b/bar
@@ -683,8 +710,8 @@
   deepclone/.hg/store/meta/b/foo/apple/00manifest.i
   deepclone/.hg/store/meta/b/foo/apple/bees
   deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i
-  deepclone/.hg/store/meta/~2e_a
-  deepclone/.hg/store/meta/~2e_a/00manifest.i
+  deepclone/.hg/store/meta/~2e_a (reporevlogstore !)
+  deepclone/.hg/store/meta/~2e_a/00manifest.i (reporevlogstore !)
 Verify passes.
   $ cd deepclone
   $ hg verify
@@ -696,6 +723,7 @@
   8 files, 4 changesets, 18 total revisions
   $ cd ..
 
+#if reporevlogstore
 Create clones using old repo formats to use in later tests
   $ hg clone --config format.usestore=False \
   >   --config experimental.changegroup3=True \
@@ -817,6 +845,8 @@
   $ hg debugbundle --spec repo-packed.hg
   none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest
 
+#endif
+
 Bundle with changegroup2 is not supported
 
   $ hg -R deeprepo bundle --all -t v2 deeprepo.bundle