comparison mercurial/debugcommands.py @ 44512:febe88a6f7f7

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 18 Feb 2020 18:32:55 +0100
parents 295417387769
children 6c906eaedd0d
comparison
equal deleted inserted replaced
44511:cadcc8c20860 44512:febe88a6f7f7
2107 """write and inspect on disk nodemap 2107 """write and inspect on disk nodemap
2108 """ 2108 """
2109 if opts['dump_new']: 2109 if opts['dump_new']:
2110 unfi = repo.unfiltered() 2110 unfi = repo.unfiltered()
2111 cl = unfi.changelog 2111 cl = unfi.changelog
2112 data = nodemap.persistent_data(cl.index) 2112 if util.safehasattr(cl.index, "nodemap_data_all"):
2113 data = cl.index.nodemap_data_all()
2114 else:
2115 data = nodemap.persistent_data(cl.index)
2113 ui.write(data) 2116 ui.write(data)
2114 elif opts['dump_disk']: 2117 elif opts['dump_disk']:
2115 unfi = repo.unfiltered() 2118 unfi = repo.unfiltered()
2116 cl = unfi.changelog 2119 cl = unfi.changelog
2117 nm_data = nodemap.persisted_data(cl) 2120 nm_data = nodemap.persisted_data(cl)