diff --git a/remotefilelog/fileserverclient.py b/remotefilelog/fileserverclient.py --- a/remotefilelog/fileserverclient.py +++ b/remotefilelog/fileserverclient.py @@ -216,20 +216,20 @@ # use that for this. if (util.safehasattr(remote, 'commandexecutor')): - futures = [] with remote.commandexecutor() as e: + futures = [] 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() + 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')