changeset 41965:e4ac7e63c213

manifestcache: use `wcache` directory for manifest cache The manifest full text cache is tightly related to the working copy. We should use the `wcache` directory for it, instead of the `cache`. Otherwise, multiple shares would keep overwriting each other cache entry and we loose its benefit. This is also more consistent with the fact this cache file is protected by `wlock`.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 14 Mar 2019 00:40:11 +0000
parents d121823072b8
children 42e2c7c52e1b
files mercurial/manifest.py tests/test-clone.t tests/test-debugcommands.t tests/test-fncache.t tests/test-hardlinks.t tests/test-inherit-mode.t tests/test-share.t tests/test-subrepo.t
diffstat 8 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/manifest.py	Fri Mar 15 15:07:43 2019 +0000
+++ b/mercurial/manifest.py	Thu Mar 14 00:40:11 2019 +0000
@@ -1438,7 +1438,7 @@
         if not util.safehasattr(repo, '_wlockref'):
             return
 
-        self._fulltextcache._opener = repo.cachevfs
+        self._fulltextcache._opener = repo.wcachevfs
         if repo._currentlock(repo._wlockref) is None:
             return
 
--- a/tests/test-clone.t	Fri Mar 15 15:07:43 2019 +0000
+++ b/tests/test-clone.t	Thu Mar 14 00:40:11 2019 +0000
@@ -43,7 +43,6 @@
   default                       10:a7949464abda
   $ ls .hg/cache
   branch2-served
-  manifestfulltextcache (reporevlogstore !)
   rbc-names-v1
   rbc-revs-v1
 
@@ -58,7 +57,6 @@
 
   $ ls .hg/cache
   branch2-served
-  manifestfulltextcache
   rbc-names-v1
   rbc-revs-v1
 
--- a/tests/test-debugcommands.t	Fri Mar 15 15:07:43 2019 +0000
+++ b/tests/test-debugcommands.t	Thu Mar 14 00:40:11 2019 +0000
@@ -545,7 +545,6 @@
   .hg/cache/tags2
   .hg/cache/rbc-revs-v1
   .hg/cache/rbc-names-v1
-  .hg/cache/manifestfulltextcache (reporevlogstore !)
   .hg/cache/branch2-served
 
 Test debugcolor
--- a/tests/test-fncache.t	Fri Mar 15 15:07:43 2019 +0000
+++ b/tests/test-fncache.t	Thu Mar 14 00:40:11 2019 +0000
@@ -88,7 +88,6 @@
   .hg/00manifest.i
   .hg/cache
   .hg/cache/branch2-served
-  .hg/cache/manifestfulltextcache (reporevlogstore !)
   .hg/cache/rbc-names-v1
   .hg/cache/rbc-revs-v1
   .hg/data
@@ -111,6 +110,7 @@
   .hg/wcache/checkisexec (execbit !)
   .hg/wcache/checklink (symlink !)
   .hg/wcache/checklink-target (symlink !)
+  .hg/wcache/manifestfulltextcache (reporevlogstore !)
   $ cd ..
 
 Non fncache repo:
@@ -126,7 +126,6 @@
   .hg/00changelog.i
   .hg/cache
   .hg/cache/branch2-served
-  .hg/cache/manifestfulltextcache (reporevlogstore !)
   .hg/cache/rbc-names-v1
   .hg/cache/rbc-revs-v1
   .hg/dirstate
@@ -152,6 +151,7 @@
   .hg/wcache/checkisexec (execbit !)
   .hg/wcache/checklink (symlink !)
   .hg/wcache/checklink-target (symlink !)
+  .hg/wcache/manifestfulltextcache (reporevlogstore !)
   $ cd ..
 
 Encoding of reserved / long paths in the store
--- a/tests/test-hardlinks.t	Fri Mar 15 15:07:43 2019 +0000
+++ b/tests/test-hardlinks.t	Thu Mar 14 00:40:11 2019 +0000
@@ -239,7 +239,6 @@
   2 r4/.hg/branch
   2 r4/.hg/cache/branch2-base
   2 r4/.hg/cache/branch2-served
-  2 r4/.hg/cache/manifestfulltextcache (reporevlogstore !)
   2 r4/.hg/cache/rbc-names-v1
   2 r4/.hg/cache/rbc-revs-v1
   2 r4/.hg/dirstate
@@ -268,6 +267,7 @@
   2 r4/.hg/wcache/checkisexec (execbit !)
   2 r4/.hg/wcache/checklink-target (symlink !)
   2 r4/.hg/wcache/checknoexec (execbit !)
+  2 r4/.hg/wcache/manifestfulltextcache (reporevlogstore !)
   2 r4/d1/data1
   2 r4/d1/f2
   2 r4/f1
@@ -290,7 +290,6 @@
   1 r4/.hg/branch
   2 r4/.hg/cache/branch2-base
   2 r4/.hg/cache/branch2-served
-  1 r4/.hg/cache/manifestfulltextcache (reporevlogstore !)
   2 r4/.hg/cache/rbc-names-v1
   2 r4/.hg/cache/rbc-revs-v1
   1 r4/.hg/dirstate
@@ -319,6 +318,7 @@
   2 r4/.hg/wcache/checkisexec (execbit !)
   2 r4/.hg/wcache/checklink-target (symlink !)
   2 r4/.hg/wcache/checknoexec (execbit !)
+  1 r4/.hg/wcache/manifestfulltextcache (reporevlogstore !)
   2 r4/d1/data1
   2 r4/d1/f2
   1 r4/f1
--- a/tests/test-inherit-mode.t	Fri Mar 15 15:07:43 2019 +0000
+++ b/tests/test-inherit-mode.t	Thu Mar 14 00:40:11 2019 +0000
@@ -71,7 +71,6 @@
   00600 ./.hg/00changelog.i
   00770 ./.hg/cache/
   00660 ./.hg/cache/branch2-served
-  00660 ./.hg/cache/manifestfulltextcache (reporevlogstore !)
   00660 ./.hg/cache/rbc-names-v1
   00660 ./.hg/cache/rbc-revs-v1
   00660 ./.hg/dirstate
@@ -105,6 +104,7 @@
   00711 ./.hg/wcache/checkisexec
   007.. ./.hg/wcache/checklink (re)
   00600 ./.hg/wcache/checklink-target
+  00660 ./.hg/wcache/manifestfulltextcache (reporevlogstore !)
   00700 ./dir/
   00600 ./dir/bar
   00600 ./foo
--- a/tests/test-share.t	Fri Mar 15 15:07:43 2019 +0000
+++ b/tests/test-share.t	Thu Mar 14 00:40:11 2019 +0000
@@ -34,9 +34,9 @@
   checkisexec (execbit !)
   checklink (symlink !)
   checklink-target (symlink !)
+  manifestfulltextcache (reporevlogstore !)
   $ ls -1 ../repo1/.hg/cache
   branch2-served
-  manifestfulltextcache (reporevlogstore !)
   rbc-names-v1
   rbc-revs-v1
   tags2-visible
--- a/tests/test-subrepo.t	Fri Mar 15 15:07:43 2019 +0000
+++ b/tests/test-subrepo.t	Thu Mar 14 00:40:11 2019 +0000
@@ -1264,6 +1264,7 @@
   ../shared/subrepo-2/.hg/wcache/checkisexec (execbit !)
   ../shared/subrepo-2/.hg/wcache/checklink (symlink !)
   ../shared/subrepo-2/.hg/wcache/checklink-target (symlink !)
+  ../shared/subrepo-2/.hg/wcache/manifestfulltextcache (reporevlogstore !)
   ../shared/subrepo-2/file
   $ hg -R ../shared in
   abort: repository default not found!