mercurial/bookmarks.py
changeset 22666 0f8120c1ecf5
parent 22665 8319f7e78395
child 22667 3acc3f95548c
--- a/mercurial/bookmarks.py	Sun Sep 28 00:41:55 2014 -0700
+++ b/mercurial/bookmarks.py	Sun Sep 28 15:21:38 2014 -0700
@@ -357,7 +357,7 @@
             n = '%s@%s' % (b, p)
     return n
 
-def updatefromremote(ui, repo, remotemarks, path, explicit=()):
+def updatefromremote(ui, repo, remotemarks, path, trfunc, explicit=()):
     ui.debug("checking for updated bookmarks\n")
     localmarks = repo._bookmarks
     (addsrc, adddst, advsrc, advdst, diverge, differ, invalid
@@ -397,10 +397,11 @@
                             _("importing bookmark %s\n") % (b, b)))
 
     if changed:
+        tr = trfunc()
         for b, node, writer, msg in sorted(changed):
             localmarks[b] = node
             writer(msg)
-        localmarks.write()
+        localmarks.recordchange(tr)
 
 def diff(ui, dst, src):
     ui.status(_("searching for changed bookmarks\n"))