mercurial/repair.py
changeset 50397 f24c2e42e654
parent 50395 71a2c061865d
child 50399 bcf54837241d
--- 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