Mercurial > hg
changeset 28437:c3eacee01c7e
setdiscovery: use iterbatch interface instead of batch
It's a little more concise, and gives us some simple test coverage.
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 01 Mar 2016 17:44:41 -0500 |
parents | 8d38eab2777a |
children | 48fd02dac1d4 |
files | mercurial/setdiscovery.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/setdiscovery.py Tue Mar 01 18:39:25 2016 -0500 +++ b/mercurial/setdiscovery.py Tue Mar 01 17:44:41 2016 -0500 @@ -147,12 +147,11 @@ sample = _limitsample(ownheads, initialsamplesize) # indices between sample and externalized version must match sample = list(sample) - batch = remote.batch() - srvheadhashesref = batch.heads() - yesnoref = batch.known(dag.externalizeall(sample)) + batch = remote.iterbatch() + batch.heads() + batch.known(dag.externalizeall(sample)) batch.submit() - srvheadhashes = srvheadhashesref.value - yesno = yesnoref.value + srvheadhashes, yesno = batch.results() if cl.tip() == nullid: if srvheadhashes != [nullid]: