Hello all,

I want to do the following: commit a change to an object, then commit
another. Now I want to undo the second change. Easy: get the tid using
undoLog and call undo(tid, transaction.get()). Now the following
transactions are in the DB:

- Change 1
- Change 2
- Undo change 2

Now I want to take the DB back to the state before any of the three
transactions were commited. I can find no way to do this because all the
transactions change the same object and therefor I can never undo more
than the most resent one.

It seems to me reasonable that with this state ZODB should be able to
undo "Change 1" because it is actually in the same state as it was
between change 1 and change 2.

I tried undoing them all in one transaction in hopes that the system
would smart enough to know that it would not cause a conflict, but no
luck.

The reason for all this is that I want to implement standard GUI-style
undo/redo features in a ZODB application.

Probably the easiest way to provide this functionality would be to
implement a kind of undo that undoes all transactions back to a given
point.

Also in the back of my mind is the idea of being able to configure a
connection to give me a non-current view of the DB (using MVCC). This
would allow me to implement suffisticated diff'ing algorithms between
states of the DB. This seems like it would be very easy to implement.
With MVCC in place and all. And would allow applications to implement
much more suffisticates undo than could be implemented in the current
system. Thoughts? and is this what custom conflict resolution is for?

Thanks.
-Arthur
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to