[PATCH 5 of 6] hghave: use print function
Gregory Szorc
gregory.szorc at gmail.com
Sun Feb 28 00:35:56 EST 2016
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1456636793 28800
# Sat Feb 27 21:19:53 2016 -0800
# Node ID c8a7c41a7d218dabc55c0f7e235d316112d81f32
# Parent 53617b5f2e136f4960228aa559c698db58591a0e
hghave: use print function
For Python 3 compatibility.
diff --git a/tests/hghave b/tests/hghave
--- a/tests/hghave
+++ b/tests/hghave
@@ -7,26 +7,26 @@ import optparse
import os, sys
import hghave
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
for name, feature in checks.iteritems():
check, _ = feature
try:
check()
except Exception as e:
- print "feature %s failed: %s" % (name, e)
+ print("feature %s failed: %s" % (name, e))
failed += 1
return failed
parser = optparse.OptionParser("%prog [options] [features]")
parser.add_option("--test-features", action="store_true",
help="test available features")
parser.add_option("--list-features", action="store_true",
help="list available features")
More information about the Mercurial-devel
mailing list