changeset 20993:a8db48e997b5

color: fallback and test label as an effect With this changeset, we can now send a color name directly to the label function, e.g. $ hg log -r . -T "{label('red', node|short)}\n"
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 07 Apr 2014 15:37:27 -0500
parents 05086b56b564
children 40800668e019
files hgext/color.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/color.py	Mon Apr 07 15:33:46 2014 -0500
+++ b/hgext/color.py	Mon Apr 07 15:37:27 2014 -0500
@@ -382,6 +382,8 @@
             s = _styles.get(l, '')
             if s:
                 effects.append(s)
+            elif valideffect(l):
+                effects.append(l)
         effects = ' '.join(effects)
         if effects:
             return '\n'.join([render_effects(s, effects)