hgext/color.py
changeset 14516 842a9179132c
parent 14495 ad6ad51cc0dd
child 14758 1e6661e09818
--- a/hgext/color.py	Thu Jun 02 00:43:34 2011 +0300
+++ b/hgext/color.py	Thu Jun 02 00:43:34 2011 +0300
@@ -349,8 +349,9 @@
         mode = _modesetup(ui_, opts)
         if mode:
             colorui._colormode = mode
-            colorui.__bases__ = (ui_.__class__,)
-            ui_.__class__ = colorui
+            if not issubclass(ui_.__class__, colorui):
+                colorui.__bases__ = (ui_.__class__,)
+                ui_.__class__ = colorui
             extstyles()
             configstyles(ui_)
         return orig(ui_, opts, cmd, cmdfunc)