Mercurial > hg
diff hgext/color.py @ 30653:b2be4ccaff1d
color: load 'colortable' from extension using an 'extraloader'
Now that we have the '_style' dictionary in core, we can use the clean and
standard 'extraloader' mechanism to load extension's 'colortable'.
color.loadcolortable
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 18 Nov 2016 18:18:15 +0100 |
parents | 1ec42bdd7874 |
children | 520af4cc34de |
line wrap: on
line diff
--- a/hgext/color.py Fri Nov 18 18:09:36 2016 +0100 +++ b/hgext/color.py Fri Nov 18 18:18:15 2016 +0100 @@ -359,10 +359,6 @@ stop = _effect_str('none') return ''.join([start, text, stop]) -def extstyles(): - for name, ext in extensions.extensions(): - color._styles.update(getattr(ext, 'colortable', {})) - def valideffect(effect): 'Determine if the effect is valid or not.' good = False @@ -460,7 +456,6 @@ mode = _modesetup(ui_, opts['color']) colorui._colormode = mode if mode and mode != 'debug': - extstyles() configstyles(ui_) return orig(ui_, opts, cmd, cmdfunc) def colorgit(orig, gitsub, commands, env=None, stream=False, cwd=None):