Mercurial > hg
diff hgext/color.py @ 31087:894bdcdc75df
color: move the 'colorlabel' call to the core 'ui' class
This bring us closer to supporting color in core natively. Core already have a
'label' method that was a no-op. We update its to call the new 'colorlabel'
function. Behavior is unchanged when colormode = None.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 23 Feb 2017 19:45:32 +0100 |
parents | e6082078c853 |
children | a2ee25ff75e5 |
line wrap: on
line diff
--- a/hgext/color.py Thu Feb 23 19:10:24 2017 +0100 +++ b/hgext/color.py Thu Feb 23 19:45:32 2017 +0100 @@ -328,11 +328,6 @@ return super(colorui, self).write_err( *[self.label(a, label) for a in args], **opts) - def label(self, msg, label): - if self._colormode is None: - return super(colorui, self).label(msg, label) - return color.colorlabel(self, msg, label) - def uisetup(ui): if ui.plain(): return