--- a/hgext/rebase.py Mon Jun 19 21:53:54 2017 -0400
+++ b/hgext/rebase.py Mon Jun 19 11:18:05 2017 -0700
@@ -683,11 +683,7 @@
"""
rbsrt = rebaseruntime(repo, ui, opts)
- lock = wlock = None
- try:
- wlock = repo.wlock()
- lock = repo.lock()
-
+ with repo.wlock(), repo.lock():
# Validate input and define rebasing points
destf = opts.get('dest', None)
srcf = opts.get('source', None)
@@ -753,8 +749,6 @@
release(dsguard)
raise
rbsrt._finishrebase()
- finally:
- release(lock, wlock)
def _definesets(ui, repo, destf=None, srcf=None, basef=None, revf=None,
destspace=None):