Patchwork D3095: simplestore: use a custom store for the simple store repo

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 1:26 a.m.
Message ID <differential-rev-PHID-DREV-67jnn5rx73zf6rcrq7nc-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30332/
State Superseded
Headers show

Comments

phabricator - April 5, 2018, 1:26 a.m.
indygreg created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Before, we used the default store, which was based on fncache
  and dotencode. After attempting to port tests to work with the
  simple store, I realized that fncache was more trouble than it is
  worth.
  
  This commit implements a proper store type for the simple repo -
  one that isn't based off fncache.
  
  This causes a number of new test failures because of tests
  expecting the full fncache store filename encoding. I may
  extend the store format in a subsequent commit to take the
  filename encoding parts of fncache that we can take
  (basically everything except hash encoding, since that isn't
  reversible). But for now, let's use encoded store.
  
  As part of this, we implement proper requirements support for
  repos created with the simple store. This should have been
  done from the beginning, as a requirement is needed to lock
  out clients that don't understand a storage format.
  
  A new hghave feature advertising the presence of fncache in repos
  has been added. Most tests touching the fncache are now conditional
  on that feature.
  
  Other tests have added the optional repo requirement to output.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3095

AFFECTED FILES
  tests/hghave.py
  tests/simplestorerepo.py
  tests/test-clone.t
  tests/test-convert.t
  tests/test-fncache.t
  tests/test-hardlinks.t
  tests/test-hook.t
  tests/test-inherit-mode.t
  tests/test-init.t
  tests/test-narrow-clone-no-ellipsis.t
  tests/test-narrow-clone.t
  tests/test-narrow.t
  tests/test-repo-compengines.t
  tests/test-sparse-requirement.t
  tests/test-strip.t
  tests/test-subrepo-deep-nested-change.t
  tests/test-subrepo-recursion.t
  tests/test-treemanifest.t

CHANGE DETAILS




To: indygreg, durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -557,6 +557,7 @@ 
   checking files
   8 files, 4 changesets, 18 total revisions
 
+#if repofncache
 Dirlogs are included in fncache
   $ grep meta/.A/00manifest.i .hg/store/fncache
   meta/.A/00manifest.i
@@ -581,6 +582,7 @@ 
   adding meta/b/foo/apple/00manifest.i
   adding meta/b/foo/apple/bees/00manifest.i
   16 items added, 0 removed from fncache
+#endif
 
 Finish first server
   $ killdaemons.py
diff --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t
--- a/tests/test-subrepo-recursion.t
+++ b/tests/test-subrepo-recursion.t
@@ -466,7 +466,6 @@ 
   linking [          <=>                                 ] 10\r (no-eol) (esc) (reposimplestore !)
   linking [           <=>                                ] 11\r (no-eol) (esc) (reposimplestore !)
   linking [            <=>                               ] 12\r (no-eol) (esc) (reposimplestore !)
-  linking [             <=>                              ] 13\r (no-eol) (esc) (reposimplestore !)
                                                               \r (no-eol) (esc)
 #else
   $ hg clone -U . ../empty
@@ -498,7 +497,6 @@ 
   linking [            <=>                               ] 12\r (no-eol) (esc) (reposimplestore !)
   linking [             <=>                              ] 13\r (no-eol) (esc) (reposimplestore !)
   linking [              <=>                             ] 14\r (no-eol) (esc) (reposimplestore !)
-  linking [               <=>                            ] 15\r (no-eol) (esc) (reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
@@ -515,7 +513,6 @@ 
   linking [      <=>                                      ] 6\r (no-eol) (esc)
   linking [       <=>                                     ] 7\r (no-eol) (esc) (reposimplestore !)
   linking [        <=>                                    ] 8\r (no-eol) (esc) (reposimplestore !)
-  linking [         <=>                                   ] 9\r (no-eol) (esc) (reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
diff --git a/tests/test-subrepo-deep-nested-change.t b/tests/test-subrepo-deep-nested-change.t
--- a/tests/test-subrepo-deep-nested-change.t
+++ b/tests/test-subrepo-deep-nested-change.t
@@ -34,7 +34,6 @@ 
   linking [    <=>                                        ] 4\r (no-eol) (esc)
   linking [     <=>                                       ] 5\r (no-eol) (esc)
   linking [      <=>                                      ] 6\r (no-eol) (esc)
-  linking [       <=>                                     ] 7\r (no-eol) (esc) (reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   updating [===========================================>] 1/1\r (no-eol) (esc)
@@ -63,7 +62,6 @@ 
   linking [        <=>                                    ] 8\r (no-eol) (esc)
   linking [         <=>                                   ] 9\r (no-eol) (esc) (reposimplestore !)
   linking [          <=>                                 ] 10\r (no-eol) (esc) (reposimplestore !)
-  linking [           <=>                                ] 11\r (no-eol) (esc) (reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   updating [===========================================>] 3/3\r (no-eol) (esc)
@@ -75,7 +73,6 @@ 
   linking [    <=>                                        ] 4\r (no-eol) (esc)
   linking [     <=>                                       ] 5\r (no-eol) (esc)
   linking [      <=>                                      ] 6\r (no-eol) (esc)
-  linking [       <=>                                     ] 7\r (no-eol) (esc) (reposimplestore !)
   updating [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   updating to branch default
@@ -168,7 +165,6 @@ 
   linking [        <=>                                    ] 8\r (no-eol) (esc)
   linking [         <=>                                   ] 9\r (no-eol) (esc) (reposimplestore !)
   linking [          <=>                                 ] 10\r (no-eol) (esc) (reposimplestore !)
-  linking [           <=>                                ] 11\r (no-eol) (esc) (reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   updating [===========================================>] 3/3\r (no-eol) (esc)
@@ -184,7 +180,6 @@ 
   linking [        <=>                                    ] 8\r (no-eol) (esc)
   linking [         <=>                                   ] 9\r (no-eol) (esc) (reposimplestore !)
   linking [          <=>                                 ] 10\r (no-eol) (esc) (reposimplestore !)
-  linking [           <=>                                ] 11\r (no-eol) (esc) (reposimplestore !)
   updating [===========================================>] 3/3\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
@@ -200,7 +195,6 @@ 
   linking [               <=>                             ] 4\r (no-eol) (esc) (reposimplestore !)
   linking [                <=>                            ] 5\r (no-eol) (esc) (reposimplestore !)
   linking [                 <=>                           ] 6\r (no-eol) (esc) (reposimplestore !)
-  linking [                  <=>                          ] 7\r (no-eol) (esc) (reposimplestore !)
   updating [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   updating to branch default
diff --git a/tests/test-strip.t b/tests/test-strip.t
--- a/tests/test-strip.t
+++ b/tests/test-strip.t
@@ -445,15 +445,19 @@ 
 
   $ touch a
   $ hg ci -qAm a
+#if repofncache
   $ cat .hg/store/fncache | sort
   data/a.i
   data/bar.i
+#endif
 
   $ hg strip tip
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
+#if repofncache
   $ cat .hg/store/fncache
   data/bar.i
+#endif
 
 stripping an empty revset
 
diff --git a/tests/test-sparse-requirement.t b/tests/test-sparse-requirement.t
--- a/tests/test-sparse-requirement.t
+++ b/tests/test-sparse-requirement.t
@@ -22,6 +22,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
   $ hg debugsparse --config extensions.sparse= --enable-profile frontend.sparse
   $ ls
@@ -37,6 +38,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 Client without sparse enabled reacts properly
 
@@ -54,6 +56,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 And client without sparse can access
 
diff --git a/tests/test-repo-compengines.t b/tests/test-repo-compengines.t
--- a/tests/test-repo-compengines.t
+++ b/tests/test-repo-compengines.t
@@ -8,6 +8,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
   $ touch foo
   $ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text to trigger compression'
@@ -47,6 +48,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
   $ touch foo
   $ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text'
@@ -70,6 +72,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
   $ hg debugrevlog -c | grep 0x78
       0x78 (x)  :   2 (100.00%)
diff --git a/tests/test-narrow.t b/tests/test-narrow.t
--- a/tests/test-narrow.t
+++ b/tests/test-narrow.t
@@ -128,10 +128,10 @@ 
   * (glob)
   saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
   deleting data/d0/f.i (reporevlogstore !)
+  deleting meta/d0/00manifest.i (tree !)
   deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
   deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !)
   deleting data/d0/f/index (reposimplestore !)
-  deleting meta/d0/00manifest.i (tree !)
 
   $ hg log -T "{node|short}: {desc} {outsidenarrow}\n"
   *: local change to d3  (glob)
@@ -159,10 +159,10 @@ 
   looking for local changes to affected paths
   saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
   deleting data/d0/f.i (reporevlogstore !)
+  deleting meta/d0/00manifest.i (tree !)
   deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
   deleting data/d0/f/4374b5650fc5ae54ac857c0f0381971fdde376f7 (reposimplestore !)
   deleting data/d0/f/index (reposimplestore !)
-  deleting meta/d0/00manifest.i (tree !)
 
 Updates off of stripped commit if necessary
   $ hg co -r 'desc("local change to d3")' -q
@@ -178,10 +178,10 @@ 
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
   deleting data/d3/f.i (reporevlogstore !)
+  deleting meta/d3/00manifest.i (tree !)
   deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !)
   deleting data/d3/f/99fa7136105a15e2045ce3d9152e4837c5349e4d (reposimplestore !)
   deleting data/d3/f/index (reposimplestore !)
-  deleting meta/d3/00manifest.i (tree !)
   $ hg log -T '{desc}\n' -r .
   add d10/f
 Updates to nullid if necessary
@@ -201,10 +201,10 @@ 
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
   deleting data/d3/f.i (reporevlogstore !)
+  deleting meta/d3/00manifest.i (tree !)
   deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !)
   deleting data/d3/f/5ce0767945cbdbca3b924bb9fbf5143f72ab40ac (reposimplestore !)
   deleting data/d3/f/index (reposimplestore !)
-  deleting meta/d3/00manifest.i (tree !)
   $ hg id
   000000000000
   $ cd ..
@@ -224,9 +224,9 @@ 
   searching for changes
   looking for local changes to affected paths
   deleting data/d0/f.i (reporevlogstore !)
+  deleting meta/d0/00manifest.i (tree !)
   deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
   deleting data/d0/f/index (reposimplestore !)
-  deleting meta/d0/00manifest.i (tree !)
   $ hg tracked
   $ hg files
   [1]
@@ -282,15 +282,17 @@ 
   searching for changes
   looking for local changes to affected paths
   deleting data/d6/f.i (reporevlogstore !)
+  deleting meta/d6/00manifest.i (tree !)
   deleting data/d6/f/7339d30678f451ac8c3f38753beeb4cf2e1655c7 (reposimplestore !)
   deleting data/d6/f/index (reposimplestore !)
-  deleting meta/d6/00manifest.i (tree !)
   $ hg tracked
   I path:d0
   I path:d3
   I path:d9
+#if repofncache
   $ hg debugrebuildfncache
   fncache already up to date
+#endif
   $ find *
   d0
   d0/f
@@ -304,13 +306,17 @@ 
   searching for changes
   looking for local changes to affected paths
   deleting data/d3/f.i (reporevlogstore !)
+  deleting data/d3/f/2661d26c649684b482d10f91960cc3db683c38b4 (reposimplestore !)
+  deleting data/d3/f/index (reposimplestore !)
   $ hg tracked
   I path:d0
   I path:d3
   I path:d9
   X path:d3/f
+#if repofncache
   $ hg debugrebuildfncache
   fncache already up to date
+#endif
   $ find *
   d0
   d0/f
@@ -323,13 +329,17 @@ 
   looking for local changes to affected paths
   deleting data/d0/f.i (reporevlogstore !)
   deleting meta/d0/00manifest.i (tree !)
+  deleting data/d0/f/362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (reposimplestore !)
+  deleting data/d0/f/index (reposimplestore !)
   $ hg tracked
   I path:d3
   I path:d9
   X path:d0
   X path:d3/f
+#if repofncache
   $ hg debugrebuildfncache
   fncache already up to date
+#endif
   $ find *
   d9
   d9/f
diff --git a/tests/test-narrow-clone.t b/tests/test-narrow-clone.t
--- a/tests/test-narrow-clone.t
+++ b/tests/test-narrow-clone.t
@@ -32,6 +32,7 @@ 
   narrowhg-experimental
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
   $ cat .hg/narrowspec
   [includes]
diff --git a/tests/test-narrow-clone-no-ellipsis.t b/tests/test-narrow-clone-no-ellipsis.t
--- a/tests/test-narrow-clone-no-ellipsis.t
+++ b/tests/test-narrow-clone-no-ellipsis.t
@@ -28,6 +28,7 @@ 
   narrowhg-experimental
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
   $ cat .hg/narrowspec
   [includes]
diff --git a/tests/test-init.t b/tests/test-init.t
--- a/tests/test-init.t
+++ b/tests/test-init.t
@@ -23,6 +23,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
   $ echo this > local/foo
   $ hg ci --cwd local -A -m "init"
   adding foo
@@ -58,6 +59,7 @@ 
   $ checknewrepo old
   generaldelta
   revlogv1
+  testonly-simplestore (reposimplestore !)
 
 creating repo with format.usefncache=false
 
@@ -68,6 +70,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 creating repo with format.dotencode=false
 
@@ -79,6 +82,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 creating repo with format.dotencode=false
 
@@ -90,6 +94,7 @@ 
   fncache
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 test failure
 
@@ -206,6 +211,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 prepare test of init of url configured from paths
 
@@ -224,6 +230,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 verify that clone also expand urls
 
@@ -238,6 +245,7 @@ 
   generaldelta
   revlogv1
   store
+  testonly-simplestore (reposimplestore !)
 
 clone bookmarks
 
diff --git a/tests/test-inherit-mode.t b/tests/test-inherit-mode.t
--- a/tests/test-inherit-mode.t
+++ b/tests/test-inherit-mode.t
@@ -82,7 +82,7 @@ 
   00770 ./.hg/store/data/dir/
   00660 ./.hg/store/data/dir/bar.i
   00660 ./.hg/store/data/foo.i
-  00660 ./.hg/store/fncache
+  00660 ./.hg/store/fncache (repofncache !)
   00660 ./.hg/store/phaseroots
   00660 ./.hg/store/undo
   00660 ./.hg/store/undo.backupfiles
@@ -128,7 +128,7 @@ 
   00770 ../push/.hg/store/data/dir/
   00660 ../push/.hg/store/data/dir/bar.i
   00660 ../push/.hg/store/data/foo.i
-  00660 ../push/.hg/store/fncache
+  00660 ../push/.hg/store/fncache (repofncache !)
   00660 ../push/.hg/store/undo
   00660 ../push/.hg/store/undo.backupfiles
   00660 ../push/.hg/store/undo.phaseroots
diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -190,11 +190,11 @@ 
   00changelog.i
   00manifest.i
   data
-  fncache
+  fncache (repofncache !)
   journal.phaseroots
   phaseroots
   undo
-  undo.backup.fncache
+  undo.backup.fncache (repofncache !)
   undo.backupfiles
   undo.phaseroots
 
diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t
--- a/tests/test-hardlinks.t
+++ b/tests/test-hardlinks.t
@@ -49,10 +49,10 @@ 
   1 r1/.hg/store/00manifest.i
   1 r1/.hg/store/data/d1/f2.i
   1 r1/.hg/store/data/f1.i
-  1 r1/.hg/store/fncache
+  1 r1/.hg/store/fncache (repofncache !)
   1 r1/.hg/store/phaseroots
   1 r1/.hg/store/undo
-  1 r1/.hg/store/undo.backup.fncache
+  1 r1/.hg/store/undo.backup.fncache (repofncache !)
   1 r1/.hg/store/undo.backupfiles
   1 r1/.hg/store/undo.phaseroots
 
@@ -89,28 +89,28 @@ 
   2 r1/.hg/store/00manifest.i
   2 r1/.hg/store/data/d1/f2.i
   2 r1/.hg/store/data/f1.i
-  2 r1/.hg/store/fncache
+  2 r1/.hg/store/fncache (repofncache !)
   1 r1/.hg/store/phaseroots
   1 r1/.hg/store/undo
-  1 r1/.hg/store/undo.backup.fncache
+  1 r1/.hg/store/undo.backup.fncache (repofncache !)
   1 r1/.hg/store/undo.backupfiles
   1 r1/.hg/store/undo.phaseroots
 
   $ nlinksdir r2/.hg/store
   2 r2/.hg/store/00changelog.i
   2 r2/.hg/store/00manifest.i
   2 r2/.hg/store/data/d1/f2.i
   2 r2/.hg/store/data/f1.i
-  2 r2/.hg/store/fncache
+  2 r2/.hg/store/fncache (repofncache !)
 
 Repo r3 should not be hardlinked:
 
   $ nlinksdir r3/.hg/store
   1 r3/.hg/store/00changelog.i
   1 r3/.hg/store/00manifest.i
   1 r3/.hg/store/data/d1/f2.i
   1 r3/.hg/store/data/f1.i
-  1 r3/.hg/store/fncache
+  1 r3/.hg/store/fncache (repofncache !)
   1 r3/.hg/store/phaseroots
   1 r3/.hg/store/undo
   1 r3/.hg/store/undo.backupfiles
@@ -136,10 +136,10 @@ 
   1 r3/.hg/store/data/d1/f2.d
   1 r3/.hg/store/data/d1/f2.i
   1 r3/.hg/store/data/f1.i
-  1 r3/.hg/store/fncache
+  1 r3/.hg/store/fncache (repofncache !)
   1 r3/.hg/store/phaseroots
   1 r3/.hg/store/undo
-  1 r3/.hg/store/undo.backup.fncache
+  1 r3/.hg/store/undo.backup.fncache (repofncache !)
   1 r3/.hg/store/undo.backup.phaseroots
   1 r3/.hg/store/undo.backupfiles
   1 r3/.hg/store/undo.phaseroots
@@ -169,9 +169,9 @@ 
   1 r2/.hg/store/00manifest.i
   1 r2/.hg/store/data/d1/f2.i
   2 r2/.hg/store/data/f1.i
-  [12] r2/\.hg/store/fncache (re)
+  [12] r2/\.hg/store/fncache (re) (repofncache !)
 
-#if hardlink-whitelisted
+#if hardlink-whitelisted repofncache
   $ nlinksdir r2/.hg/store/fncache
   2 r2/.hg/store/fncache
 #endif
@@ -199,9 +199,9 @@ 
   1 r2/.hg/store/00manifest.i
   1 r2/.hg/store/data/d1/f2.i
   1 r2/.hg/store/data/f1.i
-  [12] r2/\.hg/store/fncache (re)
+  [12] r2/\.hg/store/fncache (re) (repofncache !)
 
-#if hardlink-whitelisted
+#if hardlink-whitelisted repofncache
   $ nlinksdir r2/.hg/store/fncache
   2 r2/.hg/store/fncache
 #endif
@@ -254,10 +254,10 @@ 
   2 r4/.hg/store/data/d1/f2.i
   2 r4/.hg/store/data/f1.i
   2 r4/.hg/store/data/f3.i
-  2 r4/.hg/store/fncache
+  2 r4/.hg/store/fncache (repofncache !)
   2 r4/.hg/store/phaseroots
   2 r4/.hg/store/undo
-  2 r4/.hg/store/undo.backup.fncache
+  2 r4/.hg/store/undo.backup.fncache (repofncache !)
   2 r4/.hg/store/undo.backup.phaseroots
   2 r4/.hg/store/undo.backupfiles
   2 r4/.hg/store/undo.phaseroots
@@ -307,7 +307,7 @@ 
   2 r4/.hg/store/fncache
   2 r4/.hg/store/phaseroots
   2 r4/.hg/store/undo
-  2 r4/.hg/store/undo.backup.fncache
+  2 r4/.hg/store/undo.backup.fncache (repofncache !)
   2 r4/.hg/store/undo.backup.phaseroots
   2 r4/.hg/store/undo.backupfiles
   2 r4/.hg/store/undo.phaseroots
diff --git a/tests/test-fncache.t b/tests/test-fncache.t
--- a/tests/test-fncache.t
+++ b/tests/test-fncache.t
@@ -1,3 +1,5 @@ 
+#require repofncache
+
 Init repo1:
 
   $ hg init repo1
diff --git a/tests/test-convert.t b/tests/test-convert.t
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -515,15 +515,11 @@ 
 
 contents of fncache file:
 
+#if repofncache
   $ cat b/.hg/store/fncache | sort
   data/a.i (reporevlogstore !)
   data/b.i (reporevlogstore !)
-  data/a/0f3078c2d7345d887b54f7c9dab0d91bfa57fd07 (reposimplestore !)
-  data/a/4271c3e84237016935a176b6f282fde2128458b0 (reposimplestore !)
-  data/a/b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (reposimplestore !)
-  data/a/index (reposimplestore !)
-  data/b/37d9b5d994eab34eda9c16b195ace52c7b129980 (reposimplestore !)
-  data/b/index (reposimplestore !)
+#endif
 
 test bogus URL
 
diff --git a/tests/test-clone.t b/tests/test-clone.t
--- a/tests/test-clone.t
+++ b/tests/test-clone.t
@@ -104,8 +104,7 @@ 
   linking: 15 (reposimplestore !)
   linking: 16 (reposimplestore !)
   linking: 17 (reposimplestore !)
-  linking: 18 (reposimplestore !)
-  linked 18 files (reposimplestore !)
+  linked 17 files (reposimplestore !)
 #else
   $ hg --debug clone -U . ../c --config progress.debug=true
   linking: 1
@@ -126,8 +125,7 @@ 
   copying: 15 (reposimplestore !)
   copying: 16 (reposimplestore !)
   copying: 17 (reposimplestore !)
-  copying: 18 (reposimplestore !)
-  copied 18 files (reposimplestore !)
+  copied 17 files (reposimplestore !)
 #endif
   $ cd ../c
 
diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -12,6 +12,8 @@ 
 
 from __future__ import absolute_import
 
+import stat
+
 from mercurial.i18n import _
 from mercurial.node import (
     bin,
@@ -26,18 +28,23 @@ 
     ancestor,
     bundlerepo,
     error,
+    extensions,
     filelog,
+    localrepo,
     mdiff,
     pycompat,
     revlog,
+    store,
 )
 
 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
 # be specifying the version(s) of Mercurial they are tested with, or
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
+REQUIREMENT = 'testonly-simplestore'
+
 def validatenode(node):
     if isinstance(node, int):
         raise ValueError('expected node; got int')
@@ -581,6 +588,36 @@ 
         self._indexdata[rev:] = []
         self._reflectindexupdate()
 
+def issimplestorefile(f, kind, st):
+    if kind != stat.S_IFREG:
+        return False
+
+    if store.isrevlog(f, kind, st):
+        return False
+
+    # Ignore transaction undo files.
+    if f.startswith('undo.'):
+        return False
+
+    # Otherwise assume it belongs to the simple store.
+    return True
+
+class simplestore(store.encodedstore):
+    def datafiles(self):
+        for x in super(simplestore, self).datafiles():
+            yield x
+
+        # Supplement with non-revlog files.
+        extrafiles = self._walk('data', True, filefilter=issimplestorefile)
+
+        for unencoded, encoded, size in extrafiles:
+            try:
+                unencoded = store.decodefilename(unencoded)
+            except KeyError:
+                unencoded = None
+
+            yield unencoded, encoded, size
+
 def reposetup(ui, repo):
     if not repo.local():
         return
@@ -593,3 +630,35 @@ 
             return filestorage(self.svfs, f)
 
     repo.__class__ = simplestorerepo
+
+def featuresetup(ui, supported):
+    supported.add(REQUIREMENT)
+
+def newreporequirements(orig, repo):
+    """Modifies default requirements for new repos to use the simple store."""
+    requirements = orig(repo)
+
+    # These requirements are only used to affect creation of the store
+    # object. We have our own store. So we can remove them.
+    # TODO do this once we feel like taking the test hit.
+    #if 'fncache' in requirements:
+    #    requirements.remove('fncache')
+    #if 'dotencode' in requirements:
+    #    requirements.remove('dotencode')
+
+    requirements.add(REQUIREMENT)
+
+    return requirements
+
+def makestore(orig, requirements, path, vfstype):
+    if REQUIREMENT not in requirements:
+        return orig(requirements, path, vfstype)
+
+    return simplestore(path, vfstype)
+
+def extsetup(ui):
+    localrepo.featuresetupfuncs.add(featuresetup)
+
+    extensions.wrapfunction(localrepo, 'newreporequirements',
+                            newreporequirements)
+    extensions.wrapfunction(store, 'store', makestore)
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -733,11 +733,12 @@ 
     features = {
         'bundlerepo',
         'revlogstore',
+        'fncache',
     }
 
     # Features that imply other features.
     implies = {
-        'simplestore': ['-revlogstore', '-bundlerepo'],
+        'simplestore': ['-revlogstore', '-bundlerepo', '-fncache'],
     }
 
     for override in os.environ.get('HGREPOFEATURES', '').split(' '):
@@ -770,3 +771,7 @@ 
 @check('repobundlerepo', 'whether we can open bundle files as repos')
 def has_repobundlerepo():
     return 'bundlerepo' in getrepofeatures()
+
+@check('repofncache', 'repository has an fncache')
+def has_repofncache():
+    return 'fncache' in getrepofeatures()