This is an archive of the discontinued Mercurial Phabricator instance.

wireprotov2: define and implement "filerevision" command
AbandonedPublic

Authored by indygreg on May 11 2018, 6:35 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

The new wire protocol command introduced in this commit allows
obtaining the fulltext revision data for a single file revision.

Using this plus the recently introduced "filehistory" command, the
server pieces are in place to support partial clones of file data.
One could imagine a client that fetches manifest and then issues 1
filerevision command per file to obtain fulltext file data in order
to construct a checkout.

There is still a bit of work to be done here. For example, we haven't
yet codified flag handling. We obviously can't ignore this problem.

There is also the issue of scalability. The client will need to issue
at least 1 - probably 2 - commands per tracked file in order to
perform a checkout. Even with wire protocol version 2's ability to
batch every command, this will require transmitting a bit of data
from client to server. There will also be server overhead processing
potentially hundreds of thousands of command requests. I plan to
implement support for a multi-fetch command. But I think a simple
command that operates on single files is useful. Wire protocol
version 2 is all highly experimental. So we can change and remove
anything at any time.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped