This is an archive of the discontinued Mercurial Phabricator instance.

py3: get bytes-repr of network errors portably
ClosedPublic

Authored by durin42 on Feb 17 2018, 1:41 AM.

Details

Summary

This resolves a lot of weird issues in Python 3 around error strings.

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

durin42 created this revision.Feb 17 2018, 1:41 AM
pulkit added a subscriber: pulkit.Feb 17 2018, 4:43 AM

For converting error messages to bytes, util.forcebytestr() is preferred. https://phab.mercurial-scm.org/D2269#inline-5791

mercurial/hgweb/request.py
125

This one looks like an unrelated change.

This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Feb 17 2018, 4:57 AM

Here the exception type is limited, so using bytestr() should be okay.