( )⚙ D2033 sshpeer: inline I/O into _validaterepo()

This is an archive of the discontinued Mercurial Phabricator instance.

sshpeer: inline I/O into _validaterepo()
ClosedPublic

Authored by indygreg on Feb 4 2018, 10:35 PM.

Details

Summary

We want to move the handshake code out of the peer class so the
peer factory function can perform the handshake and instantiate
a proper class depending on the results. To make that refactor
easier to read, we first inline I/O functionality into
_validaterepo().

Test output for low-level protocol tests didn't change, thus
hopefully demonstrating that this refactor didn't change any
material behavior.

Because we no longer call _callstream(), our test extension for
monkeypatching the peer had to change its hook point.

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.Feb 4 2018, 10:35 PM
indygreg updated this revision to Diff 5228.Feb 5 2018, 12:15 PM
indygreg updated this revision to Diff 5234.Feb 5 2018, 5:21 PM
yuja accepted this revision.Feb 6 2018, 8:07 AM
This revision is now accepted and ready to land.Feb 6 2018, 8:07 AM
This revision was automatically updated to reflect the committed changes.