Mercurial > hg-stable
changeset 50291:862969b6c359 stable
undo-files: cleanup legacy files when applicable
The "journal" code is much more compact in 6.4, and so is the "undo" files as a
result. However the previous version were much noisier, so let us cleanup undo
files from older version too.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 07 Mar 2023 03:42:40 +0100 |
parents | 92734603e33e |
children | adecb1ab4a0d |
files | mercurial/transaction.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/transaction.py Mon Mar 06 22:16:43 2023 +0100 +++ b/mercurial/transaction.py Tue Mar 07 03:42:40 2023 +0100 @@ -43,6 +43,14 @@ UNDO_BACKUP = b'%s.backupfiles' UNDO_FILES_MAY_NEED_CLEANUP = [ + # legacy entries that might exists on disk from previous version: + (b'store', b'%s.narrowspec'), + (b'plain', b'%s.narrowspec.dirstate'), + (b'plain', b'%s.branch'), + (b'plain', b'%s.bookmarks'), + (b'store', b'%s.phaseroots'), + (b'plain', b'%s.dirstate'), + # files actually in uses today: (b'plain', b'%s.desc'), # Always delete undo last to make sure we detect that a clean up is needed if # the process is interrupted.