[ZODB-Dev] simple example of undo( )

Morgen Sagen morgen@osafoundation.org
Mon, 23 Sep 2002 19:00:42 -0700


On Monday, September 23, 2002, at 05:08 PM, Jeremy Hylton wrote:
>   M> so, am I misunderstanding how undo should work?  This is using
>   M> ZODB3-3.1b1 & Python 2.2.1.
>
> You've missed one small point.  undo() on FileStorage is a
> transactional operation.  You need to call get_transaction().commit()
> after undo().  This will commit the undo.
>
> Unfortunately, this doesn't make your test script work.  There's
> another problem, which I'm tempted to call a bug.  You canhack around
> the problem.  Add this line after committing the undo() transaction:
>
> conn.sync()

Sure enough, that worked.  Thank you!

~morgen