comparison hgext/evolve.py @ 1557:e72f83f09bdc

next: replace call to bookmarks.write by bookmarks.recordchange bookmarks.write is now deprecated, we are moving to the new api: bookmarks.recordchange.
author Laurent Charignon <lcharignon@fb.com>
date Thu, 10 Dec 2015 14:43:31 -0800
parents 4f008b8acda7
children 4706475e0c5d
comparison
equal deleted inserted replaced
1556:4f008b8acda7 1557:e72f83f09bdc
2160 if shouldmove: 2160 if shouldmove:
2161 ui.write(('hg bookmark %s -r %s;\n' % (bm, c.rev()))) 2161 ui.write(('hg bookmark %s -r %s;\n' % (bm, c.rev())))
2162 else: 2162 else:
2163 ret = hg.update(repo, c.rev()) 2163 ret = hg.update(repo, c.rev())
2164 if not ret: 2164 if not ret:
2165 lock = tr = None
2165 wlock = repo.wlock() 2166 wlock = repo.wlock()
2166 try: 2167 try:
2168 lock = repo.lock()
2169 tr = repo.transaction('next')
2167 if shouldmove: 2170 if shouldmove:
2168 repo._bookmarks[bm] = c.node() 2171 repo._bookmarks[bm] = c.node()
2169 repo._bookmarks.write() 2172 repo._bookmarks.recordchange(tr)
2170 else: 2173 else:
2171 bmdeactivate(repo) 2174 bmdeactivate(repo)
2175 tr.close()
2172 finally: 2176 finally:
2173 wlock.release() 2177 lockmod.release(tr, lock, wlock)
2174 displayer.show(c) 2178 displayer.show(c)
2175 result = 0 2179 result = 0
2176 elif children: 2180 elif children:
2177 ui.warn(_("ambigious next changeset:\n")) 2181 ui.warn(_("ambigious next changeset:\n"))
2178 for c in children: 2182 for c in children: