hgext3rd/topic/stack.py
changeset 4657 c24dabf8e848
parent 4656 dbf676c86244
child 4658 89c1b739fabe
--- a/hgext3rd/topic/stack.py	Fri May 17 17:50:25 2019 +0800
+++ b/hgext3rd/topic/stack.py	Sat May 18 16:56:47 2019 +0800
@@ -358,9 +358,16 @@
         fm.data(isentry=isentry)
 
         if idx is None:
-            fm.plain('  ')
+            spacewidth = 0
             if ui.verbose:
-                fm.plain('              ')
+                # parentheses plus short node hash
+                spacewidth = 2 + 12
+            if ui.debugflag:
+                # parentheses plus full node hash
+                spacewidth = 2 + 40
+            # s# alias width
+            spacewidth += 2
+            fm.plain(' ' * spacewidth)
         else:
             fm.write('stack_index', '%s%%d' % prefix, idx,
                      label=labelsgen('topic.stack.index', states))