changeset 43870 | 66af68d4c751 |
parent 43790 | 765a9c299c44 |
child 44452 | 9d2b2df2c2ba |
--- a/mercurial/pycompat.py Fri Dec 13 10:10:40 2019 -0800 +++ b/mercurial/pycompat.py Thu Dec 12 10:26:09 2019 -0800 @@ -253,6 +253,8 @@ This never raises UnicodeEncodeError, but only ASCII characters can be round-trip by sysstr(sysbytes(s)). """ + if isinstance(s, bytes): + return s return s.encode('utf-8') def sysstr(s):