--- a/mercurial/repair.py Wed Mar 08 11:00:30 2023 +0100
+++ b/mercurial/repair.py Fri Mar 10 07:10:19 2023 +0100
@@ -351,8 +351,14 @@
vfs = repo.vfs
unfi = repo.unfiltered()
to_node = unfi.changelog.node
+ # internal changeset are internal implementation details that should not
+ # leave the repository and not be exposed to the users. In addition feature
+ # using them requires to be resistant to strip. See test case for more
+ # details.
all_backup = unfi.revs(
- b"(%ln)::(%ld)", stripbases, unfi.changelog.headrevs()
+ b"(%ln)::(%ld) and not _internal()",
+ stripbases,
+ unfi.changelog.headrevs(),
)
if not all_backup:
return None