Show More
@@ -354,9 +354,19 b' def processbundle(repo, unbundler, trans' | |||
|
354 | 354 | for nbpart, part in iterparts: |
|
355 | 355 | _processpart(op, part) |
|
356 | 356 | except Exception as exc: |
|
357 | for nbpart, part in iterparts: | |
|
358 | # consume the bundle content | |
|
359 | part.seek(0, 2) | |
|
357 | # Any exceptions seeking to the end of the bundle at this point are | |
|
358 | # almost certainly related to the underlying stream being bad. | |
|
359 | # And, chances are that the exception we're handling is related to | |
|
360 | # getting in that bad state. So, we swallow the seeking error and | |
|
361 | # re-raise the original error. | |
|
362 | seekerror = False | |
|
363 | try: | |
|
364 | for nbpart, part in iterparts: | |
|
365 | # consume the bundle content | |
|
366 | part.seek(0, 2) | |
|
367 | except Exception: | |
|
368 | seekerror = True | |
|
369 | ||
|
360 | 370 | # Small hack to let caller code distinguish exceptions from bundle2 |
|
361 | 371 | # processing from processing the old format. This is mostly |
|
362 | 372 | # needed to handle different return codes to unbundle according to the |
@@ -370,7 +380,13 b' def processbundle(repo, unbundler, trans' | |||
|
370 | 380 | replycaps = op.reply.capabilities |
|
371 | 381 | exc._replycaps = replycaps |
|
372 | 382 | exc._bundle2salvagedoutput = salvaged |
|
373 | raise | |
|
383 | ||
|
384 | # Re-raising from a variable loses the original stack. So only use | |
|
385 | # that form if we need to. | |
|
386 | if seekerror: | |
|
387 | raise exc | |
|
388 | else: | |
|
389 | raise | |
|
374 | 390 | finally: |
|
375 | 391 | repo.ui.debug('bundle2-input-bundle: %i parts total\n' % nbpart) |
|
376 | 392 |
@@ -688,7 +688,8 b' Server stops sending after bundle2 part ' | |||
|
688 | 688 | adding changesets |
|
689 | 689 | transaction abort! |
|
690 | 690 | rollback completed |
|
691 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
|
691 | abort: HTTP request error (incomplete response) | |
|
692 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) | |
|
692 | 693 | [255] |
|
693 | 694 | |
|
694 | 695 | $ killdaemons.py $DAEMON_PIDS |
@@ -717,7 +718,8 b' Server stops after bundle2 part payload ' | |||
|
717 | 718 | adding changesets |
|
718 | 719 | transaction abort! |
|
719 | 720 | rollback completed |
|
720 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
|
721 | abort: HTTP request error (incomplete response) | |
|
722 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) | |
|
721 | 723 | [255] |
|
722 | 724 | |
|
723 | 725 | $ killdaemons.py $DAEMON_PIDS |
@@ -747,7 +749,8 b' Server stops sending in middle of bundle' | |||
|
747 | 749 | adding changesets |
|
748 | 750 | transaction abort! |
|
749 | 751 | rollback completed |
|
750 | abort: stream ended unexpectedly (got 0 bytes, expected 4) | |
|
752 | abort: HTTP request error (incomplete response) | |
|
753 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) | |
|
751 | 754 | [255] |
|
752 | 755 | |
|
753 | 756 | $ killdaemons.py $DAEMON_PIDS |
General Comments 0
You need to be logged in to leave comments.
Login now