# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1499699456 -7200 # Mon Jul 10 17:10:56 2017 +0200 # Node ID 34170eeaa6fbfb43b1ceac331ae50678afe10610 # Parent 9f589c0e64901c5a15add541d5213574664fa218 # EXP-Topic tr.changes.bookmarks bookmark: use 'applychanges' for adding new bookmark
diff -r 9f589c0e6490 -r 34170eeaa6fb mercurial/bookmarks.py --- a/mercurial/bookmarks.py Mon Jul 10 17:08:20 2017 +0200 +++ b/mercurial/bookmarks.py Mon Jul 10 17:10:56 2017 +0200 @@ -758,6 +758,7 @@ marks = repo._bookmarks cur = repo.changectx('.').node() newact = None + changes = [] for mark in names: mark = checkformat(repo, mark) if newact is None: @@ -769,12 +770,12 @@ if rev: tgt = scmutil.revsingle(repo, rev).node() marks.checkconflict(mark, force, tgt) - marks[mark] = tgt + changes.append((mark, tgt)) + marks.applychanges(repo, tr, changes) if not inactive and cur == marks[newact] and not rev: activate(repo, newact) elif cur != tgt and newact == repo._activebookmark: deactivate(repo) - marks.recordchange(tr) def _printbookmarks(ui, repo, bmarks, **opts): """private method to print bookmarks _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel