This is an archive of the discontinued Mercurial Phabricator instance.

httppeer: perform capabilities request in makepeer()
ClosedPublic

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

Details

Summary

Previously, we constructed an httppeer then always ran _fetchcaps()
to issue the capabilities command.

We want to issue the capabilities command before constructing a
peer instance so we can construct an appropriate peer instance
depending on the capabilities result.

With the code for making and sending requests moved out of httppeer,
it is now possible to send command requests without an httppeer.

This commit creates a new function for making the capabilities
request and calls it as part of makepeer().

This code should be functionality equivalent to what existed before.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Apr 10 2018, 9:28 PM
durin42 accepted this revision.Apr 11 2018, 12:49 PM
This revision is now accepted and ready to land.Apr 11 2018, 12:49 PM
This revision was automatically updated to reflect the committed changes.