# HG changeset patch # User Pierre-Yves David # Date 2019-03-14 00:40:11 # Node ID e4ac7e63c213497fa5c30b2b8a71a8560a411e1e # Parent d121823072b8e9e8e76fadb5de04ef90ca43b32d 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`. diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -1438,7 +1438,7 @@ class manifestrevlog(object): 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 diff --git a/tests/test-clone.t b/tests/test-clone.t --- a/tests/test-clone.t +++ b/tests/test-clone.t @@ -43,7 +43,6 @@ Trigger branchcache creation: default 10:a7949464abda $ ls .hg/cache branch2-served - manifestfulltextcache (reporevlogstore !) rbc-names-v1 rbc-revs-v1 @@ -58,7 +57,6 @@ Ensure branchcache got copied over: $ ls .hg/cache branch2-served - manifestfulltextcache rbc-names-v1 rbc-revs-v1 diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t --- a/tests/test-debugcommands.t +++ b/tests/test-debugcommands.t @@ -545,7 +545,6 @@ Test cache warming command .hg/cache/tags2 .hg/cache/rbc-revs-v1 .hg/cache/rbc-names-v1 - .hg/cache/manifestfulltextcache (reporevlogstore !) .hg/cache/branch2-served Test debugcolor diff --git a/tests/test-fncache.t b/tests/test-fncache.t --- a/tests/test-fncache.t +++ b/tests/test-fncache.t @@ -88,7 +88,6 @@ Non store repo: .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 @@ Non store repo: .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 @@ Non fncache repo: .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 @@ Non fncache repo: .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 diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t --- a/tests/test-hardlinks.t +++ b/tests/test-hardlinks.t @@ -239,7 +239,6 @@ r4 has hardlinks in the working dir (not 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 @@ r4 has hardlinks in the working dir (not 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 @@ Update back to revision 12 in r4 should 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 @@ Update back to revision 12 in r4 should 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 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 @@ -71,7 +71,6 @@ new directories are setgid 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 @@ new directories are setgid 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 diff --git a/tests/test-share.t b/tests/test-share.t --- a/tests/test-share.t +++ b/tests/test-share.t @@ -34,9 +34,9 @@ share shouldn't have a full cache dir, o 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 diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t --- a/tests/test-subrepo.t +++ b/tests/test-subrepo.t @@ -1264,6 +1264,7 @@ Check that share works with subrepo ../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!