( )⚙ D3232 httppeer: move requestbuilder defaults into makepeer() argument

This is an archive of the discontinued Mercurial Phabricator instance.

httppeer: move requestbuilder defaults into makepeer() argument
ClosedPublic

Authored by indygreg on Apr 10 2018, 9:28 PM.

Details

Summary

Upcoming commits will move the initial ?cmd=capabilities handshake
request out of httppeer so the handshake can be performed before a
peer instance is constructed. In order to do this, we'll need to
refactor code for making HTTP requests.

The type used to construct HTTP requests is configurable. If we'll
be making HTTP requests outside of httppeer, we should be able to
use a custom request builder. So move the definition of that type
into makepeer().

Extensions can monkeypatch the function and override the argument
value.

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.Apr 10 2018, 9:28 PM
durin42 accepted this revision.Apr 11 2018, 12:38 PM
This revision is now accepted and ready to land.Apr 11 2018, 12:38 PM
This revision was automatically updated to reflect the committed changes.