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.
--- 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: