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