This is an archive of the discontinued Mercurial Phabricator instance.

sshpeer: make "instance" a function
ClosedPublic

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

Details

Summary

The API is that peer modules must provide an "instance" symbol
that is callable to return a peer.

Making "instance" a function instead of an alias to "sshpeer"
makes it easier to monkeypatch the "sshpeer" type. It will also
make it possible to turn instance() into a factory function of
sorts that returns different types based on connection properties.

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
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.