nodemap: use data from the index in debugnodemap --dump-new
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 18 Feb 2020 18:32:55 +0100
changeset 44512 febe88a6f7f7
parent 44511 cadcc8c20860
child 44513 e7fff9c3cdac
nodemap: use data from the index in debugnodemap --dump-new It is better to run the actual code when generating a new nodemap cache from scratch. So we do. Differential Revision: https://phab.mercurial-scm.org/D8163
mercurial/debugcommands.py
--- a/mercurial/debugcommands.py	Wed Feb 12 10:53:24 2020 +0100
+++ b/mercurial/debugcommands.py	Tue Feb 18 18:32:55 2020 +0100
@@ -2109,7 +2109,10 @@
     if opts['dump_new']:
         unfi = repo.unfiltered()
         cl = unfi.changelog
-        data = nodemap.persistent_data(cl.index)
+        if util.safehasattr(cl.index, "nodemap_data_all"):
+            data = cl.index.nodemap_data_all()
+        else:
+            data = nodemap.persistent_data(cl.index)
         ui.write(data)
     elif opts['dump_disk']:
         unfi = repo.unfiltered()