Submitter | Gregory Szorc |
---|---|
Date | Feb. 28, 2016, 5:35 a.m. |
Message ID | <c8a7c41a7d218dabc55c.1456637756@ubuntu-vm-main> |
Download | mbox | patch |
Permalink | /patch/13444/ |
State | Accepted |
Delegated to: | Yuya Nishihara |
Headers | show |
Comments
On Sat, 27 Feb 2016 21:35:56 -0800, Gregory Szorc wrote: > # HG changeset patch > # User Gregory Szorc <gregory.szorc@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. Missing future import. Added it and queued the patch 5 and 6, thanks.
Patch
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")