D4976: exchangev2: honor server advertised manifestdata recommended batch size
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri Oct 12 11:15:59 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb797150a1ab9: exchangev2: honor server advertised manifestdata recommended batch size (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4976?vs=11842&id=11883
REVISION DETAIL
https://phab.mercurial-scm.org/D4976
AFFECTED FILES
mercurial/exchangev2.py
CHANGE DETAILS
diff --git a/mercurial/exchangev2.py b/mercurial/exchangev2.py
--- a/mercurial/exchangev2.py
+++ b/mercurial/exchangev2.py
@@ -268,10 +268,9 @@
progress = repo.ui.makeprogress(_('manifests'), unit=_('chunks'),
total=len(fetchnodes))
- # Fetch manifests 10,000 per command.
- # TODO have server advertise preferences?
+ commandmeta = remote.apidescriptor[b'commands'][b'manifestdata']
+ batchsize = commandmeta.get(b'recommendedbatchsize', 10000)
# TODO make size configurable on client?
- batchsize = 10000
# We send commands 1 at a time to the remote. This is not the most
# efficient because we incur a round trip at the end of each batch.
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list