[Zope] using _p_resolveConflict on Folderish object

Stefan H. Holek stefan@epy.co.at
Mon, 30 Dec 2002 12:50:06 +0100 (CET)


On Sun, 29 Dec 2002, Willem Broekema wrote:

> In my case, oldState == savedState != newState. Your last statement
> implies there was some real conflict here, yet you also indicate there's
> nothing to merge.

Ugh, savedState != newState is exactly the conflict we are talking about.

The params should probably have been named newState1 and newState2. Both
are equally good (or bad) results of the current transaction. The naming
may have led you to the assumption that newState is somehow preferable to
savedState. It is not. newState is what you wanted to commit, savedState
is what another thread wanted to commit.

Note also that it's not about selecting a state to return, but about
actually computing a new one, given two equally valid, conflicting,
new states, and the state you started from for reference.

> As far as I understand it, the changes that led to newState were based
> on oldState. Because that foundation seems not to have changed, there's
> no inconsistency: newState if just fine.

The changes that led to savedState very likely were based on oldState as
well. Point is that savedState is just as "fine" an outcome. This is what
you are resolving after all.

Stefan