Submitter | phabricator |
---|---|
Date | Dec. 15, 2019, 3:11 a.m. |
Message ID | <0c1ffa3ffd8d89a4931e06c34c2c1f91@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/43840/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py --- a/mercurial/pycompat.py +++ b/mercurial/pycompat.py @@ -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):