Mercurial > hg
comparison mercurial/repair.py @ 50397: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 |
comparison
equal
deleted
inserted
replaced
50396:386737600689 | 50397:f24c2e42e654 |
---|---|
349 def _createstripbackup(repo, stripbases, node, topic): | 349 def _createstripbackup(repo, stripbases, node, topic): |
350 # backup the changeset we are about to strip | 350 # backup the changeset we are about to strip |
351 vfs = repo.vfs | 351 vfs = repo.vfs |
352 unfi = repo.unfiltered() | 352 unfi = repo.unfiltered() |
353 to_node = unfi.changelog.node | 353 to_node = unfi.changelog.node |
354 # internal changeset are internal implementation details that should not | |
355 # leave the repository and not be exposed to the users. In addition feature | |
356 # using them requires to be resistant to strip. See test case for more | |
357 # details. | |
354 all_backup = unfi.revs( | 358 all_backup = unfi.revs( |
355 b"(%ln)::(%ld)", stripbases, unfi.changelog.headrevs() | 359 b"(%ln)::(%ld) and not _internal()", |
360 stripbases, | |
361 unfi.changelog.headrevs(), | |
356 ) | 362 ) |
357 if not all_backup: | 363 if not all_backup: |
358 return None | 364 return None |
359 | 365 |
360 def to_nodes(revs): | 366 def to_nodes(revs): |