hgext/color.py
changeset 10045 d1f9640e9a67
parent 10004 af04a3dea4cd
child 10046 0c23b0b3516b
--- a/hgext/color.py	Sat Dec 12 16:54:33 2009 +0100
+++ b/hgext/color.py	Fri Dec 11 11:04:31 2009 +0100
@@ -282,10 +282,14 @@
         if (opts['no_color'] or opts['color'] == 'never' or
             (opts['color'] == 'auto' and (os.environ.get('TERM') == 'dumb'
                                           or not sys.__stdout__.isatty()))):
+            del opts['no_color']
+            del opts['color']
             return orig(*args, **opts)
 
         oldshowpatch = extensions.wrapfunction(cmdutil.changeset_printer,
                                                'showpatch', colorshowpatch)
+        del opts['no_color']
+        del opts['color']
         try:
             if func is not None:
                 return func(orig, *args, **opts)