[PATCH 06 of 12] bookmark: use 'applychanges' when updating a bookmark through pushkey

Boris Feld boris.feld at octobus.net
Fri Jul 14 13:54:04 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1499700268 -7200
#      Mon Jul 10 17:24:28 2017 +0200
# Node ID 1fc04ebe411862e9648382fa2a0790d8bdaf3862
# Parent  76dde98a2c0bc24ab110ba3ecc06698c735adf57
# EXP-Topic tr.changes.bookmarks
bookmark: use 'applychanges' when updating a bookmark through pushkey

diff -r 76dde98a2c0b -r 1fc04ebe4118 mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Mon Jul 10 17:22:17 2017 +0200
+++ b/mercurial/bookmarks.py	Mon Jul 10 17:24:28 2017 +0200
@@ -402,12 +402,12 @@
         if existing != old and existing != new:
             return False
         if new == '':
-            del marks[key]
+            changes = [(key, None)]
         else:
             if new not in repo:
                 return False
-            marks[key] = repo[new].node()
-        marks.recordchange(tr)
+            changes = [(key, repo[new].node())]
+        marks.applychanges(repo, tr, changes)
         tr.close()
         return True
     finally:


More information about the Mercurial-devel mailing list