changeset 33109:99515353c72a stable

obsolete: invalidate "volatile" set cache after merging marker Adding markers to the repository might affect the set of obsolete changesets. So we most remove the "volatile" set who rely in that data. We add two missing invalidations after merging markers. This was caught by code change in the evolve extensions tests. This issues highlight that the current way to do things is a bit fragile, however we keep things simple for stable.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 17 May 2017 15:39:37 +0200
parents 176ed32dc159
children f928d53b687c 655f1e2cfa5a
files mercurial/bundle2.py mercurial/obsolete.py
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1631,6 +1631,7 @@
         op.repo.ui.debug('ignoring obsolescence markers, feature not enabled')
         return
     new = op.repo.obsstore.mergemarkers(tr, markerdata)
+    op.repo.invalidatevolatilesets()
     if new:
         op.repo.ui.status(_('%i new obsolescence markers\n') % new)
     op.records.add('obsmarkers', {'new': new})
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -767,6 +767,7 @@
         tr = repo.transaction('pushkey: obsolete markers')
         try:
             repo.obsstore.mergemarkers(tr, data)
+            repo.invalidatevolatilesets()
             tr.close()
             return 1
         finally: