Show More
@@ -149,7 +149,7 b' class transaction(util.transactional):' | |||
|
149 | 149 | if checkambigfiles: |
|
150 | 150 | self._checkambigfiles.update(checkambigfiles) |
|
151 | 151 | |
|
152 | self.names = [name] | |
|
152 | self._names = [name] | |
|
153 | 153 | |
|
154 | 154 | # A dict dedicated to precisely tracking the changes introduced in the |
|
155 | 155 | # transaction. |
@@ -189,7 +189,7 b' class transaction(util.transactional):' | |||
|
189 | 189 | self._abortcallback = {} |
|
190 | 190 | |
|
191 | 191 | def __repr__(self): |
|
192 | name = r'/'.join(self.names) | |
|
192 | name = r'/'.join(self._names) | |
|
193 | 193 | return (r'<transaction name=%s, count=%d, usages=%d>' % |
|
194 | 194 | (name, self._count, self._usages)) |
|
195 | 195 | |
@@ -375,14 +375,14 b' class transaction(util.transactional):' | |||
|
375 | 375 | def nest(self, name=r'<unnamed>'): |
|
376 | 376 | self._count += 1 |
|
377 | 377 | self._usages += 1 |
|
378 | self.names.append(name) | |
|
378 | self._names.append(name) | |
|
379 | 379 | return self |
|
380 | 380 | |
|
381 | 381 | def release(self): |
|
382 | 382 | if self._count > 0: |
|
383 | 383 | self._usages -= 1 |
|
384 | if self.names: | |
|
385 | self.names.pop() | |
|
384 | if self._names: | |
|
385 | self._names.pop() | |
|
386 | 386 | # if the transaction scopes are left without being closed, fail |
|
387 | 387 | if self._count > 0 and self._usages == 0: |
|
388 | 388 | self._abort() |
General Comments 0
You need to be logged in to leave comments.
Login now