hgext/color.py
changeset 8945 7b3d837ca60e
parent 8894 868670dbc237
child 8963 a4ceae3aa7be
--- a/hgext/color.py	Wed Jun 24 19:20:59 2009 +0200
+++ b/hgext/color.py	Thu Jun 25 09:23:33 2009 -0400
@@ -261,6 +261,15 @@
     ])
 
     for status in effectsmap:
-        effects = ui.configlist('color', cmd + '.' + status)
+        configkey = cmd + '.' + status
+        effects = ui.configlist('color', configkey)
         if effects:
-            effectsmap[status] = effects
+            good = []
+            for e in effects:
+                if e in _effect_params:
+                    good.append(e)
+                else:
+                    ui.warn(_("ignoring unknown color/effect %r "
+                              "(configured in color.%s)\n")
+                            % (e, configkey))
+            effectsmap[status] = good