# HG changeset patch # User Pulkit Goyal # Date 2018-09-20 21:46:38 # Node ID e0a7cfa9323f41067d14f21ff1ffe96c631e4fbc # Parent 7cdd47d9ccf8c9f75433efc1ec35932274651b02 py3: use print as a function in tests/test-revert.t This makes the test work on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4687 diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist --- a/contrib/python3-whitelist +++ b/contrib/python3-whitelist @@ -471,6 +471,7 @@ test-resolve.t test-revert-flags.t test-revert-interactive.t test-revert-unknown.t +test-revert.t test-revisions.t test-revlog-ancestry.py test-revlog-group-emptyiter.t diff --git a/tests/test-revert.t b/tests/test-revert.t --- a/tests/test-revert.t +++ b/tests/test-revert.t @@ -532,6 +532,7 @@ Script to make a simple text version of $ cat << EOF >> dircontent.py > # generate a simple text view of the directory for easy comparison + > from __future__ import print_function > import os > files = os.listdir('.') > files.sort() @@ -539,7 +540,7 @@ Script to make a simple text version of > if os.path.isdir(filename): > continue > content = open(filename).read() - > print '%-6s %s' % (content.strip(), filename) + > print('%-6s %s' % (content.strip(), filename)) > EOF Generate appropriate repo state