# HG changeset patch
# User Boris Feld <boris.f...@octobus.net>
# Date 1499699056 -7200
#      Mon Jul 10 17:04:16 2017 +0200
# Node ID e94048e3d4a0422207fce8c146c6be62fd701f85
# Parent  e94441a7d9e334c5b9e604b9f6cabe4182cd5550
# EXP-Topic tr.changes.bookmarks
bookmark: use 'applychanges' for bookmark deletion

diff -r e94441a7d9e3 -r e94048e3d4a0 mercurial/bookmarks.py
--- a/mercurial/bookmarks.py    Mon Jul 10 17:01:34 2017 +0200
+++ b/mercurial/bookmarks.py    Mon Jul 10 17:04:16 2017 +0200
@@ -715,13 +715,14 @@
     Raises an abort error if mark does not exist.
     """
     marks = repo._bookmarks
+    changes = []
     for mark in names:
         if mark not in marks:
             raise error.Abort(_("bookmark '%s' does not exist") % mark)
         if mark == repo._activebookmark:
             deactivate(repo)
-        del marks[mark]
-    marks.recordchange(tr)
+        changes.append((mark, None))
+    marks.applychanges(repo, tr, changes)
 
 def rename(repo, tr, old, new, force=False, inactive=False):
     """rename a bookmark from old to new
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to