This is an archive of the discontinued Mercurial Phabricator instance.

revsetlang: use sysbytes() instead of blind encode()
ClosedPublic

Authored by indygreg on Mar 2 2019, 4:26 PM.

Details

Summary

Otherwise we will call str.encode() on Python 2, which is wrong.

sysbytes() does encode('utf-8) on Python 3. But the source is
guaranteed ASCII, so it shouldn't matter.

With this change, hg now runs with HGUNICODEPEDANTRY=1 set.
However, several tests are failing.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Mar 2 2019, 4:26 PM
This revision was automatically updated to reflect the committed changes.