changeset 39680:264d56954dda

transaction: make checkambigfiles a private attribute This holds instance state that is passed in at __init__ time. It doesn't need to be exposed as part of the public interface. Differential Revision: https://phab.mercurial-scm.org/D4628
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 17 Sep 2018 16:02:53 -0700
parents ebbba3ba3f66
children 0d7b9db85675
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:01:22 2018 -0700
+++ b/mercurial/transaction.py	Mon Sep 17 16:02:53 2018 -0700
@@ -145,9 +145,9 @@
             releasefn = lambda tr, success: None
         self._releasefn = releasefn
 
-        self.checkambigfiles = set()
+        self._checkambigfiles = set()
         if checkambigfiles:
-            self.checkambigfiles.update(checkambigfiles)
+            self._checkambigfiles.update(checkambigfiles)
 
         self.names = [name]
 
@@ -340,7 +340,7 @@
                         checkambig = False
                     else:
                         self.addbackup(name, location=location)
-                        checkambig = (name, location) in self.checkambigfiles
+                        checkambig = (name, location) in self._checkambigfiles
                     files.append(vfs(name, 'w', atomictemp=True,
                                      checkambig=checkambig))
                 genfunc(*files)
@@ -580,7 +580,7 @@
                 self._abortcallback = None
                 _playback(self._journal, self.report, self.opener, self._vfsmap,
                           self.entries, self._backupentries, False,
-                          checkambigfiles=self.checkambigfiles)
+                          checkambigfiles=self._checkambigfiles)
                 self.report(_("rollback completed\n"))
             except BaseException:
                 self.report(_("rollback failed - please run hg recover\n"))