mercurial/transaction.py
changeset 40579 aca09df32819
parent 39686 3d22aef3ecd5
child 41107 3e2c02836420
equal deleted inserted replaced
40578:db61a18148a4 40579:aca09df32819
    18 from .i18n import _
    18 from .i18n import _
    19 from . import (
    19 from . import (
    20     error,
    20     error,
    21     pycompat,
    21     pycompat,
    22     util,
    22     util,
       
    23 )
       
    24 from .utils import (
       
    25     stringutil,
    23 )
    26 )
    24 
    27 
    25 version = 2
    28 version = 2
    26 
    29 
    27 # These are the file generators that should only be executed after the
    30 # These are the file generators that should only be executed after the
   580                 self._abortcallback = None
   583                 self._abortcallback = None
   581                 _playback(self._journal, self._report, self._opener,
   584                 _playback(self._journal, self._report, self._opener,
   582                           self._vfsmap, self._entries, self._backupentries,
   585                           self._vfsmap, self._entries, self._backupentries,
   583                           False, checkambigfiles=self._checkambigfiles)
   586                           False, checkambigfiles=self._checkambigfiles)
   584                 self._report(_("rollback completed\n"))
   587                 self._report(_("rollback completed\n"))
   585             except BaseException:
   588             except BaseException as exc:
   586                 self._report(_("rollback failed - please run hg recover\n"))
   589                 self._report(_("rollback failed - please run hg recover\n"))
       
   590                 self._report(_("(failure reason: %s)\n")
       
   591                              % stringutil.forcebytestr(exc))
   587         finally:
   592         finally:
   588             self._journal = None
   593             self._journal = None
   589             self._releasefn(self, False) # notify failure of transaction
   594             self._releasefn(self, False) # notify failure of transaction
   590             self._releasefn = None # Help prevent cycles.
   595             self._releasefn = None # Help prevent cycles.
   591 
   596