templates: shorten definition of changeset labels in command-line style
authorDenis Laxalde <denis@laxalde.org>
Tue, 28 Mar 2017 22:38:45 +0200
changeset 31706 ca971140ca76
parent 31705 32f9006dae4b
child 31707 00f996f05522
templates: shorten definition of changeset labels in command-line style We'll add more labels and the line is already quite long, so let's define a variable to hold all evolution "troubles" labels.
mercurial/templates/map-cmdline.default
--- a/mercurial/templates/map-cmdline.default	Tue Mar 28 22:36:22 2017 +0200
+++ b/mercurial/templates/map-cmdline.default	Tue Mar 28 22:38:45 2017 +0200
@@ -29,7 +29,8 @@
 
 # General templates
 _trouble_label = 'trouble.{trouble}'
-_cset_labels = '{separate(" ", "log.changeset", "changeset.{phase}", "{if(troubles, "changeset.troubled {troubles%_trouble_label}")}")}'
+_troubles_labels = '{if(troubles, "changeset.troubled {troubles%_trouble_label}")}'
+_cset_labels = '{separate(" ", "log.changeset", "changeset.{phase}", "{_troubles_labels}")}'
 cset = '{label("{_cset_labels}",
                "changeset:   {rev}:{node|short}")}\n'