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