Mercurial > public > mercurial-scm > hg
diff mercurial/transaction.py @ 23512:0ff6b65afeb0
transaction: remove the redundant 'onclose' mechanism
It is superseded by the 'addfinalize' function and all its user have been
migrated.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 04 Dec 2014 13:51:41 -0800 |
parents | 1b51d1b05482 |
children | 4c7ea2d9bad9 |
line wrap: on
line diff
--- a/mercurial/transaction.py Thu Dec 04 16:35:03 2014 -0800 +++ b/mercurial/transaction.py Thu Dec 04 13:51:41 2014 -0800 @@ -84,7 +84,7 @@ class transaction(object): def __init__(self, report, opener, vfsmap, journal, after=None, - createmode=None, onclose=None, onabort=None): + createmode=None, onabort=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 - * `onclose`: called as the transaction is closing, but before it is - closed * `onabort`: called as the transaction is aborting, but before any files have been truncated """ @@ -107,7 +105,6 @@ vfsmap[''] = opener # set default value self._vfsmap = vfsmap self.after = after - self.onclose = onclose self.onabort = onabort self.entries = [] self.map = {} @@ -375,8 +372,6 @@ categories = sorted(self._finalizecallback) for cat in categories: self._finalizecallback[cat](self) - if self.onclose is not None: - self.onclose() self.count -= 1 if self.count != 0: