bookmark: use 'applychanges' when updating from a remote
authorBoris Feld <boris.feld@octobus.net>
Mon, 10 Jul 2017 17:22:17 +0200
changeset 38885 2a8ce4e79a47a8a90924c54ba8a0e07317d4f41b
parent 38884 146c0371eadf59ba0e59451f6d42afc366997bdc
child 38886 50502148254126080e76efcee7099a3761b382eb
push id550
push usergszorc@mozilla.com
push dateSat, 15 Jul 2017 23:45:52 +0000
bookmark: use 'applychanges' when updating from a remote
mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -574,20 +574,21 @@ def updatefromremote(ui, repo, remotemar
     for b, scid, dcid in differ:
         if b in explicit:
             explicit.remove(b)
             ui.warn(_("remote bookmark %s points to locally missing %s\n")
                     % (b, hex(scid)[:12]))
 
     if changed:
         tr = trfunc()
+        changes = []
         for b, node, writer, msg in sorted(changed):
-            localmarks[b] = node
+            changes.append((b, node))
             writer(msg)
-        localmarks.recordchange(tr)
+        localmarks.applychanges(repo, tr, changes)
 
 def incoming(ui, repo, other):
     '''Show bookmarks incoming from other to repo
     '''
     ui.status(_("searching for changed bookmarks\n"))
 
     remotemarks = unhexlifybookmarks(other.listkeys('bookmarks'))
     r = comparebookmarks(repo, remotemarks, repo._bookmarks)