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 |
|
|
|
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 | [0;32;1mA added[0m | |
|
131 | [0;32;1mA copied[0m | |
|
132 | [0;31;1mR removed[0m | |
|
133 | [0;36;1;4m! deleted[0m | |
|
134 | [0;35;1;4m? unknown[0m |
General Comments 0
You need to be logged in to leave comments.
Login now