diff mercurial/repair.py @ 51903:9f7cf869e9f4

rev-branch-cache: add a way to force rewrite of the cache This seems useful to be able to do this, for example during strip. This align with the intended expressed in the `test-branches.t` test. This will help use being more confident about future changes in the series.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 23 Sep 2024 23:52:45 +0200
parents f4733654f144
children
line wrap: on
line diff
--- a/mercurial/repair.py	Tue Sep 24 00:01:30 2024 +0200
+++ b/mercurial/repair.py	Mon Sep 23 23:52:45 2024 +0200
@@ -242,6 +242,10 @@
                 del repo.obsstore
                 repo.invalidatevolatilesets()
 
+            # NOTE: eventually make a common entry point on localrepo to help
+            # other caches
+            repo.revbranchcache().invalidate(striprev)
+
             if tmpbundlefile:
                 ui.note(_(b"adding branch\n"))
                 f = vfs.open(tmpbundlefile, b"rb")