Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.py @ 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 | 27d6956d386b 89c0c8edc9d4 |
comparison
equal
deleted
inserted
replaced
41964:d121823072b8 | 41965:e4ac7e63c213 |
---|---|
1436 def _setupmanifestcachehooks(self, repo): | 1436 def _setupmanifestcachehooks(self, repo): |
1437 """Persist the manifestfulltextcache on lock release""" | 1437 """Persist the manifestfulltextcache on lock release""" |
1438 if not util.safehasattr(repo, '_wlockref'): | 1438 if not util.safehasattr(repo, '_wlockref'): |
1439 return | 1439 return |
1440 | 1440 |
1441 self._fulltextcache._opener = repo.cachevfs | 1441 self._fulltextcache._opener = repo.wcachevfs |
1442 if repo._currentlock(repo._wlockref) is None: | 1442 if repo._currentlock(repo._wlockref) is None: |
1443 return | 1443 return |
1444 | 1444 |
1445 reporef = weakref.ref(repo) | 1445 reporef = weakref.ref(repo) |
1446 manifestrevlogref = weakref.ref(self) | 1446 manifestrevlogref = weakref.ref(self) |