The description from conduit is a unicode.
- Group Reviewers
- rHG0dce1297dd01: phabricator: convert description into local
getdescfromdrev is also used in readpatch which call encoding.unitolocal after. So it looks like it is designed to be converted after the call.
Can you fix them all? A general guideline for Mercurial codebase is converting
unicodes to byte strings as early as possible.
That could replace json.loads at line 211. I guess it could be done by using a function that recursively convert strings.
def _maybeunitolocal(u): if isinstance(u, pycompat.unicode): return encoding.unitolocal(u) return u pycompat.rapply(_maybeunitolocal, json.loads(...))