mercurial/commands.py
changeset 38430 5d9b765dbe15
parent 38421 7fbb5d76c555
child 38451 3c07e0b1f6c6
--- a/mercurial/commands.py	Fri Jun 08 22:10:22 2018 +0900
+++ b/mercurial/commands.py	Fri Jun 08 22:16:23 2018 +0900
@@ -5438,6 +5438,7 @@
     opts = pycompat.byteskwargs(opts)
     ui.pager('tags')
     fm = ui.formatter('tags', opts)
+    contexthint = fm.contexthint('tag rev node type')
     hexfunc = fm.hexfunc
     tagtype = ""
 
@@ -5450,6 +5451,8 @@
             tagtype = 'local'
 
         fm.startitem()
+        if 'ctx' in contexthint:
+            fm.context(ctx=repo[n])
         fm.write('tag', '%s', t, label=label)
         fmt = " " * (30 - encoding.colwidth(t)) + ' %5d:%s'
         fm.condwrite(not ui.quiet, 'rev node', fmt,