D4628: transaction: make checkambigfiles a private attribute

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Sep 17 23:36:25 UTC 2018


indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This holds instance state that is passed in at __init__ time. It
  doesn't need to be exposed as part of the public interface.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4628

AFFECTED FILES
  mercurial/transaction.py

CHANGE DETAILS

diff --git a/mercurial/transaction.py b/mercurial/transaction.py
--- a/mercurial/transaction.py
+++ b/mercurial/transaction.py
@@ -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"))



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list