Show More
@@ -201,7 +201,9 b' def callcatch(ui, func):' | |||||
201 | msg = inst.args[1] |
|
201 | msg = inst.args[1] | |
202 | if isinstance(msg, type(u'')): |
|
202 | if isinstance(msg, type(u'')): | |
203 | msg = pycompat.sysbytes(msg) |
|
203 | msg = pycompat.sysbytes(msg) | |
204 | if not isinstance(msg, bytes): |
|
204 | if msg is None: | |
|
205 | ui.error(b"\n") | |||
|
206 | elif not isinstance(msg, bytes): | |||
205 | ui.error(b" %r\n" % (msg,)) |
|
207 | ui.error(b" %r\n" % (msg,)) | |
206 | elif not msg: |
|
208 | elif not msg: | |
207 | ui.error(_(b" empty string\n")) |
|
209 | ui.error(_(b" empty string\n")) |
@@ -310,7 +310,7 b' class peerexecutor(object):' | |||||
310 | if not f.done(): |
|
310 | if not f.done(): | |
311 | f.set_exception( |
|
311 | f.set_exception( | |
312 | error.ResponseError( |
|
312 | error.ResponseError( | |
313 | _(b'unfulfilled batch command response') |
|
313 | _(b'unfulfilled batch command response'), None | |
314 | ) |
|
314 | ) | |
315 | ) |
|
315 | ) | |
316 |
|
316 | |||
@@ -322,16 +322,27 b' class peerexecutor(object):' | |||||
322 | for command, f, batchable, fremote in states: |
|
322 | for command, f, batchable, fremote in states: | |
323 | # Grab raw result off the wire and teach the internal future |
|
323 | # Grab raw result off the wire and teach the internal future | |
324 | # about it. |
|
324 | # about it. | |
325 | remoteresult = next(wireresults) |
|
325 | try: | |
326 | fremote.set(remoteresult) |
|
326 | remoteresult = next(wireresults) | |
|
327 | except StopIteration: | |||
|
328 | # This can happen in particular because next(batchable) | |||
|
329 | # in the previous iteration can call peer._abort, which | |||
|
330 | # may close the peer. | |||
|
331 | f.set_exception( | |||
|
332 | error.ResponseError( | |||
|
333 | _(b'unfulfilled batch command response'), None | |||
|
334 | ) | |||
|
335 | ) | |||
|
336 | else: | |||
|
337 | fremote.set(remoteresult) | |||
327 |
|
338 | |||
328 | # And ask the coroutine to decode that value. |
|
339 | # And ask the coroutine to decode that value. | |
329 | try: |
|
340 | try: | |
330 | result = next(batchable) |
|
341 | result = next(batchable) | |
331 | except Exception: |
|
342 | except Exception: | |
332 | pycompat.future_set_exception_info(f, sys.exc_info()[1:]) |
|
343 | pycompat.future_set_exception_info(f, sys.exc_info()[1:]) | |
333 | else: |
|
344 | else: | |
334 | f.set_result(result) |
|
345 | f.set_result(result) | |
335 |
|
346 | |||
336 |
|
347 | |||
337 | @interfaceutil.implementer( |
|
348 | @interfaceutil.implementer( |
@@ -9,5 +9,7 b' Checking that when lookup multiple bookm' | |||||
9 | fails (thus causing the sshpeer to be stopped), the errors from the |
|
9 | fails (thus causing the sshpeer to be stopped), the errors from the | |
10 | further lookups don't result in tracebacks. |
|
10 | further lookups don't result in tracebacks. | |
11 |
|
11 | |||
12 |
$ hg pull -r b0 -r nosuchbookmark $(for i in $($TESTDIR/seq.py 1 20); do echo -r b$i; done) -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/$(pwd)/../a |
|
12 | $ hg pull -r b0 -r nosuchbookmark $(for i in $($TESTDIR/seq.py 1 20); do echo -r b$i; done) -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/$(pwd)/../a | |
13 | StopIteration |
|
13 | pulling from ssh://user@dummy/$TESTTMP/b/../a | |
|
14 | abort: unknown revision 'nosuchbookmark' | |||
|
15 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now