Show More
@@ -460,14 +460,9 b' def _processchangegroup(op, cg, tr, sour' | |||||
460 | }) |
|
460 | }) | |
461 | return ret |
|
461 | return ret | |
462 |
|
462 | |||
463 |
def _ |
|
463 | def _gethandler(op, part): | |
464 | """process a single part from a bundle |
|
|||
465 |
|
||||
466 | The part is guaranteed to have been fully consumed when the function exits |
|
|||
467 | (even if an exception is raised).""" |
|
|||
468 | status = 'unknown' # used by debug output |
|
464 | status = 'unknown' # used by debug output | |
469 | try: |
|
465 | try: | |
470 | try: |
|
|||
471 |
|
|
466 | handler = parthandlermapping.get(part.type) | |
472 |
|
|
467 | if handler is None: | |
473 |
|
|
468 | status = 'unsupported-type' | |
@@ -503,6 +498,18 b' def _processpart(op, part):' | |||||
503 |
|
|
498 | msg.append(' %s\n' % status) | |
504 |
|
|
499 | op.ui.debug(''.join(msg)) | |
505 |
|
500 | |||
|
501 | return handler | |||
|
502 | ||||
|
503 | def _processpart(op, part): | |||
|
504 | """process a single part from a bundle | |||
|
505 | ||||
|
506 | The part is guaranteed to have been fully consumed when the function exits | |||
|
507 | (even if an exception is raised).""" | |||
|
508 | try: | |||
|
509 | handler = _gethandler(op, part) | |||
|
510 | if handler is None: | |||
|
511 | return | |||
|
512 | ||||
506 | # handler is called outside the above try block so that we don't |
|
513 | # handler is called outside the above try block so that we don't | |
507 | # risk catching KeyErrors from anything other than the |
|
514 | # risk catching KeyErrors from anything other than the | |
508 | # parthandlermapping lookup (any KeyError raised by handler() |
|
515 | # parthandlermapping lookup (any KeyError raised by handler() |
General Comments 0
You need to be logged in to leave comments.
Login now