comparison hgext/color.py @ 9550:3bcb28131bab

color: add support for record extension
author TK Soh <teekaysoh@gmail.com>
date Thu, 08 Oct 2009 09:27:22 +0800
parents d932dc655881
children 3e698434b990
comparison
equal deleted inserted replaced
9549:8b8920209317 9550:3bcb28131bab
232 _setupcmd(ui, 'qseries', mq.cmdtable, colorqseries, _patch_effects) 232 _setupcmd(ui, 'qseries', mq.cmdtable, colorqseries, _patch_effects)
233 except KeyError: 233 except KeyError:
234 # The mq extension is not enabled 234 # The mq extension is not enabled
235 pass 235 pass
236 236
237 try:
238 rec = extensions.find('record')
239 _setupcmd(ui, 'record', rec.cmdtable, colordiff, _diff_effects)
240 except KeyError:
241 # The record extension is not enabled
242 pass
243
237 def _setupcmd(ui, cmd, table, func, effectsmap): 244 def _setupcmd(ui, cmd, table, func, effectsmap):
238 '''patch in command to command table and load effect map''' 245 '''patch in command to command table and load effect map'''
239 def nocolor(orig, *args, **opts): 246 def nocolor(orig, *args, **opts):
240 247
241 if (opts['no_color'] or opts['color'] == 'never' or 248 if (opts['no_color'] or opts['color'] == 'never' or