# HG changeset patch # User Boris Feld # Date 2018-07-25 15:11:59 # Node ID ddc1da1347722041f3209d1082d9e82cdaae0fc9 # Parent 1320df0dcaae4c00f9a6869bcd163cee3e19cca4 addremove: add associated color for the new labels We use classic color: green is added, red is removed. diff --git a/mercurial/color.py b/mercurial/color.py --- a/mercurial/color.py +++ b/mercurial/color.py @@ -83,6 +83,8 @@ except ImportError: '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', diff --git a/tests/test-diff-color.t b/tests/test-diff-color.t --- a/tests/test-diff-color.t +++ b/tests/test-diff-color.t @@ -22,7 +22,7 @@ Setup > c > EOF $ hg ci -Am adda - adding a + \x1b[0;32madding a\x1b[0m (esc) $ cat > a < c > c @@ -218,7 +218,7 @@ issue3712: test colorization of subrepo $ 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' diff --git a/tests/test-status-color.t b/tests/test-status-color.t --- a/tests/test-status-color.t +++ b/tests/test-status-color.t @@ -168,10 +168,10 @@ Make sure ui.formatted=False works $ 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 @@ check 'status -q' and some combinations $ 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