Patchwork D3602: py3: use print as a function in tests/test-pull.t

login
register
mail settings
Submitter phabricator
Date May 19, 2018, 7:39 p.m.
Message ID <20316af4c32213e9ceba7a19e9c101a5@localhost.localdomain>
Download mbox | patch
Permalink /patch/31723/
State Not Applicable
Headers show

Comments

phabricator - May 19, 2018, 7:39 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG549e970397b2: py3: use print as a function in tests/test-pull.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3602?vs=8773&id=8807

REVISION DETAIL
  https://phab.mercurial-scm.org/D3602

AFFECTED FILES
  tests/test-pull.t

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-pull.t b/tests/test-pull.t
--- a/tests/test-pull.t
+++ b/tests/test-pull.t
@@ -109,12 +109,12 @@ 
 It's tricky to make file:// URLs working on every platform with
 regular shell commands.
 
-  $ URL=`$PYTHON -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
+  $ URL=`$PYTHON -c "from __future__ import print_function; import os; print('file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test')"`
   $ hg pull -q "$URL"
   abort: file:// URLs can only refer to localhost
   [255]
 
-  $ URL=`$PYTHON -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
+  $ URL=`$PYTHON -c "from __future__ import print_function; import os; print('file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test')"`
   $ hg pull -q "$URL"
 
 SEC: check for unsafe ssh url