Patchwork D3066: tests: teach test-fncache.t about the simple store

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

Comments

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

REVISION SUMMARY
  Despite the size, this is pretty straightforward.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-fncache.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel
phabricator - April 4, 2018, 5:56 p.m.
indygreg abandoned this revision.
indygreg added a comment.


  I'm just going to disable this test unless fncache is enabled. That will be simpler.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/tests/test-fncache.t b/tests/test-fncache.t
--- a/tests/test-fncache.t
+++ b/tests/test-fncache.t
@@ -7,7 +7,9 @@ 
   adding a
   $ hg ci -m first
   $ cat .hg/store/fncache | sort
-  data/a.i
+  data/a.i (reporevlogstore !)
+  data/a/f62022d3d590043fa311a6f49c238b13c9d12709 (reposimplestore !)
+  data/a/index (reposimplestore !)
 
 Testing a.i/b:
 
@@ -17,8 +19,12 @@ 
   adding a.i/b
   $ hg ci -m second
   $ cat .hg/store/fncache | sort
-  data/a.i
-  data/a.i.hg/b.i
+  data/a.i (reporevlogstore !)
+  data/a.i.hg/b.i (reporevlogstore !)
+  data/a.i.hg/b/87213410d500fe45662db2a54f759a46c27192bb (reposimplestore !)
+  data/a.i.hg/b/index (reposimplestore !)
+  data/a/f62022d3d590043fa311a6f49c238b13c9d12709 (reposimplestore !)
+  data/a/index (reposimplestore !)
 
 Testing a.i.hg/c:
 
@@ -28,9 +34,15 @@ 
   adding a.i.hg/c
   $ hg ci -m third
   $ cat .hg/store/fncache | sort
-  data/a.i
-  data/a.i.hg.hg/c.i
-  data/a.i.hg/b.i
+  data/a.i (reporevlogstore !)
+  data/a.i.hg.hg/c.i (reporevlogstore !)
+  data/a.i.hg/b.i (reporevlogstore !)
+  data/a.i.hg.hg/c/d81723aa78f2dd2d77884d165313984fcc9e5893 (reposimplestore !)
+  data/a.i.hg.hg/c/index (reposimplestore !)
+  data/a.i.hg/b/87213410d500fe45662db2a54f759a46c27192bb (reposimplestore !)
+  data/a.i.hg/b/index (reposimplestore !)
+  data/a/f62022d3d590043fa311a6f49c238b13c9d12709 (reposimplestore !)
+  data/a/index (reposimplestore !)
 
 Testing verify:
 
@@ -48,20 +60,34 @@ 
   checking manifests
   crosschecking files in changesets and manifests
   checking files
-   warning: revlog 'data/a.i' not in fncache!
-   warning: revlog 'data/a.i.hg/c.i' not in fncache!
-   warning: revlog 'data/a.i/b.i' not in fncache!
+   warning: revlog 'data/a.i' not in fncache! (reporevlogstore !)
+   warning: revlog 'data/a.i.hg/c.i' not in fncache! (reporevlogstore !)
+   warning: revlog 'data/a.i/b.i' not in fncache! (reporevlogstore !)
+   warning: revlog 'data/a/f62022d3d590043fa311a6f49c238b13c9d12709' not in fncache! (reposimplestore !)
+   warning: revlog 'data/a/index' not in fncache! (reposimplestore !)
+   warning: revlog 'data/a.i.hg/c/index' not in fncache! (reposimplestore !)
+   warning: revlog 'data/a.i.hg/c/d81723aa78f2dd2d77884d165313984fcc9e5893' not in fncache! (reposimplestore !)
+   warning: revlog 'data/a.i/b/87213410d500fe45662db2a54f759a46c27192bb' not in fncache! (reposimplestore !)
+   warning: revlog 'data/a.i/b/index' not in fncache! (reposimplestore !)
   3 files, 3 changesets, 3 total revisions
-  3 warnings encountered!
+  3 warnings encountered! (reporevlogstore !)
+  6 warnings encountered! (reposimplestore !)
   hint: run "hg debugrebuildfncache" to recover from corrupt fncache
 
 Follow the hint to make sure it works
 
   $ hg debugrebuildfncache
-  adding data/a.i
-  adding data/a.i.hg/c.i
-  adding data/a.i/b.i
-  3 items added, 0 removed from fncache
+  adding data/a.i (reporevlogstore !)
+  adding data/a.i.hg/c.i (reporevlogstore !)
+  adding data/a.i/b.i (reporevlogstore !)
+  adding data/a.i.hg/c/d81723aa78f2dd2d77884d165313984fcc9e5893 (reposimplestore !)
+  adding data/a.i.hg/c/index (reposimplestore !)
+  adding data/a.i/b/87213410d500fe45662db2a54f759a46c27192bb (reposimplestore !)
+  adding data/a.i/b/index (reposimplestore !)
+  adding data/a/f62022d3d590043fa311a6f49c238b13c9d12709 (reposimplestore !)
+  adding data/a/index (reposimplestore !)
+  3 items added, 0 removed from fncache (reporevlogstore !)
+  6 items added, 0 removed from fncache (reposimplestore !)
 
   $ hg verify
   checking changesets
@@ -90,7 +116,10 @@ 
   .hg/cache/rbc-revs-v1
   .hg/data
   .hg/data/tst.d.hg
-  .hg/data/tst.d.hg/foo.i
+  .hg/data/tst.d.hg/foo.i (reporevlogstore !)
+  .hg/data/tst.d.hg/foo (reposimplestore !)
+  .hg/data/tst.d.hg/foo/2ed2a3912a0b24502043eae84ee4b279c18b90dd (reposimplestore !)
+  .hg/data/tst.d.hg/foo/index (reposimplestore !)
   .hg/dirstate
   .hg/fsmonitor.state (fsmonitor !)
   .hg/last-message.txt
@@ -130,7 +159,10 @@ 
   .hg/store/00manifest.i
   .hg/store/data
   .hg/store/data/tst.d.hg
-  .hg/store/data/tst.d.hg/_foo.i
+  .hg/store/data/tst.d.hg/_foo.i (reporevlogstore !)
+  .hg/store/data/tst.d.hg/_foo (reposimplestore !)
+  .hg/store/data/tst.d.hg/_foo/2ed2a3912a0b24502043eae84ee4b279c18b90dd (reposimplestore !)
+  .hg/store/data/tst.d.hg/_foo/index (reposimplestore !)
   .hg/store/phaseroots
   .hg/store/undo
   .hg/store/undo.backupfiles
@@ -194,11 +226,11 @@ 
   $ find .hg/store -name *.i  | sort
   .hg/store/00changelog.i
   .hg/store/00manifest.i
-  .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i
-  .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i
-  .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i
-  .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i
-  .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i
+  .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i (reporevlogstore !)
+  .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i (reporevlogstore !)
+  .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i (reporevlogstore !)
+  .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i (reporevlogstore !)
+  .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i (reporevlogstore !)
 
   $ cd ..
 
@@ -246,8 +278,10 @@ 
   $ hg ci -qAm y
   abort: forced lock failure
   [255]
-  $ cat .hg/store/fncache
-  data/y.i
+  $ cat .hg/store/fncache | sort
+  data/y.i (reporevlogstore !)
+  data/y/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
+  data/y/index (reposimplestore !)
 
 Aborting transaction prevents fncache change
 
@@ -282,8 +316,10 @@ 
   rollback completed
   abort: forced transaction failure
   [255]
-  $ cat .hg/store/fncache
-  data/y.i
+  $ cat .hg/store/fncache | sort
+  data/y.i (reporevlogstore !)
+  data/y/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
+  data/y/index (reposimplestore !)
 
 Aborted transactions can be recovered later
 
@@ -328,17 +364,22 @@ 
   $ hg ci -qAm z 2>/dev/null
   [255]
   $ cat .hg/store/fncache | sort
-  data/y.i
-  data/z.i
+  data/y.i (reporevlogstore !)
+  data/z.i (reporevlogstore !)
+  data/y/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
+  data/y/index (reposimplestore !)
+
   $ hg recover
   rolling back interrupted transaction
   checking changesets
   checking manifests
   crosschecking files in changesets and manifests
   checking files
   1 files, 1 changesets, 1 total revisions
-  $ cat .hg/store/fncache
-  data/y.i
+  $ cat .hg/store/fncache | sort
+  data/y.i (reporevlogstore !)
+  data/y/b80de5d138758541c5f05265ad144ab9fa86d1db (reposimplestore !)
+  data/y/index (reposimplestore !)
 
   $ cd ..
 
@@ -370,31 +411,45 @@ 
   adding foo
 
   $ cat .hg/store/fncache | sort
-  data/.bar.i
-  data/foo.i
+  data/.bar.i (reporevlogstore !)
+  data/foo.i (reporevlogstore !)
+  data/.bar/bb212e613448bd83ecb63be18e3e59f509e15664 (reposimplestore !)
+  data/.bar/index (reposimplestore !)
+  data/foo/bb212e613448bd83ecb63be18e3e59f509e15664 (reposimplestore !)
+  data/foo/index (reposimplestore !)
 
   $ hg debugrebuildfncache
   fncache already up to date
 
 debugrebuildfncache restores deleted fncache file
 
   $ rm -f .hg/store/fncache
   $ hg debugrebuildfncache
-  adding data/.bar.i
-  adding data/foo.i
-  2 items added, 0 removed from fncache
+  adding data/.bar.i (reporevlogstore !)
+  adding data/foo.i (reporevlogstore !)
+  adding data/.bar/bb212e613448bd83ecb63be18e3e59f509e15664 (reposimplestore !)
+  adding data/.bar/index (reposimplestore !)
+  adding data/foo/bb212e613448bd83ecb63be18e3e59f509e15664 (reposimplestore !)
+  adding data/foo/index (reposimplestore !)
+  2 items added, 0 removed from fncache (reporevlogstore !)
+  4 items added, 0 removed from fncache (reposimplestore !)
 
   $ cat .hg/store/fncache | sort
-  data/.bar.i
-  data/foo.i
+  data/.bar.i (reporevlogstore !)
+  data/foo.i (reporevlogstore !)
+  data/.bar/bb212e613448bd83ecb63be18e3e59f509e15664 (reposimplestore !)
+  data/.bar/index (reposimplestore !)
+  data/foo/bb212e613448bd83ecb63be18e3e59f509e15664 (reposimplestore !)
+  data/foo/index (reposimplestore !)
 
 Rebuild after rebuild should no-op
 
   $ hg debugrebuildfncache
   fncache already up to date
 
 A single missing file should get restored, an extra file should be removed
 
+#if reporevlogstore
   $ cat > .hg/store/fncache << EOF
   > data/foo.i
   > data/bad-entry.i
@@ -408,11 +463,35 @@ 
   $ cat .hg/store/fncache | sort
   data/.bar.i
   data/foo.i
+#endif
+
+#if reposimplestore
+  $ cat > .hg/store/fncache << EOF
+  > data/.bar/index
+  > data/.bar/bb212e613448bd83ecb63be18e3e59f509e15664
+  > data/bad-entry
+  > EOF
+
+  $ hg debugrebuildfncache
+  removing data/bad-entry
+  adding data/foo/bb212e613448bd83ecb63be18e3e59f509e15664
+  adding data/foo/index
+  2 items added, 1 removed from fncache
+
+  $ cat .hg/store/fncache | sort
+  data/.bar/bb212e613448bd83ecb63be18e3e59f509e15664
+  data/.bar/index
+  data/foo/bb212e613448bd83ecb63be18e3e59f509e15664
+  data/foo/index
+
+#endif
 
   $ cd ..
 
 Try a simple variation without dotencode to ensure fncache is ignorant of encoding
 
+#if reporevlogstore
+
   $ hg --config format.dotencode=false init nodotencode
   $ cd nodotencode
   $ echo initial > foo
@@ -434,3 +513,5 @@ 
   $ cat .hg/store/fncache | sort
   data/.bar.i
   data/foo.i
+
+#endif