Show More
@@ -461,30 +461,27 b' def pathtofiles(repo, files):' | |||
|
461 | 461 | |
|
462 | 462 | def unshelveabort(ui, repo, state, opts): |
|
463 | 463 | """subcommand that abort an in-progress unshelve""" |
|
464 | lock = None | |
|
465 | try: | |
|
466 | checkparents(repo, state) | |
|
467 | ||
|
468 | util.rename(repo.join('unshelverebasestate'), | |
|
469 | repo.join('rebasestate')) | |
|
464 | with repo.lock(): | |
|
470 | 465 | try: |
|
471 | rebase.rebase(ui, repo, **{ | |
|
472 | 'abort' : True | |
|
473 | }) | |
|
474 | except Exception: | |
|
475 | util.rename(repo.join('rebasestate'), | |
|
476 | repo.join('unshelverebasestate')) | |
|
477 | raise | |
|
466 | checkparents(repo, state) | |
|
478 | 467 | |
|
479 | lock = repo.lock() | |
|
480 | ||
|
481 | mergefiles(ui, repo, state.wctx, state.pendingctx) | |
|
468 | util.rename(repo.join('unshelverebasestate'), | |
|
469 | repo.join('rebasestate')) | |
|
470 | try: | |
|
471 | rebase.rebase(ui, repo, **{ | |
|
472 | 'abort' : True | |
|
473 | }) | |
|
474 | except Exception: | |
|
475 | util.rename(repo.join('rebasestate'), | |
|
476 | repo.join('unshelverebasestate')) | |
|
477 | raise | |
|
482 | 478 | |
|
483 | repair.strip(ui, repo, state.stripnodes, backup=False, topic='shelve') | |
|
484 | finally: | |
|
485 | shelvedstate.clear(repo) | |
|
486 | ui.warn(_("unshelve of '%s' aborted\n") % state.name) | |
|
487 | lockmod.release(lock) | |
|
479 | mergefiles(ui, repo, state.wctx, state.pendingctx) | |
|
480 | repair.strip(ui, repo, state.stripnodes, backup=False, | |
|
481 | topic='shelve') | |
|
482 | finally: | |
|
483 | shelvedstate.clear(repo) | |
|
484 | ui.warn(_("unshelve of '%s' aborted\n") % state.name) | |
|
488 | 485 | |
|
489 | 486 | def mergefiles(ui, repo, wctx, shelvectx): |
|
490 | 487 | """updates to wctx and merges the changes from shelvectx into the |
General Comments 0
You need to be logged in to leave comments.
Login now