diff -r 1527f40de3b3 -r 5bc7ff103081 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Sat Mar 10 15:50:09 2018 +0900 +++ b/mercurial/debugcommands.py Sat Mar 10 15:57:16 2018 +0900 @@ -1119,7 +1119,7 @@ def writetemp(contents): (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-") - f = os.fdopen(fd, pycompat.sysstr("wb")) + f = os.fdopen(fd, r"wb") f.write(contents) f.close() return name