--- a/hgext/strip.py Mon Jun 19 11:18:12 2017 -0700
+++ b/hgext/strip.py Mon Jun 19 11:17:31 2017 -0700
@@ -59,10 +59,7 @@
return s
def strip(ui, repo, revs, update=True, backup=True, force=None, bookmarks=None):
- wlock = lock = None
- try:
- wlock = repo.wlock()
- lock = repo.lock()
+ with repo.wlock(), repo.lock():
if update:
checklocalchanges(repo, force=force)
@@ -86,9 +83,6 @@
repomarks.recordchange(tr)
for bookmark in sorted(bookmarks):
ui.write(_("bookmark '%s' deleted\n") % bookmark)
- finally:
- release(lock, wlock)
-
@command("strip",
[