This is an archive of the discontinued Mercurial Phabricator instance.

py3: tweak stdout writing in test-hgweb-no-path-info.t
ClosedPublic

Authored by indygreg on Oct 12 2018, 4:09 AM.

Details

Summary

We want to write bytes for convenience. This requires sys.stdout.buffer.
But using sys.stdout.buffer introducing buffered output. So we sprinkle
code with sys.stdout.flush() to force immediate writes.

After all that, Python 3 was emitting b'' prefixed output for errors.
So we only print errors if there were some. There aren't, so b'' don't
come into play and output is identical in Python 2 and 3.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Oct 12 2018, 4:09 AM
This revision was automatically updated to reflect the committed changes.