##// END OF EJS Templates
strip: use repo._bookmarks.recordchange instead of repo._bookmarks.write...
Laurent Charignon -
r27052:b9d0b45d default
parent child Browse files
Show More
@@ -64,13 +64,19 b' def strip(ui, repo, revs, update=True, b'
64 64
65 65 repomarks = repo._bookmarks
66 66 if bookmarks:
67 if repo._activebookmark in bookmarks:
68 bookmarksmod.deactivate(repo)
69 for bookmark in bookmarks:
70 del repomarks[bookmark]
71 repomarks.write()
72 for bookmark in sorted(bookmarks):
73 ui.write(_("bookmark '%s' deleted\n") % bookmark)
67 tr = None
68 try:
69 tr = repo.transaction('strip')
70 if repo._activebookmark in bookmarks:
71 bookmarksmod.deactivate(repo)
72 for bookmark in bookmarks:
73 del repomarks[bookmark]
74 repomarks.recordchange(tr)
75 tr.close()
76 for bookmark in sorted(bookmarks):
77 ui.write(_("bookmark '%s' deleted\n") % bookmark)
78 finally:
79 release(tr)
74 80 finally:
75 81 release(lock, wlock)
76 82
@@ -147,11 +153,18 b' def stripcmd(ui, repo, *revs, **opts):'
147 153 rsrevs = repair.stripbmrevset(repo, marks[0])
148 154 revs.update(set(rsrevs))
149 155 if not revs:
150 for bookmark in bookmarks:
151 del repomarks[bookmark]
152 repomarks.write()
153 for bookmark in sorted(bookmarks):
154 ui.write(_("bookmark '%s' deleted\n") % bookmark)
156 lock = tr = None
157 try:
158 lock = repo.lock()
159 tr = repo.transaction('bookmark')
160 for bookmark in bookmarks:
161 del repomarks[bookmark]
162 repomarks.recordchange(tr)
163 tr.close()
164 for bookmark in sorted(bookmarks):
165 ui.write(_("bookmark '%s' deleted\n") % bookmark)
166 finally:
167 release(lock, tr)
155 168
156 169 if not revs:
157 170 raise error.Abort(_('empty revision set'))
General Comments 0
You need to be logged in to leave comments. Login now