[PATCH 3 of 5 remotenames-ext] transition: modernize bookmark writing api usage
Ryan McElroy
rm at fb.com
Tue Jul 18 08:54:40 EDT 2017
# HG changeset patch
# User Ryan McElroy <rmcelroy at fb.com>
# Date 1500381555 25200
# Tue Jul 18 05:39:15 2017 -0700
# Node ID 5797e9f25309977de7b2e3d807adc741d8d56fd2
# Parent 7c52ae4a24a0ef41de841622916cfe28f15cd89f
transition: modernize bookmark writing api usage
diff --git a/remotenames.py b/remotenames.py
--- a/remotenames.py
+++ b/remotenames.py
@@ -1510,14 +1510,15 @@ def transition(repo, ui):
"""
transmarks = ui.configlist('remotenames', 'transitionbookmarks')
localmarks = repo._bookmarks
+ changes = []
for mark in transmarks:
if mark in localmarks:
- del localmarks[mark]
+ changes.append((mark, None)) # delete this bookmark
lock = tr = None
try:
lock = repo.lock()
tr = repo.transaction("remotenames")
- localmarks.recordchange(tr)
+ localmarks.applychanges(repo, tr, changes)
tr.close()
finally:
lockmod.release(lock, tr)
More information about the Mercurial-devel
mailing list