This is an archive of the discontinued Mercurial Phabricator instance.

bundle2: move version of stream clone into part name
ClosedPublic

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

Details

Summary

I don't like having version numbers as part parameters. It means
that parts can theoretically vary wildly in their generation and
processing semantics. I think that a named part should have consistent
behavior over time. In other words, if you need to introduce new
functionality or behavior, that should be expressed by inventing
a new bundle2 part, not adding functionality to an existing part.

This commit applies this advice to the just-introduced stream clone
via bundle2 feature.

The "version" part parameter is removed. The name of the bundle2 part
is now "stream2" instead of "stream" with "version=v2".

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

Having a part named stream1 that used a V2 version of the streaming protocol and transporting a V2 bundle format seems confusing, I'm voting for a stream2 name.

indygreg edited the summary of this revision. (Show Details)Jan 22 2018, 3:32 PM
indygreg updated this revision to Diff 4985.
durin42 accepted this revision.Jan 22 2018, 4:09 PM
This revision is now accepted and ready to land.Jan 22 2018, 4:09 PM
This revision was automatically updated to reflect the committed changes.