This is an archive of the discontinued Mercurial Phabricator instance.

py3: use util.forcebytestr instead of str for converting errors to bytes
ClosedPublic

Authored by pulkit on Feb 14 2018, 7:36 AM.

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

pulkit created this revision.Feb 14 2018, 7:36 AM
yuja requested changes to this revision.Feb 14 2018, 8:32 AM
yuja added a subscriber: yuja.
yuja added inline comments.
hgext/transplant.py
314

Use util.forcebytestr() to stringify an exception object of unknown encoding.

mercurial/patch.py
1462

Here bytestr() is probably fine, but could be forcebytestr(), too.

This revision now requires changes to proceed.Feb 14 2018, 8:32 AM
pulkit retitled this revision from py3: use pycompat.bytestr instead of str for converting errors to bytes to py3: use util.forcebytestr instead of str for converting errors to bytes.Feb 14 2018, 11:26 AM
pulkit updated this revision to Diff 5725.
yuja accepted this revision.Feb 15 2018, 7:18 AM
This revision is now accepted and ready to land.Feb 15 2018, 7:18 AM
This revision was automatically updated to reflect the committed changes.