Skip to content
Snippets Groups Projects
Commit daceeed34ad2 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

strip: use context manager for locking in strip()

parent 04c9dd951a41
No related branches found
No related tags found
No related merge requests found
......@@ -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",
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment