# HG changeset patch # User Pierre-Yves David # Date 2017-05-17 13:39:37 # Node ID 99515353c72a4c54e4aac1a2ad4f8f724c7fdc9c # Parent 176ed32dc159b63a8edd1fd9faaba90bc7d924a6 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. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -1631,6 +1631,7 @@ def handleobsmarker(op, inpart): 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}) diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -767,6 +767,7 @@ def pushmarker(repo, key, old, new): tr = repo.transaction('pushkey: obsolete markers') try: repo.obsstore.mergemarkers(tr, data) + repo.invalidatevolatilesets() tr.close() return 1 finally: