Submitter | phabricator |
---|---|
Date | Dec. 12, 2019, 11:44 p.m. |
Message ID | <differential-rev-PHID-DREV-kpn3mulkbka6g3ztxtfw-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/43763/ |
State | Superseded |
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):