Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Tue, 04 Feb 2014 00:22:20 +0100
changeset 1324 0af7748569a8
parent 1322 95880c8fedb6 (current diff)
parent 1323 aeb658c7dbc7 (diff)
child 1326 89668f3ba3bc
Merge with stable
--- a/tests/hghave.py	Fri Jan 17 15:32:21 2014 +0000
+++ b/tests/hghave.py	Tue Feb 04 00:22:20 2014 +0100
@@ -272,7 +272,12 @@
     return os.name != 'nt' # gross approximation
 
 def has_tic():
-    return matchoutput('test -x "`which tic`"', '')
+    try:
+        import curses
+        curses.COLOR_BLUE
+        return matchoutput('test -x "`which tic`"', '')
+    except ImportError:
+        return False
 
 def has_msys():
     return os.getenv('MSYSTEM')
@@ -324,7 +329,7 @@
     "svn-bindings": (has_svn_bindings, "subversion python bindings"),
     "symlink": (has_symlink, "symbolic links"),
     "system-sh": (has_system_sh, "system() uses sh"),
-    "tic": (has_tic, "terminfo compiler"),
+    "tic": (has_tic, "terminfo compiler and curses module"),
     "tla": (has_tla, "GNU Arch tla client"),
     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
     "windows": (has_windows, "Windows"),