changeset 28283:544444991c83

hghave: use print function For Python 3 compatibility.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 27 Feb 2016 21:19:53 -0800
parents d698c11bd189
children 0fe00bdb2f4f
files tests/hghave
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave	Sat Feb 27 22:25:47 2016 -0800
+++ b/tests/hghave	Sat Feb 27 21:19:53 2016 -0800
@@ -3,6 +3,9 @@
 if all features are there, non-zero otherwise. If a feature name is
 prefixed with "no-", the absence of feature is tested.
 """
+
+from __future__ import print_function
+
 import optparse
 import os, sys
 import hghave
@@ -12,7 +15,7 @@
 def list_features():
     for name, feature in sorted(checks.iteritems()):
         desc = feature[1]
-        print name + ':', desc
+        print(name + ':', desc)
 
 def test_features():
     failed = 0
@@ -21,7 +24,7 @@
         try:
             check()
         except Exception as e:
-            print "feature %s failed:  %s" % (name, e)
+            print("feature %s failed:  %s" % (name, e))
             failed += 1
     return failed