diff -r 1527f40de3b3 -r 5bc7ff103081 mercurial/util.py --- a/mercurial/util.py Sat Mar 10 15:50:09 2018 +0900 +++ b/mercurial/util.py Sat Mar 10 15:57:16 2018 +0900 @@ -91,7 +91,7 @@ # destined stdout with a pipe destined stdout (e.g. pager), we want line # buffering if isatty(stdout): - stdout = os.fdopen(stdout.fileno(), pycompat.sysstr('wb'), 1) + stdout = os.fdopen(stdout.fileno(), r'wb', 1) if pycompat.iswindows: from . import windows as platform @@ -1251,7 +1251,7 @@ inname, outname = None, None try: infd, inname = tempfile.mkstemp(prefix='hg-filter-in-') - fp = os.fdopen(infd, pycompat.sysstr('wb')) + fp = os.fdopen(infd, r'wb') fp.write(s) fp.close() outfd, outname = tempfile.mkstemp(prefix='hg-filter-out-') @@ -1413,7 +1413,7 @@ """ if _hgexecutable is None: hg = encoding.environ.get('HG') - mainmod = sys.modules[pycompat.sysstr('__main__')] + mainmod = sys.modules[r'__main__'] if hg: _sethgexecutable(hg) elif mainfrozen():