This is an archive of the discontinued Mercurial Phabricator instance.

perf: make perf.run-limits code work with Python 3
ClosedPublic

Authored by indygreg on Apr 4 2019, 9:21 PM.

Details

Summary

We need b'' because perf.py isn't run through the source
transformer.

We need to cast the exception to bytes using pycompat.bytestr()
because ValueError can't be %s formatted due to built-in exceptions
lacking bytes.

We need to pycompat.sysstr() before the float() and int() cast
so the ValueError message doesn't have b'' in it.

Even with that, it looks like the error message for the ValueError
for float casts added quotes, so we need to account for that in test
output.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Apr 4 2019, 9:21 PM
pulkit accepted this revision.Apr 5 2019, 7:24 AM
This revision was automatically updated to reflect the committed changes.