# HG changeset patch
# User Christian Ebert <blacktrash@gmx.net>
# Date 1322117023 0
# Node ID 0350b6b64affde90ae90f2d3128ef3afbc5f2d80
# Parent  ab16e060541e87e63372eedc67b89b2d1a1b4029# Parent  8cbcb86e4fa86043962031fc0b9fe124a80b86d5
Merge with stable

diff -r ab16e060541e -r 0350b6b64aff tests/hghave
--- a/tests/hghave	Wed Nov 23 01:20:32 2011 +0000
+++ b/tests/hghave	Thu Nov 24 06:43:43 2011 +0000
@@ -45,7 +45,7 @@
 
 def has_cvs():
     re = r'Concurrent Versions System.*?server'
-    return matchoutput('cvs --version 2>&1', re)
+    return matchoutput('cvs --version 2>&1', re) and not has_msys()
 
 def has_darcs():
     return matchoutput('darcs --version', r'2\.[2-9]', True)
@@ -221,6 +221,9 @@
 def has_tic():
     return matchoutput('test -x "`which tic`"', '')
 
+def has_msys():
+    return os.getenv('MSYSTEM')
+
 checks = {
     "baz": (has_baz, "GNU Arch baz client"),
     "bzr": (has_bzr, "Canonical's Bazaar client"),
@@ -255,6 +258,7 @@
     "tla": (has_tla, "GNU Arch tla client"),
     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
     "windows": (has_windows, "Windows"),
+    "msys": (has_msys, "Windows with MSYS"),
 }
 
 def list_features():
diff -r ab16e060541e -r 0350b6b64aff tests/run-tests.py
--- a/tests/run-tests.py	Wed Nov 23 01:20:32 2011 +0000
+++ b/tests/run-tests.py	Thu Nov 24 06:43:43 2011 +0000
@@ -593,6 +593,8 @@
     f.close()
 
     script = []
+    if os.getenv('MSYSTEM'):
+        script.append('alias pwd="pwd -W"\n')
     for n, l in enumerate(t):
         if not l.endswith('\n'):
             l += '\n'