##// END OF EJS Templates
color: don't blow up if configured with unknown color (just warn).
Greg Ward -
r8945:7b3d837c default
parent child Browse files
Show More
@@ -261,6 +261,15 b' def _setupcmd(ui, cmd, table, func, effe'
261 261 ])
262 262
263 263 for status in effectsmap:
264 effects = ui.configlist('color', cmd + '.' + status)
264 configkey = cmd + '.' + status
265 effects = ui.configlist('color', configkey)
265 266 if effects:
266 effectsmap[status] = effects
267 good = []
268 for e in effects:
269 if e in _effect_params:
270 good.append(e)
271 else:
272 ui.warn(_("ignoring unknown color/effect %r "
273 "(configured in color.%s)\n")
274 % (e, configkey))
275 effectsmap[status] = good
@@ -61,6 +61,9 b' hg remove removed'
61 61 rm deleted
62 62 hg copy modified copied
63 63
64 echo "% test unknown color"
65 hg --config color.status.modified=periwinkle status --color=always
66
64 67 # Run status with 2 different flags.
65 68 # Check if result is the same or different.
66 69 # If result is not as expected, raise error
@@ -124,3 +124,11 b' adding .hgignore'
124 124 adding deleted
125 125 adding modified
126 126 adding removed
127 % test unknown color
128 ignoring unknown color/effect 'periwinkle' (configured in color.status.modified)
129 M modified
130 A added
131 A copied
132 R removed
133 ! deleted
134 ? unknown
General Comments 0
You need to be logged in to leave comments. Login now