comparison mercurial/configitems.py @ 40178:46a40bce3ae0

wireprotov2: define and implement "filesdata" command Previously, the only way to access file revision data was the "filedata" command. This command is useful to have. But, it only allowed resolving revision data for a single file. This meant that clients needed to send 1 command for each tracked path they were seeking data on. Furthermore, those commands would need to enumerate the exact file nodes they wanted data for. This approach meant that clients were sending a lot of data to remotes in order to request file data. e.g. if there were 1M file revisions, we'd need at least 20,000,000 bytes just to encode file nodes! Many clients on the internet don't have that kind of upload capacity. In order to limit the amount of data that clients must send, we'll need more efficient ways to request repository data. This commit defines and implements a new "filesdata" command. This command allows the retrieval of data for multiple files by specifying changeset revisions and optional file patterns. The command figures out what file revisions are "relevant" and sends them in bulk. The logic around choosing which file revisions to send in the case of haveparents not being set is overly simple and will over-send files. We will need more smarts here eventually. (Specifically, the client will need to tell the server which revisions it knows about.) This work is deferred until a later time. Differential Revision: https://phab.mercurial-scm.org/D4981
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 03 Oct 2018 12:54:39 -0700
parents 30f70d11c224
children 682f73fa924a
comparison
equal deleted inserted replaced
40177:41e2633bcd00 40178:46a40bce3ae0
602 default=None, 602 default=None,
603 ) 603 )
604 coreconfigitem('experimental', 'revisions.disambiguatewithin', 604 coreconfigitem('experimental', 'revisions.disambiguatewithin',
605 default=None, 605 default=None,
606 ) 606 )
607 coreconfigitem('experimental', 'server.filesdata.recommended-batch-size',
608 default=50000,
609 )
607 coreconfigitem('experimental', 'server.manifestdata.recommended-batch-size', 610 coreconfigitem('experimental', 'server.manifestdata.recommended-batch-size',
608 default=100000, 611 default=100000,
609 ) 612 )
610 coreconfigitem('experimental', 'single-head-per-branch', 613 coreconfigitem('experimental', 'single-head-per-branch',
611 default=False, 614 default=False,