##// END OF EJS Templates
color: don't fail on error messages when no curses (issue4237)...
Mads Kiilerich -
r21227:75aaae8a stable
parent child Browse files
Show More
@@ -230,7 +230,7 b' try:'
230 'cyan': (False, curses.COLOR_CYAN),
230 'cyan': (False, curses.COLOR_CYAN),
231 'white': (False, curses.COLOR_WHITE)}
231 'white': (False, curses.COLOR_WHITE)}
232 except ImportError:
232 except ImportError:
233 _terminfo_params = False
233 _terminfo_params = {}
234
234
235 _styles = {'grep.match': 'red bold',
235 _styles = {'grep.match': 'red bold',
236 'grep.linenumber': 'green',
236 'grep.linenumber': 'green',
@@ -319,4 +319,17 b' hg resolve with one unresolved, one reso'
319 \x1b[0;31;1mU a\x1b[0m (esc)
319 \x1b[0;31;1mU a\x1b[0m (esc)
320 \x1b[0;32;1mR b\x1b[0m (esc)
320 \x1b[0;32;1mR b\x1b[0m (esc)
321
321
322 color coding of error message with current availability of curses
323
324 $ hg unknowncommand > /dev/null
325 hg: unknown command 'unknowncommand'
326 [255]
327
328 color coding of error message without curses
329
330 $ echo 'raise ImportError' > curses.py
331 $ PYTHONPATH=`pwd`:$PYTHONPATH hg unknowncommand > /dev/null
332 hg: unknown command 'unknowncommand'
333 [255]
334
322 $ cd ..
335 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now