# HG changeset patch # User Simon Heimberg # Date 2013-06-05 20:06:02 # Node ID 8ddc3cd962babca12e774e9ae6df7179bc6c39b4 # Parent 3c3f6b83f8cbcfda555cc1a95b17027b903c9e72 color: only provide the required opt to _modesetup diff --git a/hgext/color.py b/hgext/color.py --- a/hgext/color.py +++ b/hgext/color.py @@ -159,10 +159,9 @@ def _terminfosetup(ui, mode): "ECMA-48 color\n")) _terminfo_params = {} -def _modesetup(ui, opts): +def _modesetup(ui, coloropt): global _terminfo_params - coloropt = opts['color'] auto = coloropt == 'auto' always = not auto and util.parsebool(coloropt) if not always and not auto: @@ -405,7 +404,7 @@ def uisetup(ui): colorui.__bases__ = (ui.__class__,) ui.__class__ = colorui def colorcmd(orig, ui_, opts, cmd, cmdfunc): - mode = _modesetup(ui_, opts) + mode = _modesetup(ui_, opts['color']) colorui._colormode = mode if mode: extstyles()