changeset 50308:cab3defe6d3b stable

transaction: raise on backup restoration error A few line above, similar errors in the truncation code result in raising the associated exception. We should do the same here. This means the transaction recover is more strict now, which might be a problem when running `hg recover` in a share different from the one where the transaction fails. However this has always been a problem and need to be be addressed independently.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 15 Mar 2023 12:13:08 +0100
parents 70ca1f09ceca
children 86dc9e097bed
files mercurial/transaction.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/transaction.py	Wed Mar 15 12:08:05 2023 +0100
+++ b/mercurial/transaction.py	Wed Mar 15 12:13:08 2023 +0100
@@ -145,6 +145,7 @@
                 except IOError as exc:
                     e_msg = stringutil.forcebytestr(exc)
                     report(_(b"failed to recover %s (%s)\n") % (f, e_msg))
+                    raise
             else:
                 target = f or b
                 try: