# HG changeset patch # User Pierre-Yves David # Date 1498524309 -7200 # Node ID a5cb2e4460ded90191f3604f9a60110654d88935 # Parent bbc57a7e8823cad60e0b965f029a9b7878e1dcd6 transaction: track new obsmarkers in the 'changes' mapping The obsstore collaborate with transaction to make sure we track all the obsmarkers added during a transaction. This will be useful for various usages: hooks, caches, better output, etc. This is the seconds kind of data added to tr.changes (first one was added revisions) diff -r bbc57a7e8823 -r a5cb2e4460de mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Jun 30 03:44:04 2017 +0200 +++ b/mercurial/localrepo.py Tue Jun 27 02:45:09 2017 +0200 @@ -1083,6 +1083,7 @@ validator=validate, releasefn=releasefn) tr.changes['revs'] = set() + tr.changes['obsmarkers'] = set() tr.hookargs['txnid'] = txnid # note: writing the fncache only during finalize mean that the file is diff -r bbc57a7e8823 -r a5cb2e4460de mercurial/obsolete.py --- a/mercurial/obsolete.py Fri Jun 30 03:44:04 2017 +0200 +++ b/mercurial/obsolete.py Tue Jun 27 02:45:09 2017 +0200 @@ -613,6 +613,9 @@ # XXX: f.close() == filecache invalidation == obsstore rebuilt. # call 'filecacheentry.refresh()' here f.close() + addedmarkers = transaction.changes.get('obsmarkers') + if addedmarkers is not None: + addedmarkers.update(new) self._addmarkers(new) # new marker *may* have changed several set. invalidate the cache. self.caches.clear()