[ZODB-Dev] conflict resolution for PersistentList
Diez B. Roggisch
d.roggisch at ehotel.de
Mon May 24 09:52:50 EDT 2004
Am Monday 24 May 2004 15:28 schrieb Jeremy Hylton:
> On Mon, 2004-05-24 at 09:20, Diez B. Roggisch wrote:
> > Having a _p_resolveConflict on UserList didn't help me as it doesn't get
> > called, while having one at Parent gets called but contains the pickled
> > version as state - nothing I can work with.
>
> I don't understand why an _p_resolveConflict on a PersistentList
> subclass wouldn't be called. (You do mean PersistentList instead of
> UserList, right?) That sounds like a bug.
>
> class MyList(PersistentList):
> def _p_resolveConflict(...):
> pass # do something
yup - from the code-example I sended today:
class ConflictPersistentList(PersistentList):
def _p_resolveConflict(_, oldState, savedState, newState):
print "resolving"
print oldState, newState
return oldState
the example is pretty self-contained, if someone is interested on working with
it I'll tar it up.
Diez
More information about the ZODB-Dev
mailing list