Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 00:59:44 +0200] rev 47422
transaction: simplify `undo.backupfiles` file creation with a variable
This make the code shorter and clearer.
(This is an opportunity improvement while looking at something next to that.)
Differential Revision: https://phab.mercurial-scm.org/D10846
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 00:59:04 +0200] rev 47421
transaction: narrow the error filtering when failing to rename undo file
Having inconsistent "undo" files can be quite serious so we narrow the error
filtering to the intent that the comment explain.
(This is an opportunity improvement while looking at something next to that.)
Differential Revision: https://phab.mercurial-scm.org/D10845
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:13:09 +0200] rev 47420
transaction: clarify a conditionnal about version check
Let us move the short branch early.
Differential Revision: https://phab.mercurial-scm.org/D10844
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:14:18 +0200] rev 47419
transaction: extract message about different version in a constants
This make the code a bit simpler and clearer.
(This is an opportunity improvement while looking at something next to that.)
Differential Revision: https://phab.mercurial-scm.org/D10843
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 09 Jun 2021 01:12:03 +0200] rev 47418
transaction: explain why some recovery failed
Right now we issue a message about failing to recover some file, but not why.
It seems useful to add some information about that.
(This is an opportunity improvement while looking at something next to that.)
Differential Revision: https://phab.mercurial-scm.org/D10842
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 07 Jun 2021 21:09:31 +0200] rev 47417
copyfiles: deal with existing file when hardlinking
If the hardlinking fails, we fallback to `shutil.copy`, but do not consider
future hardlinking doomed.
This is a slight improvement from the current situation, we still avoid
hardliking in a case we might be able to do it. However this does not have an
impact of the rest of the operation.
(This is an opportunity improvement while looking at something next to that.)
Differential Revision: https://phab.mercurial-scm.org/D10841