addremove: add associated color for the new labels
authorBoris Feld <boris.feld@octobus.net>
Wed, 25 Jul 2018 17:11:59 +0200
changeset 39091 ddc1da134772
parent 39090 1320df0dcaae
child 39092 8943c1352b6c
addremove: add associated color for the new labels We use classic color: green is added, red is removed.
mercurial/color.py
tests/test-diff-color.t
tests/test-status-color.t
--- a/mercurial/color.py	Tue Aug 14 11:39:48 2018 +0200
+++ b/mercurial/color.py	Wed Jul 25 17:11:59 2018 +0200
@@ -83,6 +83,8 @@
     'grep.filename': 'magenta',
     'grep.user': 'magenta',
     'grep.date': 'magenta',
+    'addremove.added': 'green',
+    'addremove.removed': 'red',
     'bookmarks.active': 'green',
     'branches.active': 'none',
     'branches.closed': 'black bold',
--- a/tests/test-diff-color.t	Tue Aug 14 11:39:48 2018 +0200
+++ b/tests/test-diff-color.t	Wed Jul 25 17:11:59 2018 +0200
@@ -22,7 +22,7 @@
   > c
   > EOF
   $ hg ci -Am adda
-  adding a
+  \x1b[0;32madding a\x1b[0m (esc)
   $ cat > a <<EOF
   > c
   > c
@@ -218,7 +218,7 @@
   $ hg init sub
   $ echo b > sub/b
   $ hg -R sub commit -Am 'create sub'
-  adding b
+  \x1b[0;32madding b\x1b[0m (esc)
   $ echo 'sub = sub' > .hgsub
   $ hg add .hgsub
   $ hg commit -m 'add subrepo sub'
--- a/tests/test-status-color.t	Tue Aug 14 11:39:48 2018 +0200
+++ b/tests/test-status-color.t	Wed Jul 25 17:11:59 2018 +0200
@@ -168,10 +168,10 @@
   $ touch modified removed deleted ignored
   $ echo "^ignored$" > .hgignore
   $ hg ci -A -m 'initial checkin'
-  adding .hgignore
-  adding deleted
-  adding modified
-  adding removed
+  \x1b[0;32madding .hgignore\x1b[0m (esc)
+  \x1b[0;32madding deleted\x1b[0m (esc)
+  \x1b[0;32madding modified\x1b[0m (esc)
+  \x1b[0;32madding removed\x1b[0m (esc)
   $ hg log --color=debug
   [log.changeset changeset.draft|changeset:   0:389aef86a55e]
   [log.tag|tag:         tip]
@@ -296,10 +296,10 @@
   $ touch modified removed deleted ignored
   $ echo "^ignored$" > .hgignore
   $ hg commit -A -m 'initial checkin'
-  adding .hgignore
-  adding deleted
-  adding modified
-  adding removed
+  \x1b[0;32madding .hgignore\x1b[0m (esc)
+  \x1b[0;32madding deleted\x1b[0m (esc)
+  \x1b[0;32madding modified\x1b[0m (esc)
+  \x1b[0;32madding removed\x1b[0m (esc)
   $ touch added unknown ignored
   $ hg add added
   $ echo "test" >> modified