This is an archive of the discontinued Mercurial Phabricator instance.

exchangev2: recognize narrow patterns when pulling
AbandonedPublic

Authored by indygreg on Sep 26 2018, 5:44 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

pulloperation instances were recently taught to record file
include and exclude patterns to facilitate narrow file transfer.
Teaching the exchangev2 code to transfer a subset of files is
as simple as constructing a narrow matcher from these patterns and
filtering all seen file paths through it.

In addition to testing presence of revlogs, we also test for presence
of copy/rename metadata when the source revision is outside the
narrow spec. This verifes that our narrow filelog class is working
properly.

Keep in mind that this change only influences file data: we're
still fetching all changeset and manifest data. So, there's still
a ton of "partial clone" to implement in exchangev2.

On a personal note, I derive gratification that this feature requires
very few lines of new code to implement. And notably, none of those
lines influence the parameters sent to the server: the client just
requests less repository data than it did before.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Sep 26 2018, 5:44 PM
indygreg planned changes to this revision.Oct 3 2018, 2:11 PM

I'll be rebasing this locally as part of future feature work. I plan to resubmit again later.

indygreg abandoned this revision.Oct 17 2018, 4:11 AM

I'll resubmit this as part of another series.