--- a/mercurial/pycompat.py Thu Mar 02 13:34:01 2017 +0100
+++ b/mercurial/pycompat.py Wed Mar 08 22:30:12 2017 +0900
@@ -71,6 +71,9 @@
# workaround to simulate the Python 2 (i.e. ANSI Win32 API) behavior.
sysargv = list(map(os.fsencode, sys.argv))
+ def bytechr(i):
+ return bytes([i])
+
def sysstr(s):
"""Return a keyword str to be passed to Python functions such as
getattr() and str.encode()
@@ -134,6 +137,8 @@
return [a.encode('latin-1') for a in ret]
else:
+ bytechr = chr
+
def sysstr(s):
return s