Comments
Patch
@@ -223,17 +223,17 @@ class transaction(object):
self._backupmap[file] = len(self._backupentries) - 1
self._backupsfile.write("%s\0%s\0%s\0%d\n" % entry)
self._backupsfile.flush()
@active
- def registertmp(self, tmpfile):
+ def registertmp(self, tmpfile, location=''):
"""register a temporary transaction file
Such file will be delete when the transaction exit (on both failure and
success).
"""
- self._addbackupentry(('', '', tmpfile, False))
+ self._addbackupentry((location, '', tmpfile, False))
@active
def addfilegenerator(self, genid, filenames, genfunc, order=0,
location=''):
"""add a function to generates some files at transaction commit