# HG changeset patch
# User TK Soh <teekaysoh@gmail.com>
# Date 2009-10-08 01:27:22
# Node ID 3bcb28131babde24d22114d044ab220bb0d901bd
# Parent  8b89202093175275b7987e9d9bc946ce22b4f517

color: add support for record extension

diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -234,6 +234,13 @@ def uisetup(ui):
         # The mq extension is not enabled
         pass
 
+    try:
+        rec = extensions.find('record')
+        _setupcmd(ui, 'record', rec.cmdtable, colordiff, _diff_effects)
+    except KeyError:
+        # The record extension is not enabled
+        pass
+
 def _setupcmd(ui, cmd, table, func, effectsmap):
     '''patch in command to command table and load effect map'''
     def nocolor(orig, *args, **opts):