##// END OF EJS Templates
rebase: use context manager for locking in rebase()
Martin von Zweigbergk -
r32917:070920db default
parent child Browse files
Show More
@@ -683,11 +683,7 b' def rebase(ui, repo, **opts):'
683 """
683 """
684 rbsrt = rebaseruntime(repo, ui, opts)
684 rbsrt = rebaseruntime(repo, ui, opts)
685
685
686 lock = wlock = None
686 with repo.wlock(), repo.lock():
687 try:
688 wlock = repo.wlock()
689 lock = repo.lock()
690
691 # Validate input and define rebasing points
687 # Validate input and define rebasing points
692 destf = opts.get('dest', None)
688 destf = opts.get('dest', None)
693 srcf = opts.get('source', None)
689 srcf = opts.get('source', None)
@@ -753,8 +749,6 b' def rebase(ui, repo, **opts):'
753 release(dsguard)
749 release(dsguard)
754 raise
750 raise
755 rbsrt._finishrebase()
751 rbsrt._finishrebase()
756 finally:
757 release(lock, wlock)
758
752
759 def _definesets(ui, repo, destf=None, srcf=None, basef=None, revf=None,
753 def _definesets(ui, repo, destf=None, srcf=None, basef=None, revf=None,
760 destspace=None):
754 destspace=None):
General Comments 0
You need to be logged in to leave comments. Login now