Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 36843:5bc7ff103081
py3: use r'' instead of sysstr('') to get around code transformer
Fewer function calls should be better.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 10 Mar 2018 15:57:16 +0900 |
parents | c6a61298ac32 |
children | 472c68cda3f8 |
line wrap: on
line diff
--- 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()]))