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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu Mar 1 14:15:47 EST 2018


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

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



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


More information about the Mercurial-devel mailing list