This is an archive of the discontinued Mercurial Phabricator instance.

progress: flush stderr after clearing
ClosedPublic

Authored by spectral on Jan 2 2020, 8:30 PM.

Details

Summary

On python3, ui.stderr is buffered, it seems, so we need to flush it to actually
get the progress bar off the screen. This is important since ui.write() will
call into progbar.clear() if it thinks there's a progress bar on the screen,
with the intent that the next thing it outputs is at the beginning of the line
(instead of at the end of the progress bar line). Without the flush, we buffer
up the clearing of the screen, and we get some really weird/corrupt output.

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

spectral created this revision.Jan 2 2020, 8:30 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.