# HG changeset patch # User Pierre-Yves David # Date 2014-12-04 21:52:46 # 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 --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -84,7 +84,7 @@ def _playback(journal, report, opener, v 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 @@ class transaction(object): * `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 @@ class transaction(object): 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 @@ class transaction(object): 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: