transaction: raise on backup restoration error stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 15 Mar 2023 12:13:08 +0100
branchstable
changeset 50308 cab3defe6d3b
parent 50307 70ca1f09ceca
child 50309 86dc9e097bed
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.
mercurial/transaction.py
--- 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: