Patchwork [11,of,12] bookmark: use 'applychanges' in 'repair.strip'

login
register
mail settings
Submitter Boris Feld
Date July 14, 2017, 5:54 p.m.
Message ID <bbebf6b3d2514134fc75.1500054849@FB>
Download mbox | patch
Permalink /patch/22370/
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 1499701607 -7200
#      Mon Jul 10 17:46:47 2017 +0200
# Node ID bbebf6b3d2514134fc750903de90ec515cf4c4d3
# Parent  e8d6ea8639cdbdd8af729fbad09f508210e02723
# EXP-Topic tr.changes.bookmarks
bookmark: use 'applychanges' in 'repair.strip'

Patch

diff -r e8d6ea8639cd -r bbebf6b3d251 mercurial/repair.py
--- a/mercurial/repair.py	Mon Jul 10 17:44:25 2017 +0200
+++ b/mercurial/repair.py	Mon Jul 10 17:46:47 2017 +0200
@@ -219,11 +219,10 @@ 
             f.close()
         repo._phasecache.invalidate()
 
-        for m in updatebm:
-            bm[m] = repo[newbmtarget].node()
 
         with repo.transaction('repair') as tr:
-            bm.recordchange(tr)
+            bmchanges = [(m, repo[newbmtarget].node()) for m in updatebm]
+            bm.applychanges(repo, tr, bmchanges)
 
         # remove undo files
         for undovfs, undofile in repo.undofiles():