diff -r a0ec05d93c8e -r c577bb4a04d4 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Mon Feb 10 17:31:05 2020 -0500 +++ b/mercurial/debugcommands.py Wed Jan 15 15:47:12 2020 +0100 @@ -95,7 +95,10 @@ stringutil, ) -from .revlogutils import deltas as deltautil +from .revlogutils import ( + deltas as deltautil, + nodemap, +) release = lockmod.release @@ -2082,6 +2085,20 @@ @command( + b'debugnodemap', + [(b'', b'dump', False, _(b'write persistent binary nodemap on stdin'))], +) +def debugnodemap(ui, repo, **opts): + """write and inspect on disk nodemap + """ + if opts['dump']: + unfi = repo.unfiltered() + cl = unfi.changelog + data = nodemap.persistent_data(cl.index) + ui.write(data) + + +@command( b'debugobsolete', [ (b'', b'flags', 0, _(b'markers flag')),