# HG changeset patch # User Pierre-Yves David # Date 1417729966 28800 # Node ID 4c7ea2d9bad93fc120f3ab84dda0cf023cf7e036 # Parent 0ff6b65afeb05900065ecf4e8f75712d3e513be8 transaction: remove the 'onabort' mechanism It has no known users. If someones needs similar functionality, a new 'addabort' method similar to 'addfinalize' should be added. diff -r 0ff6b65afeb0 -r 4c7ea2d9bad9 mercurial/transaction.py --- a/mercurial/transaction.py Thu Dec 04 13:51:41 2014 -0800 +++ b/mercurial/transaction.py Thu Dec 04 13:52:46 2014 -0800 @@ -84,7 +84,7 @@ class transaction(object): def __init__(self, report, opener, vfsmap, journal, after=None, - createmode=None, onabort=None): + createmode=None): """Begin a new transaction Begins a new transaction that allows rolling back writes in the event of @@ -92,8 +92,6 @@ * `after`: called after the transaction has been committed * `createmode`: the mode of the journal file that will be created - * `onabort`: called as the transaction is aborting, but before any files - have been truncated """ self.count = 1 self.usages = 1 @@ -105,7 +103,6 @@ vfsmap[''] = opener # set default value self._vfsmap = vfsmap self.after = after - self.onabort = onabort self.entries = [] self.map = {} self.journal = journal @@ -436,9 +433,6 @@ self.file.close() self._backupsfile.close() - if self.onabort is not None: - self.onabort() - try: if not self.entries and not self._backupentries: if self.journal: