Show More
@@ -505,32 +505,28 b' def _processpart(op, part):' | |||
|
505 | 505 | |
|
506 | 506 | The part is guaranteed to have been fully consumed when the function exits |
|
507 | 507 | (even if an exception is raised).""" |
|
508 | try: | |
|
509 | handler = _gethandler(op, part) | |
|
510 | if handler is None: | |
|
511 | return | |
|
508 | handler = _gethandler(op, part) | |
|
509 | if handler is None: | |
|
510 | return | |
|
512 | 511 | |
|
513 |
|
|
|
514 |
|
|
|
515 |
|
|
|
516 |
|
|
|
517 |
|
|
|
518 |
|
|
|
519 |
|
|
|
520 |
|
|
|
521 |
|
|
|
522 |
|
|
|
523 | finally: | |
|
524 | if output is not None: | |
|
525 | output = op.ui.popbuffer() | |
|
526 | if output: | |
|
527 | outpart = op.reply.newpart('output', data=output, | |
|
528 | mandatory=False) | |
|
529 | outpart.addparam( | |
|
530 | 'in-reply-to', pycompat.bytestr(part.id), mandatory=False) | |
|
512 | # handler is called outside the above try block so that we don't | |
|
513 | # risk catching KeyErrors from anything other than the | |
|
514 | # parthandlermapping lookup (any KeyError raised by handler() | |
|
515 | # itself represents a defect of a different variety). | |
|
516 | output = None | |
|
517 | if op.captureoutput and op.reply is not None: | |
|
518 | op.ui.pushbuffer(error=True, subproc=True) | |
|
519 | output = '' | |
|
520 | try: | |
|
521 | handler(op, part) | |
|
531 | 522 | finally: |
|
532 | pass | |
|
533 | ||
|
523 | if output is not None: | |
|
524 | output = op.ui.popbuffer() | |
|
525 | if output: | |
|
526 | outpart = op.reply.newpart('output', data=output, | |
|
527 | mandatory=False) | |
|
528 | outpart.addparam( | |
|
529 | 'in-reply-to', pycompat.bytestr(part.id), mandatory=False) | |
|
534 | 530 | |
|
535 | 531 | def decodecaps(blob): |
|
536 | 532 | """decode a bundle2 caps bytes blob into a dictionary |
General Comments 0
You need to be logged in to leave comments.
Login now