This is an archive of the discontinued Mercurial Phabricator instance.

bundle2: specify what capabilities will be used for
ClosedPublic

Authored by indygreg on Jan 20 2018, 7:44 PM.

Details

Summary

We currently assume there is a symmetric relationship of bundle2
capabilities between client and server. However, this may not always be
the case.

We need a bundle2 capability to advertise bundle2 streaming clone support
on servers to differentiate it from the existing, legacy streaming clone
support.

However, servers may wish to disable streaming clone support. If bundle2
capabilities were the same between client and server, a client (which
may also be a server) that has disabled streaming clone support would
not be able to perform a streaming clone itself!

This commit introduces a "role" argument to bundle2.getrepocaps() that
explicitly defines the role being performed. This will allow us (and
extensions) to alter bundle2 capabilities depending on the operation
being performed.

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.Jan 20 2018, 7:44 PM
lothiraldan accepted this revision.Jan 22 2018, 10:44 AM
durin42 accepted this revision.Jan 22 2018, 3:01 PM
This revision is now accepted and ready to land.Jan 22 2018, 3:01 PM
This revision was automatically updated to reflect the committed changes.