Mercurial > hg-stable
changeset 33488:eb344bbac18c
bookmark: use 'applychanges' when stripping
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 10 Jul 2017 17:37:48 +0200 |
parents | a050d37c2c70 |
children | 870560c759ed |
files | hgext/strip.py |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/strip.py Mon Jul 10 17:30:20 2017 +0200 +++ b/hgext/strip.py Mon Jul 10 17:37:48 2017 +0200 @@ -78,9 +78,7 @@ with repo.transaction('strip') as tr: if repo._activebookmark in bookmarks: bookmarksmod.deactivate(repo) - for bookmark in bookmarks: - del repomarks[bookmark] - repomarks.recordchange(tr) + repomarks.applychanges(repo, tr, [(b, None) for b in bookmarks]) for bookmark in sorted(bookmarks): ui.write(_("bookmark '%s' deleted\n") % bookmark) @@ -157,9 +155,8 @@ revs.update(set(rsrevs)) if not revs: with repo.lock(), repo.transaction('bookmark') as tr: - for bookmark in bookmarks: - del repomarks[bookmark] - repomarks.recordchange(tr) + bmchanges = [(b, None) for b in bookmarks] + repomarks.applychanges(repo, tr, bmchanges) for bookmark in sorted(bookmarks): ui.write(_("bookmark '%s' deleted\n") % bookmark)