changeset 44745:b4537125eb3c stable

nodemap: skip persistent nodemap warming for revlog not using it Before this patch, the usual checking (especially, inline-ess) were not performed when warming the cache through `hg debugupdatecache`. This is now fixed. Differential Revision: https://phab.mercurial-scm.org/D8408
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 13 Apr 2020 18:04:55 +0200
parents 23dd43d94f50
children c36a3fcfc36b
files mercurial/revlogutils/nodemap.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/nodemap.py	Thu Apr 16 22:56:03 2020 +0200
+++ b/mercurial/revlogutils/nodemap.py	Mon Apr 13 18:04:55 2020 +0200
@@ -112,6 +112,11 @@
     To be used for updating the nodemap on disk outside of a normal transaction
     setup (eg, `debugupdatecache`).
     """
+    if revlog._inline:
+        return  # inlined revlog are too small for this to be relevant
+    if revlog.nodemap_file is None:
+        return  # we do not use persistent_nodemap on this revlog
+
     notr = _NoTransaction()
     _persist_nodemap(notr, revlog)
     for k in sorted(notr._postclose):