comparison tests/test-evolve-obshistory.t @ 3399:4adf46158b9b

obslog: colorize the description diff shown in obslog -p This patch colorizes the description diff shown in `hg obslog -p`. The labels for the header are different from that of the patch as the main header which says `diff -r <somehash> -r <somehash> <filename>`. Next patch will hack to add that.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 11 Jan 2018 16:30:46 +0530
parents d67e6080e11b
children 6d345d7ca682
comparison
equal deleted inserted replaced
3398:d67e6080e11b 3399:4adf46158b9b
75 $ hg obslog --patch --color debug 75 $ hg obslog --patch --color debug
76 @ [evolve.node|4ae3a4151de9] [evolve.rev|(2)] [evolve.short_description|A1] 76 @ [evolve.node|4ae3a4151de9] [evolve.rev|(2)] [evolve.short_description|A1]
77 | 77 |
78 x [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0] 78 x [evolve.node|471f378eab4c] [evolve.rev|(1)] [evolve.short_description|A0]
79 [evolve.verb|rewritten](description, content) as [evolve.node|4ae3a4151de9] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)] 79 [evolve.verb|rewritten](description, content) as [evolve.node|4ae3a4151de9] by [evolve.user|test] [evolve.date|(Thu Jan 01 00:00:00 1970 +0000)]
80 --- a/471f378eab4c-changeset-description 80 [diff.deleted|--- a/471f378eab4c-changeset-description]
81 +++ b/4ae3a4151de9-changeset-description 81 [diff.inserted|+++ b/4ae3a4151de9-changeset-description]
82 @@ -1,1 +1,3 @@ 82 [diff.hunk|@@ -1,1 +1,3 @@]
83 -A0 83 [diff.deleted|-A0]
84 +A1 84 [diff.inserted|+A1]
85 + 85 [diff.inserted|+]
86 +Better commit message 86 [diff.inserted|+Better commit message]
87 87
88 [diff.diffline|diff -r 471f378eab4c -r 4ae3a4151de9 A0] 88 [diff.diffline|diff -r 471f378eab4c -r 4ae3a4151de9 A0]
89 [diff.file_a|--- a/A0 Thu Jan 01 00:00:00 1970 +0000] 89 [diff.file_a|--- a/A0 Thu Jan 01 00:00:00 1970 +0000]
90 [diff.file_b|+++ b/A0 Thu Jan 01 00:00:00 1970 +0000] 90 [diff.file_b|+++ b/A0 Thu Jan 01 00:00:00 1970 +0000]
91 [diff.hunk|@@ -1,1 +1,2 @@] 91 [diff.hunk|@@ -1,1 +1,2 @@]
96 96
97 $ hg obslog --no-graph --patch 4ae3a4151de9 97 $ hg obslog --no-graph --patch 4ae3a4151de9
98 4ae3a4151de9 (2) A1 98 4ae3a4151de9 (2) A1
99 471f378eab4c (1) A0 99 471f378eab4c (1) A0
100 rewritten(description, content) as 4ae3a4151de9 by test (Thu Jan 01 00:00:00 1970 +0000) 100 rewritten(description, content) as 4ae3a4151de9 by test (Thu Jan 01 00:00:00 1970 +0000)
101 --- a/471f378eab4c-changeset-description 101 --- a/471f378eab4c-changeset-description
102 +++ b/4ae3a4151de9-changeset-description 102 +++ b/4ae3a4151de9-changeset-description
103 @@ -1,1 +1,3 @@ 103 @@ -1,1 +1,3 @@
104 -A0 104 -A0
105 +A1 105 +A1
106 + 106 +
107 +Better commit message 107 +Better commit message
108 108
109 diff -r 471f378eab4c -r 4ae3a4151de9 A0 109 diff -r 471f378eab4c -r 4ae3a4151de9 A0
110 --- a/A0 Thu Jan 01 00:00:00 1970 +0000 110 --- a/A0 Thu Jan 01 00:00:00 1970 +0000
111 +++ b/A0 Thu Jan 01 00:00:00 1970 +0000 111 +++ b/A0 Thu Jan 01 00:00:00 1970 +0000
112 @@ -1,1 +1,2 @@ 112 @@ -1,1 +1,2 @@
113 A0 113 A0