diff -r 1527f40de3b3 -r 5bc7ff103081 mercurial/httppeer.py --- a/mercurial/httppeer.py Sat Mar 10 15:50:09 2018 +0900 +++ b/mercurial/httppeer.py Sat Mar 10 15:57:16 2018 +0900 @@ -459,7 +459,7 @@ try: # dump bundle to disk fd, filename = tempfile.mkstemp(prefix="hg-bundle-", suffix=".hg") - fh = os.fdopen(fd, pycompat.sysstr("wb")) + fh = os.fdopen(fd, r"wb") d = fp.read(4096) while d: fh.write(d)