Patchwork [07,of,12] bookmark: use 'applychanges' when updating bookmark in histedit

login
register
mail settings
Submitter Boris Feld
Date July 14, 2017, 5:54 p.m.
Message ID <85ce60fb04bbbf060d76.1500054845@FB>
Download mbox | patch
Permalink /patch/22365/
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 1499700533 -7200
#      Mon Jul 10 17:28:53 2017 +0200
# Node ID 85ce60fb04bbbf060d7657209802b6a0e0cc030a
# Parent  1fc04ebe411862e9648382fa2a0790d8bdaf3862
# EXP-Topic tr.changes.bookmarks
bookmark: use 'applychanges' when updating bookmark in histedit

Patch

diff -r 1fc04ebe4118 -r 85ce60fb04bb hgext/histedit.py
--- a/hgext/histedit.py	Mon Jul 10 17:24:28 2017 +0200
+++ b/hgext/histedit.py	Mon Jul 10 17:28:53 2017 +0200
@@ -1561,9 +1561,10 @@ 
     if oldbmarks:
         with repo.lock(), repo.transaction('histedit') as tr:
             marks = repo._bookmarks
+            changes = []
             for name in oldbmarks:
-                marks[name] = newtopmost
-            marks.recordchange(tr)
+                changes.append((name, newtopmost))
+            marks.applychanges(repo, tr, changes)
 
 def cleanupnode(ui, repo, nodes):
     """strip a group of nodes from the repository