##// END OF EJS Templates
with: use context manager in unshelveabort
Bryan O'Sullivan -
r27841:83995fdd default
parent child Browse files
Show More
@@ -461,7 +461,7 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
464 with repo.lock():
465 465 try:
466 466 checkparents(repo, state)
467 467
@@ -476,15 +476,12 def unshelveabort(ui, repo, state, opts)
476 476 repo.join('unshelverebasestate'))
477 477 raise
478 478
479 lock = repo.lock()
480
481 479 mergefiles(ui, repo, state.wctx, state.pendingctx)
482
483 repair.strip(ui, repo, state.stripnodes, backup=False, topic='shelve')
480 repair.strip(ui, repo, state.stripnodes, backup=False,
481 topic='shelve')
484 482 finally:
485 483 shelvedstate.clear(repo)
486 484 ui.warn(_("unshelve of '%s' aborted\n") % state.name)
487 lockmod.release(lock)
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