Mercurial > hg
diff mercurial/bookmarks.py @ 26999:2d79a354d843
bookmarks: use repo._bookmarks.recordchange instead of repo._bookmarks.write
We move from the old api repo._bookmarks.write to the new api
repo._bookmarks.recordchange.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 17 Nov 2015 12:49:57 -0800 |
parents | 1aee2ab0f902 |
children | d52765831086 |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Wed Nov 18 01:36:58 2015 -0800 +++ b/mercurial/bookmarks.py Tue Nov 17 12:49:57 2015 -0800 @@ -249,7 +249,14 @@ update = True if update: - marks.write() + lock = tr = None + try: + lock = repo.lock() + tr = repo.transaction('bookmark') + marks.recordchange(tr) + tr.close() + finally: + lockmod.release(tr, lock) return update def listbookmarks(repo):