##// END OF EJS Templates
shelve: remove redundant acquisition of wlock for sub commands of unshelve...
FUJIWARA Katsunori -
r27288:c14af2d4 default
parent child Browse files
Show More
@@ -473,7 +473,6 b' def pathtofiles(repo, files):'
473
473
474 def unshelveabort(ui, repo, state, opts):
474 def unshelveabort(ui, repo, state, opts):
475 """subcommand that abort an in-progress unshelve"""
475 """subcommand that abort an in-progress unshelve"""
476 wlock = repo.wlock()
477 lock = None
476 lock = None
478 try:
477 try:
479 checkparents(repo, state)
478 checkparents(repo, state)
@@ -497,7 +496,7 b' def unshelveabort(ui, repo, state, opts)'
497 finally:
496 finally:
498 shelvedstate.clear(repo)
497 shelvedstate.clear(repo)
499 ui.warn(_("unshelve of '%s' aborted\n") % state.name)
498 ui.warn(_("unshelve of '%s' aborted\n") % state.name)
500 lockmod.release(lock, wlock)
499 lockmod.release(lock)
501
500
502 def mergefiles(ui, repo, wctx, shelvectx):
501 def mergefiles(ui, repo, wctx, shelvectx):
503 """updates to wctx and merges the changes from shelvectx into the
502 """updates to wctx and merges the changes from shelvectx into the
@@ -533,7 +532,6 b' def unshelvecontinue(ui, repo, state, op'
533 """subcommand to continue an in-progress unshelve"""
532 """subcommand to continue an in-progress unshelve"""
534 # We're finishing off a merge. First parent is our original
533 # We're finishing off a merge. First parent is our original
535 # parent, second is the temporary "fake" commit we're unshelving.
534 # parent, second is the temporary "fake" commit we're unshelving.
536 wlock = repo.wlock()
537 lock = None
535 lock = None
538 try:
536 try:
539 checkparents(repo, state)
537 checkparents(repo, state)
@@ -571,7 +569,7 b' def unshelvecontinue(ui, repo, state, op'
571 unshelvecleanup(ui, repo, state.name, opts)
569 unshelvecleanup(ui, repo, state.name, opts)
572 ui.status(_("unshelve of '%s' complete\n") % state.name)
570 ui.status(_("unshelve of '%s' complete\n") % state.name)
573 finally:
571 finally:
574 lockmod.release(lock, wlock)
572 lockmod.release(lock)
575
573
576 @command('unshelve',
574 @command('unshelve',
577 [('a', 'abort', None,
575 [('a', 'abort', None,
General Comments 0
You need to be logged in to leave comments. Login now