Patchwork D2519: py3: make sure we write bytes in a file open in bytes mode

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 7:15 p.m.
Message ID <d9bd19d597205f398d09798d1960f2c1@localhost.localdomain>
Download mbox | patch
Permalink /patch/28582/
State Not Applicable
Headers show

Comments

phabricator - March 1, 2018, 7:15 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGeafd380fe1b8: py3: make sure we write bytes in a file open in bytes mode (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2519?vs=6265&id=6274

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

AFFECTED FILES
  tests/test-grep.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-grep.t b/tests/test-grep.t
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -271,7 +271,7 @@ 
 
 match in last "line" without newline
 
-  $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
+  $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write(b"no infinite loop"); fp.close();'
   $ hg ci -Amnoeol
   adding noeol
   $ hg grep loop