# HG changeset patch # User Sean Farley # Date 1396903047 18000 # Node ID a8db48e997b57c64aa646ec2762e37bbc7a17482 # Parent 05086b56b56406962d26719bc9689a60e7f2e0f3 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" diff -r 05086b56b564 -r a8db48e997b5 hgext/color.py --- 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)