This is an archive of the discontinued Mercurial Phabricator instance.

wireprotov2: let clients drive delta behavior
ClosedPublic

Authored by indygreg on Sep 5 2018, 12:20 PM.

Details

Summary

Previously, the "manifestdata" and "filedata" commands assumed the
receiver had all parent revisions for requested nodes. Unless the
revision had no parents, they emitted a delta instead of a fulltext.

This strategy isn't appropriate for shallow clones and for clients
that only want to access fulltext revision data for a single node
without fetching their parent revisions.

This commit adds an "haveparents" argument to the "manifestdata"
and "filedata" commands that controls delta generation behavior.

Unless "haveparents" is set, the server assumes that the client
doesn't have parent revisions unless they were previously sent
as part of the current group of revisions.

This change allows the fulltext revision data of any individual
revision to be obtained. This will facilitate shallow clones
and other data retrieval strategies that don't require all previous
revisions of an entity to be fetched.

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.Sep 5 2018, 12:20 PM
durin42 accepted this revision.Sep 12 2018, 11:14 AM
This revision is now accepted and ready to land.Sep 12 2018, 11:14 AM
indygreg updated this revision to Diff 10971.Sep 12 2018, 1:11 PM
This revision was automatically updated to reflect the committed changes.