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

Augie Fackler raf at durin42.com
Thu Apr 19 15:11:01 EDT 2018


On Thu, Apr 19, 2018 at 08:25:08PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at 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 at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list