diff mercurial/obsolete.py @ 33251:a5cb2e4460de

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)
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 27 Jun 2017 02:45:09 +0200
parents fd50788a2d4f
children 5724aaa99dd6
line wrap: on
line diff
--- 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()