diff -r 5646d7bcd823 -r 7d2cbe11ae48 mercurial/encoding.py --- a/mercurial/encoding.py Sun Apr 02 02:29:51 2017 -0400 +++ b/mercurial/encoding.py Wed Mar 29 21:13:55 2017 +0900 @@ -211,8 +211,8 @@ strtolocal = unitolocal strfromlocal = unifromlocal else: - strtolocal = str - strfromlocal = str + strtolocal = pycompat.identity + strfromlocal = pycompat.identity if not _nativeenviron: # now encoding and helper functions are available, recreate the environ