Patchwork D2334: py3: use print as a function in test-mq-push-fail.t

login
register
mail settings
Submitter phabricator
Date Feb. 18, 2018, 1:31 p.m.
Message ID <differential-rev-PHID-DREV-7bc47f7yghs6orboniia-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28087/
State Superseded
Headers show

Comments

phabricator - Feb. 18, 2018, 1:31 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-mq-qpush-fail.t

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 18, 2018, 2:14 p.m.
yuja requested changes to this revision.
yuja added a comment.
This revision now requires changes to proceed.


  print(non_ascii_string) is locale-dependent and doesn't always work.
  We'll have to use `getattr(sys.stdout, 'buffer', sys.stdout).write()` instead.

REPOSITORY
  rHG Mercurial

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

To: pulkit, #hg-reviewers, yuja
Cc: yuja, mercurial-devel
phabricator - April 11, 2018, 11:22 a.m.
pulkit abandoned this revision.
pulkit added a comment.


  Superseded by https://phab.mercurial-scm.org/D3218.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/tests/test-mq-qpush-fail.t b/tests/test-mq-qpush-fail.t
--- a/tests/test-mq-qpush-fail.t
+++ b/tests/test-mq-qpush-fail.t
@@ -31,7 +31,7 @@ 
   popping patch2
   popping patch1
   patch queue now empty
-  $ $PYTHON -c 'print "\xe9"' > message
+  $ $PYTHON -c 'from __future__ import print_function; print("\xe9")' > message
   $ cat .hg/patches/bad-patch >> message
   $ mv message .hg/patches/bad-patch
   $ cat > $TESTTMP/wrapplayback.py <<EOF