Mercurial > hg
comparison tests/test-status-color.t @ 22763:7ebf91426f6a
color: omit debug label output on empty strings
This is most noticeable when using custom templates. Before this
patch, a template like {label("foo.bar", baz)} would emit
[foo.bar|]
whenever baz was empty. This cset simply omits all output when baz is
empty.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Fri, 03 Oct 2014 19:47:57 -0400 |
parents | 964dd1c491ca |
children | e955549cd045 |
comparison
equal
deleted
inserted
replaced
22762:05b3238ba901 | 22763:7ebf91426f6a |
---|---|
150 [log.tag|tag: tip] | 150 [log.tag|tag: tip] |
151 [log.user|user: test] | 151 [log.user|user: test] |
152 [log.date|date: Thu Jan 01 00:00:00 1970 +0000] | 152 [log.date|date: Thu Jan 01 00:00:00 1970 +0000] |
153 [log.summary|summary: initial checkin] | 153 [log.summary|summary: initial checkin] |
154 | 154 |
155 Labels on empty strings should not be displayed, labels on custom | |
156 templates should be. | |
157 | |
158 $ hg log --color=debug -T '{label("my.label",author)}\n{label("skipped.label","")}' | |
159 [my.label|test] | |
155 $ touch modified added unknown ignored | 160 $ touch modified added unknown ignored |
156 $ hg add added | 161 $ hg add added |
157 $ hg remove removed | 162 $ hg remove removed |
158 $ rm deleted | 163 $ rm deleted |
159 | 164 |