--- 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