[PATCH 8 of 8 git-diff] patch: add label for coloring the similarity extended header
Sean Farley
sean at farley.io
Mon Jan 9 14:49:41 EST 2017
# HG changeset patch
# User Sean Farley <sean at farley.io>
# Date 1483988505 28800
# Mon Jan 09 11:01:45 2017 -0800
# Node ID 0ac83cc1715c18537e3f8087d32544db25cd29d0
# Parent 57b97693c687ab32b57bd3a75311237106992de9
patch: add label for coloring the similarity extended header
Just like the summary says, this will colorize the:
similarity index 88%
line in the diff output.
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2348,10 +2348,11 @@ def difflabel(func, *args, **kw):
('rename', 'diff.extended'),
('old', 'diff.extended'),
('new', 'diff.extended'),
('deleted', 'diff.extended'),
('index', 'diff.extended'),
+ ('similarity', 'diff.extended'),
('---', 'diff.file_a'),
('+++', 'diff.file_b')]
textprefixes = [('@', 'diff.hunk'),
('-', 'diff.deleted'),
('+', 'diff.inserted')]
More information about the Mercurial-devel
mailing list