Show More
@@ -157,7 +157,7 b' class transaction(util.transactional):' | |||
|
157 | 157 | |
|
158 | 158 | # a dict of arguments to be passed to hooks |
|
159 | 159 | self.hookargs = {} |
|
160 | self.file = opener.open(self._journal, "w") | |
|
160 | self._file = opener.open(self._journal, "w") | |
|
161 | 161 | |
|
162 | 162 | # a list of ('location', 'path', 'backuppath', cache) entries. |
|
163 | 163 | # - if 'backuppath' is empty, no file existed at backup time |
@@ -233,8 +233,8 b' class transaction(util.transactional):' | |||
|
233 | 233 | self.entries.append((file, offset, data)) |
|
234 | 234 | self.map[file] = len(self.entries) - 1 |
|
235 | 235 | # add enough data to the journal to do the truncate |
|
236 | self.file.write("%s\0%d\n" % (file, offset)) | |
|
237 | self.file.flush() | |
|
236 | self._file.write("%s\0%d\n" % (file, offset)) | |
|
237 | self._file.flush() | |
|
238 | 238 | |
|
239 | 239 | @active |
|
240 | 240 | def addbackup(self, file, hardlink=True, location=''): |
@@ -368,8 +368,8 b' class transaction(util.transactional):' | |||
|
368 | 368 | raise KeyError(file) |
|
369 | 369 | index = self.map[file] |
|
370 | 370 | self.entries[index] = (file, offset, data) |
|
371 | self.file.write("%s\0%d\n" % (file, offset)) | |
|
372 | self.file.flush() | |
|
371 | self._file.write("%s\0%d\n" % (file, offset)) | |
|
372 | self._file.flush() | |
|
373 | 373 | |
|
374 | 374 | @active |
|
375 | 375 | def nest(self, name=r'<unnamed>'): |
@@ -468,7 +468,7 b' class transaction(util.transactional):' | |||
|
468 | 468 | self._count -= 1 |
|
469 | 469 | if self._count != 0: |
|
470 | 470 | return |
|
471 | self.file.close() | |
|
471 | self._file.close() | |
|
472 | 472 | self._backupsfile.close() |
|
473 | 473 | # cleanup temporary files |
|
474 | 474 | for l, f, b, c in self._backupentries: |
@@ -560,7 +560,7 b' class transaction(util.transactional):' | |||
|
560 | 560 | def _abort(self): |
|
561 | 561 | self._count = 0 |
|
562 | 562 | self._usages = 0 |
|
563 | self.file.close() | |
|
563 | self._file.close() | |
|
564 | 564 | self._backupsfile.close() |
|
565 | 565 | |
|
566 | 566 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now