Mercurial > hg
changeset 50278:cd680b45a920 stable
undo-files: also remove the undo.backupfiles
The undo.backupfiles is dealt is directly managed by the transaction instead of
going through the `localrepo.undofiles`. We start doing minimal management for
it before using `cleanup_undo_files` on more situation. Proper handling of it
is an intermediate goal of this series.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 06 Mar 2023 13:05:08 +0100 |
parents | 48b90d18e9de |
children | 97e91001a4e0 |
files | mercurial/repair.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/repair.py Mon Mar 06 13:02:16 2023 +0100 +++ b/mercurial/repair.py Mon Mar 06 13:05:08 2023 +0100 @@ -119,7 +119,10 @@ This is useful to prevent rollback running in situation were it does not make sense. For example after a strip. """ - for undovfs, undofile in repo.undofiles(): + # XXX need to remove the backups themselve too + undo_files = [(repo.svfs, b'undo.backupfiles')] + undo_files.extend(repo.undofiles()) + for undovfs, undofile in undo_files: try: undovfs.unlink(undofile) except OSError as e: