Mercurial > hg
changeset 23513:4c7ea2d9bad9
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 04 Dec 2014 13:52:46 -0800 |
parents | 0ff6b65afeb0 |
children | 3575f42e1b7b |
files | mercurial/transaction.py |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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: