##// END OF EJS Templates
doc: document that labels must have a dot in them to have an effect...
Jordi Gutiérrez Hermoso -
r52283:92c77659 default
parent child Browse files
Show More
@@ -63,10 +63,11 b' Labels'
63 63 Text receives color effects depending on the labels that it has. Many
64 64 default Mercurial commands emit labelled text. You can also define
65 65 your own labels in templates using the label function, see :hg:`help
66 templates`. A single portion of text may have more than one label. In
67 that case, effects given to the last label will override any other
68 effects. This includes the special "none" effect, which nullifies
69 other effects.
66 templates`. In order to receive effects, labels must have a dot, such
67 as `log.secret` or `branch.active`. A single portion of text may have
68 more than one label. In that case, effects given to the last label
69 will override any other effects. This includes the special "none"
70 effect, which nullifies other effects.
70 71
71 72 Labels are normally invisible. In order to see these labels and their
72 73 position in the text, use the global --color=debug option. The same
@@ -439,9 +439,10 b' def join(context, mapping, args):'
439 439
440 440 @templatefunc(b'label(label, expr)', requires={b'ui'})
441 441 def label(context, mapping, args):
442 """Apply a label to generated content. Content with
443 a label applied can result in additional post-processing, such as
444 automatic colorization."""
442 """Apply a label to generated content. Content with a label
443 applied can result in additional post-processing, such as
444 automatic colorization. In order to receive effects, labels must
445 have a dot, such as `log.secret` or `branch.active`."""
445 446 if len(args) != 2:
446 447 # i18n: "label" is a keyword
447 448 raise error.ParseError(_(b"label expects two arguments"))
General Comments 0
You need to be logged in to leave comments. Login now