# HG changeset patch # User Gregory Szorc # Date 2018-09-17 23:04:52 # Node ID 0d7b9db856756d734f402ecb2f9ae5583b117076 # Parent 264d56954dda448a4dbccfb0f3cda0b00ecb4778 transaction: make after a private attribute This is another callable that is passed in at __init__ time. It doesn't need to be part of the public interface. Differential Revision: https://phab.mercurial-scm.org/D4629 diff --git a/mercurial/transaction.py b/mercurial/transaction.py --- a/mercurial/transaction.py +++ b/mercurial/transaction.py @@ -128,7 +128,7 @@ class transaction(util.transactional): vfsmap = vfsmap.copy() vfsmap[''] = opener # set default value self._vfsmap = vfsmap - self.after = after + self._after = after self.entries = [] self.map = {} self._journal = journalname @@ -488,9 +488,9 @@ class transaction(util.transactional): % (vfs.join(b), inst)) self.entries = [] self._writeundo() - if self.after: - self.after() - self.after = None # Help prevent cycles. + if self._after: + self._after() + self._after = None # Help prevent cycles. if self.opener.isfile(self._backupjournal): self.opener.unlink(self._backupjournal) if self.opener.isfile(self._journal):