diff hgext3rd/topic/stack.py @ 4658:89c1b739fabe

stack: remove 'topic.' prefix from colors/labels Stack is related to topics, sure, but it is also good enough to be recognized on its own.
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 28 May 2019 16:46:18 +0800
parents c24dabf8e848
children f30c1fab7155
line wrap: on
line diff
--- a/hgext3rd/topic/stack.py	Sat May 18 16:56:47 2019 +0800
+++ b/hgext3rd/topic/stack.py	Tue May 28 16:46:18 2019 +0800
@@ -249,31 +249,31 @@
     if topic is not None:
         fm.plain(_('### topic: %s')
                  % ui.label(topic, label),
-                 label='topic.stack.summary.topic')
+                 label='stack.summary.topic')
 
         if 1 < len(st.heads):
             fm.plain(' (')
             fm.plain('%d heads' % len(st.heads),
-                     label='topic.stack.summary.headcount.multiple')
+                     label='stack.summary.headcount.multiple')
             fm.plain(')')
         fm.plain('\n')
     fm.plain(_('### target: %s (branch)')
              % '+'.join(st.branches), # XXX handle multi branches
-             label='topic.stack.summary.branches')
+             label='stack.summary.branches')
     if topic is None:
         if 1 < len(st.heads):
             fm.plain(' (')
             fm.plain('%d heads' % len(st.heads),
-                     label='topic.stack.summary.headcount.multiple')
+                     label='stack.summary.headcount.multiple')
             fm.plain(')')
     else:
         if st.behindcount == -1:
             fm.plain(', ')
             fm.plain('ambiguous rebase destination - %s' % st.behinderror,
-                     label='topic.stack.summary.behinderror')
+                     label='stack.summary.behinderror')
         elif st.behindcount:
             fm.plain(', ')
-            fm.plain('%d behind' % st.behindcount, label='topic.stack.summary.behindcount')
+            fm.plain('%d behind' % st.behindcount, label='stack.summary.behindcount')
     fm.plain('\n')
 
     if not st:
@@ -370,19 +370,19 @@
             fm.plain(' ' * spacewidth)
         else:
             fm.write('stack_index', '%s%%d' % prefix, idx,
-                     label=labelsgen('topic.stack.index', states))
+                     label=labelsgen('stack.index', states))
             if ui.verbose:
                 fm.write('node', '(%s)', fm.hexfunc(ctx.node()),
-                         label=labelsgen('topic.stack.shortnode', states))
+                         label=labelsgen('stack.shortnode', states))
             else:
                 fm.data(node=fm.hexfunc(ctx.node()))
         fm.write('symbol', '%s', symbol,
-                 label=labelsgen('topic.stack.state', states))
+                 label=labelsgen('stack.state', states))
         fm.plain(' ')
         fm.write('desc', '%s', ctx.description().splitlines()[0],
-                 label=labelsgen('topic.stack.desc', states))
+                 label=labelsgen('stack.desc', states))
         fm.condwrite(states != ['clean'] and idx is not None, 'state',
-                     ' (%s)', fm.formatlist(states, 'topic.stack.state'),
-                     label=labelsgen('topic.stack.state', states))
+                     ' (%s)', fm.formatlist(states, 'stack.state'),
+                     label=labelsgen('stack.state', states))
         fm.plain('\n')
     fm.end()