hgext/color.py
branchstable
changeset 14758 1e6661e09818
parent 14516 842a9179132c
child 14768 55db12e54450
--- 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):