mozhg: use bookmarks.recordchange (
bug 1228088); r=dminor
Mercurial 3.7 prints a warning when bookmarks.write() is called.
Switch to bookmarks.recordchange(), which is the preferred API.
MozReview-Commit-ID: HhKC0EPnAd0
--- a/pylib/mozhg/mozhg/rewrite.py
+++ b/pylib/mozhg/mozhg/rewrite.py
@@ -262,17 +262,17 @@ def replacechangesets(repo, oldnodes, cr
for mark, bmnode in repo._bookmarks.items():
if bmnode == oldnode:
bmchanges.append((mark, repo[newrev].node()))
for mark, newnode in bmchanges:
repo._bookmarks[mark] = newnode
if bmchanges:
- repo._bookmarks.write()
+ repo._bookmarks.recordchange(tr)
# Update references to rewritten MQ patches.
if hasattr(repo, 'mq'):
q = repo.mq
for e in q.applied:
if e.node in nodemap:
e.node = nodemap[e.node]
q.applieddirty = True