##// END OF EJS Templates
py3: open files in bytes mode in transplant.py...
Pulkit Goyal -
r36205:a9d1ac7b default
parent child Browse files
Show More
@@ -211,7 +211,7 b' class transplanter(object):'
211 211 patchfile = None
212 212 else:
213 213 fd, patchfile = tempfile.mkstemp(prefix='hg-transplant-')
214 fp = os.fdopen(fd, pycompat.sysstr('w'))
214 fp = os.fdopen(fd, pycompat.sysstr('wb'))
215 215 gen = patch.diff(source, parent, node, opts=diffopts)
216 216 for chunk in gen:
217 217 fp.write(chunk)
@@ -259,7 +259,7 b' class transplanter(object):'
259 259 self.ui.status(_('filtering %s\n') % patchfile)
260 260 user, date, msg = (changelog[1], changelog[2], changelog[4])
261 261 fd, headerfile = tempfile.mkstemp(prefix='hg-transplant-')
262 fp = os.fdopen(fd, pycompat.sysstr('w'))
262 fp = os.fdopen(fd, pycompat.sysstr('wb'))
263 263 fp.write("# HG changeset patch\n")
264 264 fp.write("# User %s\n" % user)
265 265 fp.write("# Date %d %d\n" % date)
General Comments 0
You need to be logged in to leave comments. Login now