mercurial/debugcommands.py
changeset 44309 6c07480d6659
parent 44307 c577bb4a04d4
child 44318 20e125cdd719
--- a/mercurial/debugcommands.py	Wed Jan 15 15:47:21 2020 +0100
+++ b/mercurial/debugcommands.py	Wed Jan 15 15:47:31 2020 +0100
@@ -2086,16 +2086,29 @@
 
 @command(
     b'debugnodemap',
-    [(b'', b'dump', False, _(b'write persistent binary nodemap on stdin'))],
+    [
+        (
+            b'',
+            b'dump-new',
+            False,
+            _(b'write a (new) persistent binary nodemap on stdin'),
+        ),
+        (b'', b'dump-disk', False, _(b'dump on-disk data on stdin')),
+    ],
 )
 def debugnodemap(ui, repo, **opts):
     """write and inspect on disk nodemap
     """
-    if opts['dump']:
+    if opts['dump_new']:
         unfi = repo.unfiltered()
         cl = unfi.changelog
         data = nodemap.persistent_data(cl.index)
         ui.write(data)
+    elif opts['dump_disk']:
+        unfi = repo.unfiltered()
+        cl = unfi.changelog
+        data = nodemap.persisted_data(cl)
+        ui.write(data)
 
 
 @command(