hgext3rd/topic/stack.py
changeset 2750 bd3824d1b795
parent 2712 f19b314d8475
child 2838 1c9150e30b28
--- a/hgext3rd/topic/stack.py	Fri Jul 21 01:04:32 2017 +0200
+++ b/hgext3rd/topic/stack.py	Fri Jul 14 07:19:15 2017 +0530
@@ -10,6 +10,8 @@
 )
 from .evolvebits import builddependencies, _orderrevs, _singlesuccessor
 
+short = node.short
+
 def getstack(repo, branch=None, topic=None):
     # XXX need sorting
     if topic is not None and branch is not None:
@@ -139,9 +141,14 @@
 
         if idx is None:
             fm.plain('  ')
+            if ui.verbose:
+                fm.plain('              ')
         else:
             fm.write('topic.stack.index', '%s%%d' % prefix, idx,
                      label='topic.stack.index ' + labelsgen('topic.stack.index.%s', states))
+            if ui.verbose:
+                fm.write('topic.stack.shortnode', '(%s)', short(ctx.node()),
+                         label='topic.stack.shortnode ' + labelsgen('topic.stack.shortnode.%s', states))
         fm.write('topic.stack.state.symbol', '%s', symbol,
                  label='topic.stack.state ' + labelsgen('topic.stack.state.%s', states))
         fm.plain(' ')