# HG changeset patch # User Danek Duvall # Date 1309199802 25200 # Node ID 1e6661e098182cbb8e3cf90c9d77d27d277a2823 # Parent f0b047a24c57a8af4003667eac54aacdfc62caa9 color: be silent when falling back to ECMA-48 mode if "auto" mode was desired Don't warn about missing setab/setaf terminfo entries unless we explicitly asked for terminfo mode; fallback to ECMA-48 mode silently. diff -r f0b047a24c57 -r 1e6661e09818 hgext/color.py --- a/hgext/color.py Mon Jun 27 11:36:40 2011 -0700 +++ b/hgext/color.py Mon Jun 27 11:36:42 2011 -0700 @@ -144,8 +144,11 @@ ui.debug("no terminfo entry for %s\n" % e) del _terminfo_params[key] if not curses.tigetstr('setaf') or not curses.tigetstr('setab'): - ui.warn(_("no terminfo entry for setab/setaf: reverting to " - "ECMA-48 color\n")) + # Only warn about missing terminfo entries if we explicitly asked for + # terminfo mode. + if mode == "terminfo": + ui.warn(_("no terminfo entry for setab/setaf: reverting to " + "ECMA-48 color\n")) _terminfo_params = {} def _modesetup(ui, opts):