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.
--- 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: