# HG changeset patch # User timeless # Date 1462931819 0 # Node ID 7bcfb9090c86d99b4eeb4e02cdda7ca3cb3373d9 # Parent 478e2b85fccec70d3232df0cbcbf1286ed141491 readlink: use print_function diff -r 478e2b85fcce -r 7bcfb9090c86 tests/readlink.py --- a/tests/readlink.py Fri May 06 01:15:07 2016 +0000 +++ b/tests/readlink.py Wed May 11 01:56:59 2016 +0000 @@ -1,13 +1,15 @@ #!/usr/bin/env python +from __future__ import print_function + import errno, os, sys for f in sys.argv[1:]: try: - print f, '->', os.readlink(f) + print(f, '->', os.readlink(f)) except OSError as err: if err.errno != errno.EINVAL: raise - print f, 'not a symlink' + print(f, '->', f, 'not a symlink') sys.exit(0) diff -r 478e2b85fcce -r 7bcfb9090c86 tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Fri May 06 01:15:07 2016 +0000 +++ b/tests/test-check-py3-compat.t Wed May 11 01:56:59 2016 +0000 @@ -28,7 +28,6 @@ tests/heredoctest.py requires print_function tests/md5sum.py not using absolute_import tests/readlink.py not using absolute_import - tests/readlink.py requires print_function tests/run-tests.py not using absolute_import tests/svn-safe-append.py not using absolute_import tests/test-atomictempfile.py not using absolute_import @@ -161,6 +160,5 @@ mercurial/win*.py: error importing module: No module named 'msvcrt' (line *) (glob) mercurial/windows.py: error importing module: No module named '_winreg' (line *) (glob) mercurial/wireproto.py: error importing module: invalid syntax (bundle*.py, line *) (line *) (glob) - tests/readlink.py: invalid syntax: invalid syntax (, line *) (glob) #endif