# HG changeset patch
# User Boris Feld <boris.f...@octobus.net>
# Date 1499699300 -7200
#      Mon Jul 10 17:08:20 2017 +0200
# Node ID 9f589c0e64901c5a15add541d5213574664fa218
# Parent  e94048e3d4a0422207fce8c146c6be62fd701f85
# EXP-Topic tr.changes.bookmarks
bookmark: use 'applychanges' for bookmark renaming

diff -r e94048e3d4a0 -r 9f589c0e6490 mercurial/bookmarks.py
--- 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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to