[PATCH 2 of 5 "] updatecaches: also warm the tags caches
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Mar 11 05:24:01 EDT 2019
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1552268052 -3600
# Mon Mar 11 02:34:12 2019 +0100
# Node ID d3b70c96c0fec26e452925592a5e916e943a7abd
# Parent c081522ea066709de26be0b61c5553f095b1fd6d
# EXP-Topic fnodecache
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r d3b70c96c0fe
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.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2095,6 +2095,10 @@ class localrepository(object):
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):
diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -541,6 +541,8 @@ Test cache warming command
$ 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 !)
More information about the Mercurial-devel
mailing list