This is an archive of the discontinued Mercurial Phabricator instance.

narrow: add 'narrowstream' server capability to use streamclones with narrow
AbandonedPublic

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

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

This patch adds a new server capability "narrowstream" which will dictate
whether the server is capable of serving narrow-stream clones or not.

This also add support for getting include and exclude arguments as part of
stream_out wireprotocol call. We don't use those arguments yet, but we will use
in future.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Sep 27 2018, 4:27 PM

This series works on streamclone v1 right now because I ran into that codepath first and also that's what we use right now. I looked into the code for v2 streamclone and once I get narrow clones working for v1, I will make sure we support v2.

Since this feature will require Mercurial 4.8 and since stream clone v2 is enabled by default in 4.8, I have a moderate preference for not changing the stream_out command to support narrow stream clones. i.e. why introduce complexity on that command when it will likely never be used.

mercurial/wireprotov1server.py
550–551

This will need a decodelist().

Abandoning this stack as narrow stream clones were implemented using streamclone v2.

pulkit abandoned this revision.Jan 29 2019, 6:58 AM