[PATCH 5 of 5 "] updatecaches: also warm hgtagsfnodescache

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Mar 11 05:24:04 EDT 2019


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1552268118 -3600
#      Mon Mar 11 02:35:18 2019 +0100
# Node ID e188e0cbffdc8949139161a6c477d233ab80f9bc
# Parent  988da9c806a11bc735adee84823b4eee7a8a0f9c
# EXP-Topic fnodecache
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r e188e0cbffdc
updatecaches: also warm hgtagsfnodescache

Now that a full update of this cache run in a reasonable amount of time, we can
warm everything when during a full update.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2095,6 +2095,8 @@ class localrepository(object):
             for ctx in self['.'].parents():
                 ctx.manifest()  # accessing the manifest is enough
 
+            # accessing fnode cache warms the cache
+            tagsmod.fnoderevs(self.ui, unfi, unfi.changelog.revs())
             # accessing tags warm the cache
             self.tags()
             self.filtered('served').tags()
diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -546,6 +546,7 @@ Test cache warming command
   .hg/cache/rbc-revs-v1
   .hg/cache/rbc-names-v1
   .hg/cache/manifestfulltextcache (reporevlogstore !)
+  .hg/cache/hgtagsfnodes1
   .hg/cache/branch2-served
 
 Test debugcolor


More information about the Mercurial-devel mailing list