Mercurial > hg
changeset 33482:916d4cde530e
bookmark: use 'applychanges' for bookmark renaming
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 10 Jul 2017 17:08:20 +0200 |
parents | 67b5f81f17cf |
children | 146c0371eadf |
files | mercurial/bookmarks.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Mon Jul 10 17:04:16 2017 +0200 +++ b/mercurial/bookmarks.py Mon Jul 10 17:08:20 2017 +0200 @@ -739,11 +739,10 @@ if old not in marks: raise error.Abort(_("bookmark '%s' does not exist") % old) marks.checkconflict(mark, force) - marks[mark] = marks[old] + changes = [(mark, marks[old]), (old, None)] + marks.applychanges(repo, tr, changes) if repo._activebookmark == old and not inactive: activate(repo, mark) - del marks[old] - marks.recordchange(tr) def addbookmarks(repo, tr, names, rev=None, force=False, inactive=False): """add a list of bookmarks