commitwrapper: use bookmarks.recordchange instead of bookmarks.write
Before this patch we were using the deprecated API bookmarks.write, this patch
replace its usage by the new API call bookmarks.recordchange.
--- a/hgext/evolve.py Thu Dec 10 14:43:31 2015 -0800
+++ b/hgext/evolve.py Thu Dec 10 15:09:25 2015 -0800
@@ -2665,6 +2665,7 @@
@eh.wrapcommand('commit')
def commitwrapper(orig, ui, repo, *arg, **kwargs):
+ tr = None
if kwargs.get('amend', False):
wlock = lock = None
else:
@@ -2687,10 +2688,16 @@
for book in oldbookmarks:
repo._bookmarks[book] = new.node()
if oldbookmarks:
- repo._bookmarks.write()
+ if not wlock:
+ wlock = repo.wlock()
+ if not lock:
+ lock = repo.lock()
+ tr = repo.transaction('commit')
+ repo._bookmarks.recordchange(tr)
+ tr.close()
return result
finally:
- lockmod.release(lock, wlock)
+ lockmod.release(tr, lock, wlock)
@command('^split',
[('r', 'rev', [], _("revision to fold")),