equal
deleted
inserted
replaced
124 # Otherwise, see what the config file says. |
124 # Otherwise, see what the config file says. |
125 mode = ui.config('color', 'mode', 'auto') |
125 mode = ui.config('color', 'mode', 'auto') |
126 if mode not in ('auto', 'terminfo'): |
126 if mode not in ('auto', 'terminfo'): |
127 return |
127 return |
128 |
128 |
129 _terminfo_params.update(dict(( |
129 _terminfo_params.update((key[6:], (False, int(val))) |
130 (key[6:], (False, int(val))) |
|
131 for key, val in ui.configitems('color') |
130 for key, val in ui.configitems('color') |
132 if key.startswith('color.') |
131 if key.startswith('color.')) |
133 ))) |
|
134 |
132 |
135 try: |
133 try: |
136 curses.setupterm() |
134 curses.setupterm() |
137 except curses.error, e: |
135 except curses.error, e: |
138 _terminfo_params = {} |
136 _terminfo_params = {} |
322 _effects.update(w32effects) |
320 _effects.update(w32effects) |
323 elif mode == 'ansi': |
321 elif mode == 'ansi': |
324 _terminfo_params = {} |
322 _terminfo_params = {} |
325 elif mode == 'terminfo': |
323 elif mode == 'terminfo': |
326 _terminfosetup(ui) |
324 _terminfosetup(ui) |
327 elif mode not in ('ansi', 'terminfo'): |
325 else: |
328 return |
326 return |
329 def colorcmd(orig, ui_, opts, cmd, cmdfunc): |
327 def colorcmd(orig, ui_, opts, cmd, cmdfunc): |
330 coloropt = opts['color'] |
328 coloropt = opts['color'] |
331 auto = coloropt == 'auto' |
329 auto = coloropt == 'auto' |
332 always = util.parsebool(coloropt) |
330 always = util.parsebool(coloropt) |