diff -r 1527f40de3b3 -r 5bc7ff103081 mercurial/wireproto.py --- a/mercurial/wireproto.py Sat Mar 10 15:50:09 2018 +0900 +++ b/mercurial/wireproto.py Sat Mar 10 15:57:16 2018 +0900 @@ -1027,7 +1027,7 @@ # write bundle data to temporary file because it can be big fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-') - fp = os.fdopen(fd, pycompat.sysstr('wb+')) + fp = os.fdopen(fd, r'wb+') r = 0 try: proto.forwardpayload(fp)