# HG changeset patch # User Robert Stanca # Date 1459735811 -10800 # Node ID e677b8daeb3faa6b97ba02cea5fefb834f347653 # Parent abe605bbf0de9010384c348ac89ac0fb2ebc442e py3: use print_function in test-revlog-ancestry.py diff -r abe605bbf0de -r e677b8daeb3f tests/test-check-py3-compat.t --- a/tests/test-check-py3-compat.t Mon Apr 04 05:09:24 2016 +0300 +++ b/tests/test-check-py3-compat.t Mon Apr 04 05:10:11 2016 +0300 @@ -62,7 +62,6 @@ tests/test-manifest.py not using absolute_import tests/test-pathencode.py not using absolute_import tests/test-pathencode.py requires print_function - tests/test-revlog-ancestry.py requires print_function tests/test-run-tests.py not using absolute_import tests/test-simplemerge.py not using absolute_import tests/test-status-inprocess.py not using absolute_import @@ -230,7 +229,6 @@ tests/readlink.py: invalid syntax: invalid syntax (, line *) (glob) tests/test-demandimport.py: invalid syntax: invalid syntax (, line *) (glob) tests/test-lrucachedict.py: invalid syntax: invalid syntax (, line *) (glob) - tests/test-revlog-ancestry.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/test-status-inprocess.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/test-trusted.py: invalid syntax: invalid syntax (, line *) (glob) diff -r abe605bbf0de -r e677b8daeb3f tests/test-revlog-ancestry.py --- a/tests/test-revlog-ancestry.py Mon Apr 04 05:09:24 2016 +0300 +++ b/tests/test-revlog-ancestry.py Mon Apr 04 05:10:11 2016 +0300 @@ -1,4 +1,4 @@ -from __future__ import absolute_import +from __future__ import absolute_import, print_function import os from mercurial import ( hg, @@ -51,39 +51,38 @@ addcommit("I", 8) # Ancestors - print 'Ancestors of 5' + print('Ancestors of 5') for r in repo.changelog.ancestors([5]): - print r, + print(r, end=' ') - print '\nAncestors of 6 and 5' + print('\nAncestors of 6 and 5') for r in repo.changelog.ancestors([6, 5]): - print r, + print(r, end=' ') - print '\nAncestors of 5 and 4' + print('\nAncestors of 5 and 4') for r in repo.changelog.ancestors([5, 4]): - print r, + print(r, end=' ') - print '\nAncestors of 7, stop at 6' + print('\nAncestors of 7, stop at 6') for r in repo.changelog.ancestors([7], 6): - print r, + print(r, end=' ') - print '\nAncestors of 7, including revs' + print('\nAncestors of 7, including revs') for r in repo.changelog.ancestors([7], inclusive=True): - print r, + print(r, end=' ') - print '\nAncestors of 7, 5 and 3, including revs' + print('\nAncestors of 7, 5 and 3, including revs') for r in repo.changelog.ancestors([7, 5, 3], inclusive=True): - print r, + print(r, end=' ') # Descendants - print '\n\nDescendants of 5' + print('\n\nDescendants of 5') for r in repo.changelog.descendants([5]): - print r, + print(r, end=' ') - print '\nDescendants of 5 and 3' + print('\nDescendants of 5 and 3') for r in repo.changelog.descendants([5, 3]): - print r, + print(r, end=' ') - print '\nDescendants of 5 and 4' - for r in repo.changelog.descendants([5, 4]): - print r, + print('\nDescendants of 5 and 4') + print(*repo.changelog.descendants([5, 4]), sep=' ')