diff 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
line wrap: on
line diff
--- a/tests/test-status-color.t	Sat Oct 04 17:22:22 2014 +0900
+++ b/tests/test-status-color.t	Fri Oct 03 19:47:57 2014 -0400
@@ -152,6 +152,11 @@
   [log.date|date:        Thu Jan 01 00:00:00 1970 +0000]
   [log.summary|summary:     initial checkin]
   
+Labels on empty strings should not be displayed, labels on custom
+templates should be.
+
+  $ hg log --color=debug -T '{label("my.label",author)}\n{label("skipped.label","")}'
+  [my.label|test]
   $ touch modified added unknown ignored
   $ hg add added
   $ hg remove removed