Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Fri, 01 Nov 2013 17:14:49 +0000
changeset 1302 f103c0693fbb
parent 1299 ce8024f27837 (current diff)
parent 1301 761641fc16a6 (diff)
child 1306 c8f3a433abe6
Merge with stable
--- a/tests/hghave.py	Mon Oct 07 13:51:33 2013 +0100
+++ b/tests/hghave.py	Fri Nov 01 17:14:49 2013 +0000
@@ -277,6 +277,14 @@
 def has_aix():
     return sys.platform.startswith("aix")
 
+def has_absimport():
+    import __future__
+    from mercurial import util
+    return util.safehasattr(__future__, "absolute_import")
+
+def has_py3k():
+    return 3 == sys.version_info[0]
+
 checks = {
     "true": (lambda: True, "yak shaving"),
     "false": (lambda: False, "nail clipper"),
@@ -318,4 +326,6 @@
     "windows": (has_windows, "Windows"),
     "msys": (has_msys, "Windows with MSYS"),
     "aix": (has_aix, "AIX"),
+    "absimport": (has_absimport, "absolute_import in __future__"),
+    "py3k": (has_py3k, "running with Python 3.x"),
 }