updatecaches: also warm the tags caches
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 11 Mar 2019 02:34:12 +0100
changeset 41934 481259af4bdf
parent 41933 2eee280a1354
child 41935 bf72e4c39f0b
updatecaches: also warm the tags caches Resolving any name requires the tags cache to be warm. We make sure that `hg debugupdatecache` warm the tag cache entry too.
mercurial/localrepo.py
tests/test-debugcommands.t
--- a/mercurial/localrepo.py	Mon Mar 11 02:32:21 2019 +0100
+++ b/mercurial/localrepo.py	Mon Mar 11 02:34:12 2019 +0100
@@ -2095,6 +2095,10 @@
             for ctx in self['.'].parents():
                 ctx.manifest()  # accessing the manifest is enough
 
+            # accessing tags warm the cache
+            self.tags()
+            self.filtered('served').tags()
+
     def invalidatecaches(self):
 
         if r'_tagscache' in vars(self):
--- a/tests/test-debugcommands.t	Mon Mar 11 02:32:21 2019 +0100
+++ b/tests/test-debugcommands.t	Mon Mar 11 02:34:12 2019 +0100
@@ -541,6 +541,8 @@
   $ hg debugupdatecaches --debug
   updating the branch cache
   $ ls -r .hg/cache/*
+  .hg/cache/tags2-served
+  .hg/cache/tags2
   .hg/cache/rbc-revs-v1
   .hg/cache/rbc-names-v1
   .hg/cache/manifestfulltextcache (reporevlogstore !)