##// END OF EJS Templates
with: use context manager for wlock in shelve stripcmd
Bryan O'Sullivan -
r27839:7ec3cb24 default
parent child Browse files
Show More
@@ -133,8 +133,7 b' def stripcmd(ui, repo, *revs, **opts):'
133 revs = list(revs) + opts.get('rev')
133 revs = list(revs) + opts.get('rev')
134 revs = set(scmutil.revrange(repo, revs))
134 revs = set(scmutil.revrange(repo, revs))
135
135
136 wlock = repo.wlock()
136 with repo.wlock():
137 try:
138 bookmarks = set(opts.get('bookmark'))
137 bookmarks = set(opts.get('bookmark'))
139 if bookmarks:
138 if bookmarks:
140 repomarks = repo._bookmarks
139 repomarks = repo._bookmarks
@@ -232,7 +231,5 b' def stripcmd(ui, repo, *revs, **opts):'
232
231
233 strip(ui, repo, revs, backup=backup, update=update,
232 strip(ui, repo, revs, backup=backup, update=update,
234 force=opts.get('force'), bookmarks=bookmarks)
233 force=opts.get('force'), bookmarks=bookmarks)
235 finally:
236 wlock.release()
237
234
238 return 0
235 return 0
General Comments 0
You need to be logged in to leave comments. Login now