##// 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 133 revs = list(revs) + opts.get('rev')
134 134 revs = set(scmutil.revrange(repo, revs))
135 135
136 wlock = repo.wlock()
137 try:
136 with repo.wlock():
138 137 bookmarks = set(opts.get('bookmark'))
139 138 if bookmarks:
140 139 repomarks = repo._bookmarks
@@ -232,7 +231,5 b' def stripcmd(ui, repo, *revs, **opts):'
232 231
233 232 strip(ui, repo, revs, backup=backup, update=update,
234 233 force=opts.get('force'), bookmarks=bookmarks)
235 finally:
236 wlock.release()
237 234
238 235 return 0
General Comments 0
You need to be logged in to leave comments. Login now