Re: [ZODB-Dev] Transaction undo example

2005-04-12 Thread Patrick DECAT
My fault, it's a ZODB list, not a Zope one. Perhaps you should have a look at the unit tests in TransactionalUndoStorage.py. This one is rather explicit : def checkTwoObjectUndo(self): eq = self.assertEqual # Convenience p31, p32, p51, p52 = map(zodb_pickle,

Re: [ZODB-Dev] Transaction undo example

2005-04-12 Thread Patrick DECAT
I believe you should then use the manage_undo_transactions method as used in the undo.dtml form. Something like: context.manage_undo_transactions(transaction_info=('QTF5TVlhNjdtTXc9')) HTH, Patrick. On Apr 12, 2005 2:09 PM, Stefan Milenkovic <[EMAIL PROTECTED]> wrote: > Hello, > > Thank you for

Re: [ZODB-Dev] Transaction undo example

2005-04-12 Thread Patrick DECAT
Hi, if you want to abort the current transaction, here is a sample inspired from Zope's code: def some_method(self, REQUEST, RESPONSE): """Do stuff""" try: # Do important stuff RESPONSE.setStatus(204) except: RESPONSE.setStatus(500)

[ZODB-Dev] Transaction undo example

2005-04-12 Thread Stefan Milenkovic
Hello, I am relatively new to ZODB and I have to work for some reasons with the transactions. I am trying to undo a transaction, but until now it has been unsuccessful. Maybe I don't know how to do it exacltly... So is there someone who can give me a small example of a transaction undo? Thanks