[Updated] D11483: manifestlog: also monitor `00manifestlog.n` when applicable
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Tue Sep 28 08:09:40 UTC 2021
Closed by commit rHG7970895a21cb: manifestlog: also monitor `00manifest.n` when applicable (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
CHANGED PRIOR TO COMMIT
https://phab.mercurial-scm.org/D11483?vs=30402&id=30410#toc
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11483?vs=30402&id=30410
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11483/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11483
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -159,6 +159,21 @@
return paths
+class manifestlogcache(storecache):
+ """filecache for the manifestlog"""
+
+ def __init__(self):
+ super(manifestlogcache, self).__init__()
+ _cachedfiles.add((b'00manifest.i', b''))
+ _cachedfiles.add((b'00manifest.n', b''))
+
+ def tracked_paths(self, obj):
+ paths = [self.join(obj, b'00manifest.i')]
+ if obj.store.opener.options.get(b'persistent-nodemap', False):
+ paths.append(self.join(obj, b'00manifest.n'))
+ return paths
+
+
class mixedrepostorecache(_basefilecache):
"""filecache for a mix files in .hg/store and outside"""
@@ -1697,7 +1712,7 @@
concurrencychecker=revlogchecker.get_checker(repo.ui, b'changelog'),
)
- @storecache(b'00manifest.i')
+ @manifestlogcache()
def manifestlog(self):
return self.store.manifestlog(self, self._storenarrowmatch)
To: marmoute, #hg-reviewers
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210928/2c79827e/attachment-0002.html>
More information about the Mercurial-patches
mailing list