changeset 39740:e0a7cfa9323f

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
author Pulkit Goyal <pulkit@yandex-team.ru>
date Fri, 21 Sep 2018 03:16:38 +0530
parents 7cdd47d9ccf8
children 7303ab86431a
files contrib/python3-whitelist tests/test-revert.t
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Wed Sep 19 23:11:07 2018 +0900
+++ b/contrib/python3-whitelist	Fri Sep 21 03:16:38 2018 +0530
@@ -471,6 +471,7 @@
 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
--- a/tests/test-revert.t	Wed Sep 19 23:11:07 2018 +0900
+++ b/tests/test-revert.t	Fri Sep 21 03:16:38 2018 +0530
@@ -532,6 +532,7 @@
 
   $ 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 @@
   >     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