This is an archive of the discontinued Mercurial Phabricator instance.

sshpeer: don't read from stderr when that behavior is disabled
ClosedPublic

Authored by indygreg on Mar 2 2018, 6:55 PM.

Details

Summary

We previously prevented the creation of doublepipe instances when
we're not supposed to automatically read from stderr. However,
there were other automatic calls to read from stderr that were
undermining this effort.

This commit prevents all automatic reads from stderr from occurring
when they are supposed to be disabled.

Because stderr is no longer being read, we need to call "readavailable"
from tests so stderr is read from.

Test output changes because stderr is now always (manually) read after
stdout. And, since sshpeer no longer automatically tends to stderr,
no "remote: " messages are printed. This should fix non-deterministic
test output.

FWIW, doublepipe automatically reads from stderr when reading from
stdout, so I'm not sure some of these calls to self._readerr() are
even needed.

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.Mar 2 2018, 6:55 PM
durin42 accepted this revision.Mar 2 2018, 7:00 PM
This revision is now accepted and ready to land.Mar 2 2018, 7:00 PM
This revision was automatically updated to reflect the committed changes.