Show More
@@ -156,18 +156,12 b' def stripcmd(ui, repo, *revs, **opts):' | |||
|
156 | 156 | rsrevs = repair.stripbmrevset(repo, marks[0]) |
|
157 | 157 | revs.update(set(rsrevs)) |
|
158 | 158 | if not revs: |
|
159 | lock = tr = None | |
|
160 | try: | |
|
161 | lock = repo.lock() | |
|
162 | tr = repo.transaction('bookmark') | |
|
159 | with repo.lock(), repo.transaction('bookmark') as tr: | |
|
163 | 160 | for bookmark in bookmarks: |
|
164 | 161 | del repomarks[bookmark] |
|
165 | 162 | repomarks.recordchange(tr) |
|
166 | tr.close() | |
|
167 | for bookmark in sorted(bookmarks): | |
|
168 | ui.write(_("bookmark '%s' deleted\n") % bookmark) | |
|
169 | finally: | |
|
170 | release(lock, tr) | |
|
163 | for bookmark in sorted(bookmarks): | |
|
164 | ui.write(_("bookmark '%s' deleted\n") % bookmark) | |
|
171 | 165 | |
|
172 | 166 | if not revs: |
|
173 | 167 | raise error.Abort(_('empty revision set')) |
General Comments 0
You need to be logged in to leave comments.
Login now