changeset 33487:a050d37c2c70

bookmark: use 'applychanges' in the convert extension
author Boris Feld <boris.feld@octobus.net>
date Mon, 10 Jul 2017 17:30:20 +0200
parents af402f11cb9d
children eb344bbac18c
files hgext/convert/hg.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/hg.py	Mon Jul 10 17:28:53 2017 +0200
+++ b/hgext/convert/hg.py	Mon Jul 10 17:30:20 2017 +0200
@@ -425,9 +425,9 @@
             tr = self.repo.transaction('bookmark')
             self.ui.status(_("updating bookmarks\n"))
             destmarks = self.repo._bookmarks
-            for bookmark in updatedbookmark:
-                destmarks[bookmark] = nodemod.bin(updatedbookmark[bookmark])
-            destmarks.recordchange(tr)
+            changes = [(bookmark, nodemod.bin(updatedbookmark[bookmark]))
+                       for bookmark in updatedbookmark]
+            destmarks.applychanges(self.repo, tr, changes)
             tr.close()
         finally:
             lockmod.release(lock, wlock, tr)