This is an archive of the discontinued Mercurial Phabricator instance.

wireproto: don't expose legacy commands to version 2 of wire protocol
ClosedPublic

Authored by indygreg on Feb 27 2018, 6:49 PM.

Details

Summary

Now that we have the ability to control which transports a wire
protocol command is exposed on, let's put it to use.

We flag the "branches," "changegroup," and "changegroupsubset"
commands as only available on version 1. "branches" was used by the
legacy discovery mechanism and was replaced by the "known" and
"heads" commands. "changegroup" and "changegroupsubset" were
replaced by "getbundle."

"between" is also legacy. However, since it is used by the SSH
handshake protocol, marking it as legacy is a bit more complicated
and will be done in a later commit.

Another nuanced issue with this change is that the server-advertised
capabilities still list "changegroupsubset" despite the command not
being available. This will be addressed in a subsequent commit.

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 27 2018, 6:49 PM
indygreg updated this revision to Diff 6336.Mar 2 2018, 9:50 AM
durin42 accepted this revision.Mar 2 2018, 7:05 PM
This revision is now accepted and ready to land.Mar 2 2018, 7:05 PM
This revision was automatically updated to reflect the committed changes.