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
--- 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()