##// END OF EJS Templates
templates: introduce labelcset() function in map-cmdline.default as example
Yuya Nishihara -
r34717:d36a36ca default
parent child Browse files
Show More
@@ -30,19 +30,12 b" lfile_copies_switch = '{if(file_copies_s"
30 30 % ' {name} ({source})'}\n"))}'
31 31
32 32 # General templates
33 _instability_label = 'instability.{instability}'
34 _troubles_labels = '{if(instabilities, "changeset.unstable {instabilities%_instability_label}")}'
35 _obsolete_label = '{if(obsolete, "changeset.obsolete")}'
36 _cset_labels = '{separate(" ", "log.changeset", "changeset.{phase}", "{_obsolete_label}", "{_troubles_labels}")}'
37 cset = '{label("{_cset_labels}",
38 "changeset: {rev}:{node|short}")}\n'
33 cset = '{labelcset("changeset: {rev}:{node|short}")}\n'
34 fullcset = '{labelcset("changeset: {rev}:{node}")}\n'
39 35
40 36 lphase = '{label("log.phase",
41 37 "phase: {phase}")}\n'
42 38
43 fullcset = '{label("{_cset_labels}",
44 "changeset: {rev}:{node}")}\n'
45
46 39 parent = '{label("log.parent changeset.{phase}",
47 40 "parent: {rev}:{node|formatnode}")}\n'
48 41
@@ -82,3 +75,12 b' description = \'{if(desc|strip, "{label(\''
82 75 '{desc|strip}')}\n\n")}'
83 76
84 77 status = '{status} {path}\n{if(copy, " {copy}\n")}'
78
79 [templatealias]
80 labelcset(expr) = label(separate(" ",
81 "log.changeset",
82 "changeset.{phase}",
83 if(obsolete, "changeset.obsolete"),
84 if(instabilities, "changeset.unstable"),
85 instabilities % "instability.{instability}"),
86 expr)
General Comments 0
You need to be logged in to leave comments. Login now