mercurial/transaction.py
changeset 40626 aca09df32819
parent 39702 3d22aef3ecd5
child 41110 3e2c02836420
--- a/mercurial/transaction.py	Sat Nov 10 12:07:26 2018 +0900
+++ b/mercurial/transaction.py	Wed Nov 07 19:59:38 2018 +0100
@@ -21,6 +21,9 @@
     pycompat,
     util,
 )
+from .utils import (
+    stringutil,
+)
 
 version = 2
 
@@ -582,8 +585,10 @@
                           self._vfsmap, self._entries, self._backupentries,
                           False, checkambigfiles=self._checkambigfiles)
                 self._report(_("rollback completed\n"))
-            except BaseException:
+            except BaseException as exc:
                 self._report(_("rollback failed - please run hg recover\n"))
+                self._report(_("(failure reason: %s)\n")
+                             % stringutil.forcebytestr(exc))
         finally:
             self._journal = None
             self._releasefn(self, False) # notify failure of transaction