Patchwork [05,of,12] bookmark: use 'applychanges' when updating from a remote

login
register
mail settings
Submitter Boris Feld
Date July 14, 2017, 5:54 p.m.
Message ID <76dde98a2c0bc24ab110.1500054843@FB>
Download mbox | patch
Permalink /patch/22364/
State Accepted
Headers show

Comments

Boris Feld - July 14, 2017, 5:54 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1499700137 -7200
#      Mon Jul 10 17:22:17 2017 +0200
# Node ID 76dde98a2c0bc24ab110ba3ecc06698c735adf57
# Parent  34170eeaa6fbfb43b1ceac331ae50678afe10610
# EXP-Topic tr.changes.bookmarks
bookmark: use 'applychanges' when updating from a remote

Patch

diff -r 34170eeaa6fb -r 76dde98a2c0b mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Mon Jul 10 17:10:56 2017 +0200
+++ b/mercurial/bookmarks.py	Mon Jul 10 17:22:17 2017 +0200
@@ -579,10 +579,11 @@ 
 
     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