Details
Details
- Reviewers
quark - Group Reviewers
Restricted Project - Commits
- rFBHGX3bfc430c40eb: compat: add support for hg >= 33a6eee0
Diff Detail
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Lint
Lint Skipped - Unit
Unit Tests Skipped
quark |
Restricted Project |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | remotefilelog/fileserverclient.py (20 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
# large) request, but then we show nice progress as we process | # large) request, but then we show nice progress as we process | ||||
# file results, rather than showing chunks of $batchsize in | # file results, rather than showing chunks of $batchsize in | ||||
# progress. | # progress. | ||||
# | # | ||||
# Over ssh, iterbatch isn't streamy because batch() wasn't | # Over ssh, iterbatch isn't streamy because batch() wasn't | ||||
# explicitly designed as a streaming method. In the future we | # explicitly designed as a streaming method. In the future we | ||||
# should probably introduce a streambatch() method upstream and | # should probably introduce a streambatch() method upstream and | ||||
# use that for this. | # 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') | if (getattr(remote, 'iterbatch', False) and remote.capable('httppostargs') | ||||
and isinstance(remote, httppeer.httppeer)): | and isinstance(remote, httppeer.httppeer)): | ||||
b = remote.iterbatch() | b = remote.iterbatch() | ||||
for m in missed: | for m in missed: | ||||
file_ = idmap[m] | file_ = idmap[m] | ||||
node = m[-40:] | node = m[-40:] | ||||
b.getfile(file_, node) | b.getfile(file_, node) | ||||
b.submit() | b.submit() |