Mercurial > hg
changeset 39681:0d7b9db85675
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 17 Sep 2018 16:04:52 -0700 |
parents | 264d56954dda |
children | b590f4763aba |
files | mercurial/transaction.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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):