This is an archive of the discontinued Mercurial Phabricator instance.

tests: write commit message using file I/O
ClosedPublic

Authored by indygreg on Jan 29 2019, 5:37 PM.

Details

Summary

Python 2.7 will print() \x94\x5c\x0a whereas Python 3 will
print() \xc2\x94\x5c\x0a. Why, I'm not sure. It probably has to
do with print() being Unicode aware on Python 3 and Python
attempting some kind of encoding before emitting the output.

This difference results in a different bytes making it to the
commit message and the JSON output varying. We work around
this by writing bytes to a commit message file.

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.Jan 29 2019, 5:37 PM
This revision was automatically updated to reflect the committed changes.