# HG changeset patch # User Pierre-Yves David # Date 2020-04-05 16:32:46 # Node ID 97ebdb192b0028e44f4b6d7236aaa4c9a837645a # Parent 640d5b3bd0603c532e32cef13ae0119f1feeb42a nodemap: also warm manifest nodemap with other caches The `hg debugupdatecache` command now also warm the persistent nodemap for the manifest (when applicable). Differential Revision: https://phab.mercurial-scm.org/D8411 diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py --- a/mercurial/interfaces/repository.py +++ b/mercurial/interfaces/repository.py @@ -1395,6 +1395,9 @@ class imanifestlog(interfaceutil.Interfa Raises ``error.LookupError`` if the node is not known. """ + def update_caches(transaction): + """update whatever cache are relevant for the used storage.""" + class ilocalrepositoryfilestorage(interfaceutil.Interface): """Local repository sub-interface providing access to tracked file storage. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2509,6 +2509,7 @@ class localrepository(object): unfi = self.unfiltered() self.changelog.update_caches(transaction=tr) + self.manifestlog.update_caches(transaction=tr) rbc = unfi.revbranchcache() for r in unfi.changelog: diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -1951,6 +1951,9 @@ class manifestlog(object): def rev(self, node): return self._rootstore.rev(node) + def update_caches(self, transaction): + return self._rootstore._revlog.update_caches(transaction=transaction) + @interfaceutil.implementer(repository.imanifestrevisionwritable) class memmanifestctx(object):