obsolete: invalidate "volatile" set cache after merging marker stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 17 May 2017 15:39:37 +0200
branchstable
changeset 32326 99515353c72a
parent 32207 176ed32dc159
child 32383 f928d53b687c
child 32387 655f1e2cfa5a
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.
mercurial/bundle2.py
mercurial/obsolete.py
--- a/mercurial/bundle2.py	Fri May 12 21:46:14 2017 +0900
+++ b/mercurial/bundle2.py	Wed May 17 15:39:37 2017 +0200
@@ -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	Fri May 12 21:46:14 2017 +0900
+++ b/mercurial/obsolete.py	Wed May 17 15:39:37 2017 +0200
@@ -767,6 +767,7 @@
         tr = repo.transaction('pushkey: obsolete markers')
         try:
             repo.obsstore.mergemarkers(tr, data)
+            repo.invalidatevolatilesets()
             tr.close()
             return 1
         finally: