Patchwork D8411: nodemap: also warm manifest nodemap with other caches

login
register
mail settings
Submitter phabricator
Date May 7, 2020, 3:34 p.m.
Message ID <0d607e0c11a32e405b05acc1558ed859@localhost.localdomain>
Download mbox | patch
Permalink /patch/46272/
State Not Applicable
Headers show

Comments

phabricator - May 7, 2020, 3:34 p.m.
Closed by commit rHG97ebdb192b00: nodemap: also warm manifest nodemap with other caches (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".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8411?vs=21226&id=21289

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8411/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8411

AFFECTED FILES
  mercurial/interfaces/repository.py
  mercurial/localrepo.py
  mercurial/manifest.py

CHANGE DETAILS




To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -1951,6 +1951,9 @@ 
     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):
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2509,6 +2509,7 @@ 
             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/interfaces/repository.py b/mercurial/interfaces/repository.py
--- a/mercurial/interfaces/repository.py
+++ b/mercurial/interfaces/repository.py
@@ -1395,6 +1395,9 @@ 
         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.