--- a/hgext/color.py Sat May 02 19:13:29 2009 +0200
+++ b/hgext/color.py Sat May 02 21:09:37 2009 +0200
@@ -232,11 +232,13 @@
_setupcmd(ui, 'outgoing', commands.table, None, _diff_effects)
_setupcmd(ui, 'tip', commands.table, None, _diff_effects)
_setupcmd(ui, 'status', commands.table, colorstatus, _status_effects)
- if ui.config('extensions', 'hgext.mq') is not None or \
- ui.config('extensions', 'mq') is not None:
- from hgext import mq
+ try:
+ mq = extensions.find('mq')
_setupcmd(ui, 'qdiff', mq.cmdtable, colordiff, _diff_effects)
_setupcmd(ui, 'qseries', mq.cmdtable, colorqseries, _patch_effects)
+ except KeyError:
+ # The mq extension is not enabled
+ pass
def _setupcmd(ui, cmd, table, func, effectsmap):
'''patch in command to command table and load effect map'''