##// END OF EJS Templates
py3: open patch file in binary mode and convert eol manually...
Yuya Nishihara -
r36856:c268ba15 default
parent child Browse files
Show More
@@ -1120,9 +1120,10 b' the hunk is left unchanged.'
1120 1120 ui.warn(_("editor exited with exit code %d\n") % ret)
1121 1121 continue
1122 1122 # Remove comment lines
1123 patchfp = open(patchfn)
1123 patchfp = open(patchfn, r'rb')
1124 1124 ncpatchfp = stringio()
1125 1125 for line in util.iterfile(patchfp):
1126 line = util.fromnativeeol(line)
1126 1127 if not line.startswith('#'):
1127 1128 ncpatchfp.write(line)
1128 1129 patchfp.close()
General Comments 0
You need to be logged in to leave comments. Login now