This is an archive of the discontinued Mercurial Phabricator instance.

streamclone: pass includes and excludes to fn generating clones
AbandonedPublic

Authored by pulkit on Sep 27 2018, 4:27 PM.

Details

Reviewers
durin42
indygreg
Group Reviewers
hg-reviewers
Summary

This patch adds includes and excludes as argument to couple of functions which
generates the streamclone. The goal is to filter out the data according to user
passed includes and excludes.

I need to develop some API's which can be used to filter the streamclone data
and not depend on revlog-specific API's. So for now, we just raise an error
saying this is not implemented.

This patch adds a test showing that code is working and we are correctly passing
includes and excludes around.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Sep 27 2018, 4:27 PM
indygreg requested changes to this revision.Oct 1 2018, 1:30 PM
indygreg added a subscriber: indygreg.

I'm +1 on the direction of this series.

I think we should make the feature stream clone version 2 only, as it requires client-side features and clients will presumably be using stream clone version 2. So supporting version 1 stream clones feels like avoidable complexity.

We may also want to make server advertisement of the capability conditional on a value in repo.features. Then we can have revlog-based repos add that feature in localrepo.makefilestorage(). This is because not all storage backends will support narrow stream clone and I think it is something that a storage backend should opt into.

It may also help to reorder the series so the streamclone.py changes come before the wire protocol bits, as they are less controversial and could be committed earlier.

This revision now requires changes to proceed.Oct 1 2018, 1:30 PM
pulkit abandoned this revision.Jan 29 2019, 6:58 AM