mercurial/patch.py
changeset 36835 5bc7ff103081
parent 36676 c6a61298ac32
child 36837 472c68cda3f8
--- a/mercurial/patch.py	Sat Mar 10 15:50:09 2018 +0900
+++ b/mercurial/patch.py	Sat Mar 10 15:57:16 2018 +0900
@@ -216,7 +216,7 @@
 
     data = {}
     fd, tmpname = tempfile.mkstemp(prefix='hg-patch-')
-    tmpfp = os.fdopen(fd, pycompat.sysstr('wb'))
+    tmpfp = os.fdopen(fd, r'wb')
     try:
         msg = pycompat.emailparser().parse(fileobj)
 
@@ -1106,7 +1106,7 @@
                 ncpatchfp = None
                 try:
                     # Write the initial patch
-                    f = os.fdopen(patchfd, pycompat.sysstr("w"))
+                    f = os.fdopen(patchfd, r"w")
                     chunk.header.write(f)
                     chunk.write(f)
                     f.write('\n'.join(['# ' + i for i in phelp.splitlines()]))