diff mercurial/repair.py @ 51398:8f2ea3fa50fd

phases: explicitly filter stripped revision at strip time Explicit is better than implicit. The current logic is bit subtle and fragile. It also get in the way of using something else than node-id as internal storage. We replace it with a more explicit filtering while striping.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 20 Feb 2024 14:21:18 +0100
parents 8f7e189af9dc
children f4733654f144
line wrap: on
line diff
--- a/mercurial/repair.py	Fri Feb 23 04:26:03 2024 +0100
+++ b/mercurial/repair.py	Tue Feb 20 14:21:18 2024 +0100
@@ -218,6 +218,7 @@
                 oldfiles = set(tr._offsetmap.keys())
                 oldfiles.update(tr._newfiles)
 
+                repo._phasecache.register_strip(repo, tr, striprev)
                 tr.startgroup()
                 cl.strip(striprev, tr)
                 stripmanifest(repo, striprev, tr, files)
@@ -239,7 +240,6 @@
                 deleteobsmarkers(repo.obsstore, stripobsidx)
                 del repo.obsstore
                 repo.invalidatevolatilesets()
-                repo._phasecache.filterunknown(repo)
 
             if tmpbundlefile:
                 ui.note(_(b"adding branch\n"))