This is an archive of the discontinued Mercurial Phabricator instance.

sshpeer: move ssh command and repo creation logic out of __init__
ClosedPublic

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

Details

Summary

It was easier to move both of these at once because repository
creation requires various variables and I didn't want to add
tons of arguments and code to init that will soon be deleted
anyway. We do add an extra argument so we can proxy values to the
_validaterepo() call. But this is minimally invasive.

Some callers of self._abort() were converted to just raise. Like
before, the _abort() call wasn't necessary because self._pipe*
aren't populated this early in the object's lifetime.

As part of this, various private attributes derived from the parsed
URL are no longer used. So we no longer set them.

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
lothiraldan accepted this revision.Feb 5 2018, 7:54 AM
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.