[Zope-dev] BTrees.Length conflict resolution

Martijn Pieters mj at zopatista.com
Fri Aug 12 07:47:30 EDT 2005

Did the conflict resolution code for BTrees.Length ever work? Because as 
  it stands now the code will fail as it assumes that integers are 
passed in, instead of state dictionaries:

    def _p_resolveConflict(self, old, s1, s2): return s1 + s2 - old

As there are no tests for this that I can see (the BTrees tests are 
kinda very dense), I am not too keen to go touch this, but I think this 
should read:

    def _p_resolveConflict(self, old, s1, s2):
        s1['value'] += s2['value'] - old['value']
        return s1

Martijn Pieters, up to his armpits in conflict resolution code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20050812/b43e8bcd/signature.bin

More information about the Zope-Dev mailing list