D2148: py3: open temporary file in binary mode

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sun Feb 11 20:40:40 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa5cf79755eff: py3: open temporary file in binary mode (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2148?vs=5433&id=5449

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

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -215,7 +215,7 @@
 
     data = {}
     fd, tmpname = tempfile.mkstemp(prefix='hg-patch-')
-    tmpfp = os.fdopen(fd, pycompat.sysstr('w'))
+    tmpfp = os.fdopen(fd, pycompat.sysstr('wb'))
     try:
         msg = pycompat.emailparser().parse(fileobj)
 



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


More information about the Mercurial-devel mailing list