# HG changeset patch # User Pierre-Yves David # Date 1623193923 -7200 # Node ID 22e21deed47411a050fe3d684800ae0123b2171b # Parent 9ea525216edbd92fe04a9074d7b0a32c201872b8 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 diff -r 9ea525216edb -r 22e21deed474 mercurial/transaction.py --- a/mercurial/transaction.py Mon Jun 07 21:09:31 2021 +0200 +++ b/mercurial/transaction.py Wed Jun 09 01:12:03 2021 +0200 @@ -94,8 +94,9 @@ try: util.copyfile(backuppath, filepath, checkambig=checkambig) backupfiles.append(b) - except IOError: - report(_(b"failed to recover %s\n") % f) + except IOError as exc: + e_msg = stringutil.forcebytestr(exc) + report(_(b"failed to recover %s (%s)\n") % (f, e_msg)) else: target = f or b try: