Mercurial > hg
comparison hgext/color.py @ 8623:0c159aa7b329
color: replace re.split with ui.configlist
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 25 May 2009 22:54:16 +0200 |
parents | 0a4f6e1b78dc |
children | 2b3dec0ef3ae |
comparison
equal
deleted
inserted
replaced
8622:0a4f6e1b78dc | 8623:0c159aa7b329 |
---|---|
60 diff.inserted = green | 60 diff.inserted = green |
61 diff.changed = white | 61 diff.changed = white |
62 diff.trailingwhitespace = bold red_background | 62 diff.trailingwhitespace = bold red_background |
63 ''' | 63 ''' |
64 | 64 |
65 import os, re, sys | 65 import os, sys |
66 | 66 |
67 from mercurial import cmdutil, commands, extensions | 67 from mercurial import cmdutil, commands, extensions |
68 from mercurial.i18n import _ | 68 from mercurial.i18n import _ |
69 | 69 |
70 # start and stop parameters for effects | 70 # start and stop parameters for effects |
263 ('', 'color', 'auto', _("when to colorize (always, auto, or never)")), | 263 ('', 'color', 'auto', _("when to colorize (always, auto, or never)")), |
264 ('', 'no-color', None, _("don't colorize output")), | 264 ('', 'no-color', None, _("don't colorize output")), |
265 ]) | 265 ]) |
266 | 266 |
267 for status in effectsmap: | 267 for status in effectsmap: |
268 effects = ui.config('color', cmd + '.' + status) | 268 effects = ui.configlist('color', cmd + '.' + status) |
269 if effects: | 269 if effects: |
270 effectsmap[status] = re.split('\W+', effects) | 270 effectsmap[status] = effects |