From patchwork Mon Mar 11 09:24:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,5,"] updatecaches: also warm the tags caches From: Pierre-Yves David X-Patchwork-Id: 39206 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Mon, 11 Mar 2019 10:24:01 +0100 # HG changeset patch # User Pierre-Yves David # 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 !)