Show More
@@ -353,7 +353,7 b' def processbundle(repo, unbundler, trans' | |||
|
353 | 353 | try: |
|
354 | 354 | for nbpart, part in iterparts: |
|
355 | 355 | _processpart(op, part) |
|
356 |
except |
|
|
356 | except Exception as exc: | |
|
357 | 357 | for nbpart, part in iterparts: |
|
358 | 358 | # consume the bundle content |
|
359 | 359 | part.seek(0, 2) |
@@ -382,6 +382,7 b' def _processpart(op, part):' | |||
|
382 | 382 | The part is guaranteed to have been fully consumed when the function exits |
|
383 | 383 | (even if an exception is raised).""" |
|
384 | 384 | status = 'unknown' # used by debug output |
|
385 | hardabort = False | |
|
385 | 386 | try: |
|
386 | 387 | try: |
|
387 | 388 | handler = parthandlermapping.get(part.type) |
@@ -436,9 +437,15 b' def _processpart(op, part):' | |||
|
436 | 437 | outpart = op.reply.newpart('output', data=output, |
|
437 | 438 | mandatory=False) |
|
438 | 439 | outpart.addparam('in-reply-to', str(part.id), mandatory=False) |
|
440 | # If exiting or interrupted, do not attempt to seek the stream in the | |
|
441 | # finally block below. This makes abort faster. | |
|
442 | except (SystemExit, KeyboardInterrupt): | |
|
443 | hardabort = True | |
|
444 | raise | |
|
439 | 445 | finally: |
|
440 | 446 | # consume the part content to not corrupt the stream. |
|
441 | part.seek(0, 2) | |
|
447 | if not hardabort: | |
|
448 | part.seek(0, 2) | |
|
442 | 449 | |
|
443 | 450 | |
|
444 | 451 | def decodecaps(blob): |
General Comments 0
You need to be logged in to leave comments.
Login now