Mercurial > public > mercurial-scm > hg-stable
diff mercurial/color.py @ 31123:a185b903bda3
color: have the 'ui' object carry the '_colormode' directly
Before this changeset, the value was carried by the class to work around
limitation of the extensions initialisation. Now that the initialisation is
cleanly handled in 'dispatch', we can drop this work around.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 21 Feb 2017 18:22:07 +0100 |
parents | 45be7590301d |
children | 53230c5bb273 |
line wrap: on
line diff
--- a/mercurial/color.py Tue Feb 21 18:20:12 2017 +0100 +++ b/mercurial/color.py Tue Feb 21 18:22:07 2017 +0100 @@ -168,7 +168,7 @@ argument. That function both set the colormode for the ui object and read the configuration looking for custom colors and effect definitions.""" mode = _modesetup(ui, coloropts) - ui.__class__._colormode = mode + ui._colormode = mode if mode and mode != 'debug': configstyles(ui)