##// END OF EJS Templates
color: Do not pass --color, --no-color parameters to wrapped function...
David Soria Parra -
r10045:d1f9640e default
parent child Browse files
Show More
@@ -282,10 +282,14 def _setupcmd(ui, cmd, table, func, effe
282 if (opts['no_color'] or opts['color'] == 'never' or
282 if (opts['no_color'] or opts['color'] == 'never' or
283 (opts['color'] == 'auto' and (os.environ.get('TERM') == 'dumb'
283 (opts['color'] == 'auto' and (os.environ.get('TERM') == 'dumb'
284 or not sys.__stdout__.isatty()))):
284 or not sys.__stdout__.isatty()))):
285 del opts['no_color']
286 del opts['color']
285 return orig(*args, **opts)
287 return orig(*args, **opts)
286
288
287 oldshowpatch = extensions.wrapfunction(cmdutil.changeset_printer,
289 oldshowpatch = extensions.wrapfunction(cmdutil.changeset_printer,
288 'showpatch', colorshowpatch)
290 'showpatch', colorshowpatch)
291 del opts['no_color']
292 del opts['color']
289 try:
293 try:
290 if func is not None:
294 if func is not None:
291 return func(orig, *args, **opts)
295 return func(orig, *args, **opts)
General Comments 0
You need to be logged in to leave comments. Login now