# HG changeset patch # User Gregory Szorc # Date 1537225492 25200 # 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 -r 264d56954dda -r 0d7b9db85675 mercurial/transaction.py --- a/mercurial/transaction.py Mon Sep 17 16:02:53 2018 -0700 +++ b/mercurial/transaction.py Mon Sep 17 16:04:52 2018 -0700 @@ -128,7 +128,7 @@ 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 @@ % (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):