# HG changeset patch # User Pierre-Yves David # Date 1678156960 -3600 # Node ID 862969b6c3594bf349fce11b61f23c221ff0718a # Parent 92734603e33e437c894a035d5f958b05cfa41eea 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. diff -r 92734603e33e -r 862969b6c359 mercurial/transaction.py --- 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.