mercurial/debugcommands.py
changeset 39980 d71e0ba34d9b
parent 39956 36e9d2c60837
child 40017 426cb2859013
--- a/mercurial/debugcommands.py	Mon Sep 24 19:23:50 2018 +0900
+++ b/mercurial/debugcommands.py	Wed Aug 08 23:17:16 2018 -0700
@@ -1164,6 +1164,13 @@
             ui.write("\t%d -> %d\n" % (r.rev(pp[1]), i))
     ui.write("}\n")
 
+@command('debugindexstats', [])
+def debugindexstats(ui, repo):
+    """show stats related to the changelog index"""
+    repo.changelog.shortest(nullid, 1)
+    for k, v in sorted(repo.changelog.index.stats().items()):
+        ui.write('%s: %s\n' % (k, v))
+
 @command('debuginstall', [] + cmdutil.formatteropts, '', norepo=True)
 def debuginstall(ui, **opts):
     '''test Mercurial installation