Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 33516:f9e6e43c7987
bookmark: track bookmark changes at the transaction level
The transaction has now a 'bookmarks' dictionary in tr.changes. The structure
of the dictionary is {BOOKMARK_NAME: (OLD_NODE, NEW_NODE)}. If a bookmark is
deleted NEW_NODE will be None. If a bookmark is created OLD_NODE will be None.
If the bookmark is updated multiple time, the initial value is preserved.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 10 Jul 2017 20:26:53 +0200 |
parents | 0407a51b9d8c |
children | d645fdfb749f |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Jul 10 20:10:03 2017 +0200 +++ b/mercurial/localrepo.py Mon Jul 10 20:26:53 2017 +0200 @@ -1216,6 +1216,7 @@ tr.changes['revs'] = set() tr.changes['obsmarkers'] = set() tr.changes['phases'] = {} + tr.changes['bookmarks'] = {} tr.hookargs['txnid'] = txnid # note: writing the fncache only during finalize mean that the file is