Patchwork [STABLE] diff: restore original color scheme for worddiff

login
register
mail settings
Submitter Yuya Nishihara
Date April 19, 2018, 11:25 a.m.
Message ID <8cde3d58cdc88707dd61.1524137108@mimosa>
Download mbox | patch
Permalink /patch/31198/
State Accepted
Headers show

Comments

Yuya Nishihara - April 19, 2018, 11:25 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1524134784 -32400
#      Thu Apr 19 19:46:24 2018 +0900
# Branch stable
# Node ID 8cde3d58cdc88707dd61a24fdccf229e2ac83610
# Parent  68748c2c761bf6e94c0c683fff32bd551f27a1b3
diff: restore original color scheme for worddiff

I'm not young. "red dim" is nearly invisible, and "red" vs "red dim" is
too subtle to see difference. And, "underline" is necessary to highlight
whitespace changes.
Augie Fackler - April 19, 2018, 7:11 p.m.
On Thu, Apr 19, 2018 at 08:25:08PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1524134784 -32400
> #      Thu Apr 19 19:46:24 2018 +0900
> # Branch stable
> # Node ID 8cde3d58cdc88707dd61a24fdccf229e2ac83610
> # Parent  68748c2c761bf6e94c0c683fff32bd551f27a1b3
> diff: restore original color scheme for worddiff

Queued, this moderate protanomalous pair of eyes can't reliably read
"dim red" text on a black terminal window.

Many thanks!


>
> I'm not young. "red dim" is nearly invisible, and "red" vs "red dim" is
> too subtle to see difference. And, "underline" is necessary to highlight
> whitespace changes.
>
> diff --git a/mercurial/color.py b/mercurial/color.py
> --- a/mercurial/color.py
> +++ b/mercurial/color.py
> @@ -90,16 +90,16 @@ except ImportError:
>      'branches.inactive': 'none',
>      'diff.changed': 'white',
>      'diff.deleted': 'red',
> -    'diff.deleted.changed': 'red',
> -    'diff.deleted.unchanged': 'red dim',
> +    'diff.deleted.changed': 'red bold underline',
> +    'diff.deleted.unchanged': 'red',
>      'diff.diffline': 'bold',
>      'diff.extended': 'cyan bold',
>      'diff.file_a': 'red bold',
>      'diff.file_b': 'green bold',
>      'diff.hunk': 'magenta',
>      'diff.inserted': 'green',
> -    'diff.inserted.changed': 'green',
> -    'diff.inserted.unchanged': 'green dim',
> +    'diff.inserted.changed': 'green bold underline',
> +    'diff.inserted.unchanged': 'green',
>      'diff.tab': '',
>      'diff.trailingwhitespace': 'bold red_background',
>      'changeset.public': '',
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/color.py b/mercurial/color.py
--- a/mercurial/color.py
+++ b/mercurial/color.py
@@ -90,16 +90,16 @@  except ImportError:
     'branches.inactive': 'none',
     'diff.changed': 'white',
     'diff.deleted': 'red',
-    'diff.deleted.changed': 'red',
-    'diff.deleted.unchanged': 'red dim',
+    'diff.deleted.changed': 'red bold underline',
+    'diff.deleted.unchanged': 'red',
     'diff.diffline': 'bold',
     'diff.extended': 'cyan bold',
     'diff.file_a': 'red bold',
     'diff.file_b': 'green bold',
     'diff.hunk': 'magenta',
     'diff.inserted': 'green',
-    'diff.inserted.changed': 'green',
-    'diff.inserted.unchanged': 'green dim',
+    'diff.inserted.changed': 'green bold underline',
+    'diff.inserted.unchanged': 'green',
     'diff.tab': '',
     'diff.trailingwhitespace': 'bold red_background',
     'changeset.public': '',