# HG changeset patch # User Gregory Szorc # Date 2016-02-28 05:19:53 # Node ID 544444991c833d84e507e9532be80bd917c36612 # Parent d698c11bd189e27f282da0d946d7f1878555c9c2 hghave: use print function For Python 3 compatibility. diff --git a/tests/hghave b/tests/hghave --- a/tests/hghave +++ b/tests/hghave @@ -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 @@ checks = hghave.checks 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 @@ def test_features(): try: check() except Exception as e: - print "feature %s failed: %s" % (name, e) + print("feature %s failed: %s" % (name, e)) failed += 1 return failed