Patchwork [5,of,5,"] updatecaches: also warm hgtagsfnodescache

login
register
mail settings
Submitter Pierre-Yves David
Date March 11, 2019, 9:24 a.m.
Message ID <e188e0cbffdc89491391.1552296244@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39205/
State Accepted
Headers show

Comments

Pierre-Yves David - March 11, 2019, 9:24 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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