diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2959,7 +2959,7 @@ class localrepository: if repository.CACHE_FILE_NODE_TAGS in caches: # accessing fnode cache warms the cache - tagsmod.fnoderevs(self.ui, unfi, unfi.changelog.revs()) + tagsmod.warm_cache(self) if repository.CACHE_TAGS_DEFAULT in caches: # accessing tags warm the cache diff --git a/mercurial/tags.py b/mercurial/tags.py --- a/mercurial/tags.py +++ b/mercurial/tags.py @@ -80,6 +80,12 @@ from .utils import stringutil # setting it) for each tag is last. +def warm_cache(repo): + """ensure the cache is properly filled""" + unfi = repo.unfiltered() + fnoderevs(repo.ui, unfi, unfi.changelog.revs()) + + def fnoderevs(ui, repo, revs): """return the list of '.hgtags' fnodes used in a set revisions