diff --git a/remotefilelog/fileserverclient.py b/remotefilelog/fileserverclient.py --- a/remotefilelog/fileserverclient.py +++ b/remotefilelog/fileserverclient.py @@ -207,6 +207,26 @@ # explicitly designed as a streaming method. In the future we # should probably introduce a streambatch() method upstream and # use that for this. + if (util.safehasattr(remote, 'commandexecutor') + and remote.capable('httppostargs') + and isinstance(remote, httppeer.httppeer)): + + futures = [] + with remote.commandexecutor() as e: + for m in missed: + futures.append(e.callcommand('getfile', { + 'file': idmap[m], + 'node': m[-40:] + })) + + for m, future in itertools.izip(missed, futures): + r = future.result() + file_ = idmap[m] + node = m[-40:] + receivemissing(io.BytesIO('%d\n%s' % (len(r), r)), file_, node) + progresstick() + return + if (getattr(remote, 'iterbatch', False) and remote.capable('httppostargs') and isinstance(remote, httppeer.httppeer)): b = remote.iterbatch()