color: add some colors to evolve command itself
authorBoris Feld <boris.feld@octobus.net>
Wed, 17 May 2017 09:39:15 +0200
changeset 3501 7c8150697810
parent 3500 a43fdbd6f7eb
child 3502 8cf1020bd4f9
color: add some colors to evolve command itself
hgext3rd/evolve/__init__.py
hgext3rd/evolve/evolvecmd.py
tests/test-prev-next.t
--- a/hgext3rd/evolve/__init__.py	Wed Feb 14 14:53:43 2018 +0100
+++ b/hgext3rd/evolve/__init__.py	Wed May 17 09:39:15 2017 +0200
@@ -336,6 +336,7 @@
               'evolve.date': 'cyan',
               'evolve.current_rev': 'bold',
               'evolve.verb': '',
+              'evolve.operation': 'bold'
               }
 
 _pack = struct.pack
--- a/hgext3rd/evolve/evolvecmd.py	Wed Feb 14 14:53:43 2018 +0100
+++ b/hgext3rd/evolve/evolvecmd.py	Wed May 17 09:39:15 2017 +0200
@@ -136,7 +136,7 @@
     displayer = compat.changesetdisplayer(ui, repo, {'template': shorttemplate})
     target = repo[target]
     if not ui.quiet or confirm:
-        repo.ui.write(_('move:'))
+        repo.ui.write(_('move:'), label='evolve.operation')
         displayer.show(orig)
         repo.ui.write(_('atop:'))
         displayer.show(target)
@@ -192,7 +192,7 @@
 
     displayer = compat.changesetdisplayer(ui, repo, {'template': shorttemplate})
     if not ui.quiet or confirm:
-        repo.ui.write(_('recreate:'))
+        repo.ui.write(_('recreate:'), label='evolve.operation')
         displayer.show(bumped)
         repo.ui.write(_('atop:'))
         displayer.show(prec)
@@ -335,7 +335,7 @@
 
     displayer = compat.changesetdisplayer(ui, repo, {'template': shorttemplate})
     if not ui.quiet or confirm:
-        ui.write(_('merge:'))
+        ui.write(_('merge:'), label='evolve.operation')
         displayer.show(divergent)
         ui.write(_('with: '))
         displayer.show(other)
--- a/tests/test-prev-next.t	Wed Feb 14 14:53:43 2018 +0100
+++ b/tests/test-prev-next.t	Wed May 17 09:39:15 2017 +0200
@@ -194,7 +194,7 @@
 (add color output for smoke testing)
 
   $ hg next --evolve --color debug
-  move:[[evolve.rev|2]] added c
+  [evolve.operation|move:][[evolve.rev|2]] added c
   atop:[[evolve.rev|3]] added b (2)
   [ ui.status|working directory now at [evolve.node|e3b6d5df389b]]