Added some XXXes to transaction.py.

This commit is contained in:
Jeremy Fincher 2005-07-16 05:09:49 +00:00
parent bc3a47fc90
commit 91874dba2c

View File

@ -155,6 +155,16 @@ class Transaction(TransactionMixin):
def commitAppend(self, filename, length): def commitAppend(self, filename, length):
shutil.copy(self._replacement(filename), filename) shutil.copy(self._replacement(filename), filename)
# XXX need to be able to create files transactionally. (easy; just be sure
# the file doesn't exist in the real tree; remove it in rollback if it
# exists)
# XXX need to be able to delete files transactionally. (easy; just be sure
# the file exists in the real tree and keep a copy of it; in rollback
# just copy the file back)
# XXX need to be able to rename files transactionally. (hard; especially
# with renames that depend on one another. It might be easier to do
# rename separate from relocate.)
class Rollback(TransactionMixin): class Rollback(TransactionMixin):
def rollback(self, removeWhenComplete=True): def rollback(self, removeWhenComplete=True):