Mercurial > hg
changeset 33521:de1cb83728f8
color: drop the _enabledbydefault module variable
Since color is on by default, cleanup the now useless variable in both core
and color extension.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Sat, 15 Jul 2017 14:14:46 +0200 |
parents | 6e19198cbe31 |
children | 62b29ca72d1a |
files | hgext/color.py mercurial/color.py |
diffstat | 2 files changed, 1 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/color.py Fri Jun 30 03:44:45 2017 +0200 +++ b/hgext/color.py Sat Jul 15 14:14:46 2017 +0200 @@ -18,14 +18,8 @@ from __future__ import absolute_import -from mercurial import color - # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should # be specifying the version(s) of Mercurial they are tested with, or # leave the attribute unspecified. testedwith = 'ships-with-hg-core' - -def extsetup(ui): - # change default color config - color._enabledbydefault = True
--- a/mercurial/color.py Fri Jun 30 03:44:45 2017 +0200 +++ b/mercurial/color.py Sat Jul 15 14:14:46 2017 +0200 @@ -45,8 +45,6 @@ curses = None _baseterminfoparams = {} -_enabledbydefault = True - # start and stop parameters for effects _effects = { 'none': 0, @@ -185,10 +183,7 @@ def _modesetup(ui): if ui.plain(): return None - default = 'never' - if _enabledbydefault: - default = 'auto' - config = ui.config('ui', 'color', default) + config = ui.config('ui', 'color', 'auto') if config == 'debug': return 'debug'