##// END OF EJS Templates
transaction: remove the 'onabort' mechanism...
Pierre-Yves David -
r23513:4c7ea2d9 default
parent child Browse files
Show More
@@ -84,7 +84,7 b' def _playback(journal, report, opener, v'
84
84
85 class transaction(object):
85 class transaction(object):
86 def __init__(self, report, opener, vfsmap, journal, after=None,
86 def __init__(self, report, opener, vfsmap, journal, after=None,
87 createmode=None, onabort=None):
87 createmode=None):
88 """Begin a new transaction
88 """Begin a new transaction
89
89
90 Begins a new transaction that allows rolling back writes in the event of
90 Begins a new transaction that allows rolling back writes in the event of
@@ -92,8 +92,6 b' class transaction(object):'
92
92
93 * `after`: called after the transaction has been committed
93 * `after`: called after the transaction has been committed
94 * `createmode`: the mode of the journal file that will be created
94 * `createmode`: the mode of the journal file that will be created
95 * `onabort`: called as the transaction is aborting, but before any files
96 have been truncated
97 """
95 """
98 self.count = 1
96 self.count = 1
99 self.usages = 1
97 self.usages = 1
@@ -105,7 +103,6 b' class transaction(object):'
105 vfsmap[''] = opener # set default value
103 vfsmap[''] = opener # set default value
106 self._vfsmap = vfsmap
104 self._vfsmap = vfsmap
107 self.after = after
105 self.after = after
108 self.onabort = onabort
109 self.entries = []
106 self.entries = []
110 self.map = {}
107 self.map = {}
111 self.journal = journal
108 self.journal = journal
@@ -436,9 +433,6 b' class transaction(object):'
436 self.file.close()
433 self.file.close()
437 self._backupsfile.close()
434 self._backupsfile.close()
438
435
439 if self.onabort is not None:
440 self.onabort()
441
442 try:
436 try:
443 if not self.entries and not self._backupentries:
437 if not self.entries and not self._backupentries:
444 if self.journal:
438 if self.journal:
General Comments 0
You need to be logged in to leave comments. Login now