D4633: transaction: make names a private attribute
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Tue Sep 18 17:29:18 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4024c363cd33: transaction: make names a private attribute (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4633?vs=11132&id=11158
REVISION DETAIL
https://phab.mercurial-scm.org/D4633
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
@@ -149,7 +149,7 @@
if checkambigfiles:
self._checkambigfiles.update(checkambigfiles)
- self.names = [name]
+ self._names = [name]
# A dict dedicated to precisely tracking the changes introduced in the
# transaction.
@@ -189,7 +189,7 @@
self._abortcallback = {}
def __repr__(self):
- name = r'/'.join(self.names)
+ name = r'/'.join(self._names)
return (r'<transaction name=%s, count=%d, usages=%d>' %
(name, self._count, self._usages))
@@ -375,14 +375,14 @@
def nest(self, name=r'<unnamed>'):
self._count += 1
self._usages += 1
- self.names.append(name)
+ self._names.append(name)
return self
def release(self):
if self._count > 0:
self._usages -= 1
- if self.names:
- self.names.pop()
+ if self._names:
+ self._names.pop()
# if the transaction scopes are left without being closed, fail
if self._count > 0 and self._usages == 0:
self._abort()
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list