changeset 44517:448d700e0d27

nodemap: make sure the nodemap docket is updated after the changelog It is better to have a lagging nodemap than a nodemap pointing to node that does not exists yet. (strictly speaking, the order was already right, however we make it more explicit). Differential Revision: https://phab.mercurial-scm.org/D8188
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 28 Feb 2020 00:31:14 +0100
parents 64e2f603de9d
children b2e41723f886
files mercurial/revlogutils/nodemap.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/nodemap.py	Fri Feb 28 00:29:18 2020 +0100
+++ b/mercurial/revlogutils/nodemap.py	Fri Feb 28 00:31:14 2020 +0100
@@ -72,7 +72,9 @@
         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
-    callback_id = b"revlog-persistent-nodemap-%s" % revlog.nodemap_file
+
+    # we need to happen after the changelog finalization, in that use "cl-"
+    callback_id = b"nm-revlog-persistent-nodemap-%s" % revlog.nodemap_file
     if tr.hasfinalize(callback_id):
         return  # no need to register again
     tr.addpending(