diff mercurial/repair.py @ 50394:f24c2e42e654

strip: do now include internal changeset in the strip backup See inline comment for details.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 10 Mar 2023 07:10:19 +0100
parents 71a2c061865d
children bcf54837241d
line wrap: on
line diff
--- 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