[PATCH 3 of 3] updatecaches: also warm hgtagsfnodescache

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu May 2 12:24:03 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 8e2bc8ccf591f453d417fc1bd5c77a18510b954d
# Parent  eac353183daaef0a503da8cd72b8df43f54d7fb8
# EXP-Topic fnodecache
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 8e2bc8ccf591
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
@@ -2127,6 +2127,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
@@ -545,6 +545,7 @@ Test cache warming command
   .hg/cache/tags2
   .hg/cache/rbc-revs-v1
   .hg/cache/rbc-names-v1
+  .hg/cache/hgtagsfnodes1
   .hg/cache/branch2-served
 
 Test debugcolor


More information about the Mercurial-devel mailing list