mercurial/debugcommands.py
changeset 44290 d8b53385b1bc
parent 44145 0b475b0b0344
child 44306 a0ec05d93c8e
--- a/mercurial/debugcommands.py	Sat Feb 08 10:22:47 2020 -0500
+++ b/mercurial/debugcommands.py	Fri Feb 07 13:54:09 2020 -0500
@@ -76,6 +76,7 @@
     sshpeer,
     sslutil,
     streamclone,
+    tags as tagsmod,
     templater,
     treediscovery,
     upgrade,
@@ -3428,6 +3429,15 @@
                     ui.write(node2str(node))
             ui.write(b'\n')
 
+@command(b'debugtagscache', [])
+def debugtagscache(ui, repo):
+    """display the contents of .hg/cache/hgtagsfnodes1"""
+    cache = tagsmod.hgtagsfnodescache(repo.unfiltered())
+    for r in repo:
+        node = repo[r].node()
+        tagsnode = cache.getfnode(node, computemissing=False)
+        tagsnodedisplay = hex(tagsnode) if tagsnode else 'missing/invalid'
+        ui.write(b'%s %s %s\n' % (r, hex(node), tagsnodedisplay))
 
 @command(
     b'debugtemplate',