[Zope] using _p_resolveConflict on Folderish object

Willem Broekema willem@pastelhorn.com
Sun, 29 Dec 2002 15:32:50 +0100


Hi all - I'm trying to resolve ConflictErrors in my Product. It might be 
relevant that the product is derived from 'Folder'.

I created a '_p_resolveConflict' function that prints the three state 
parameters, 'old', 'saved' and 'new'.

I was surprised to see that the printed representation of the three 
states was identical: the data inside 'PR(...) was the same for every 
subobject. Also, 'oldstate == savedstate' was true, but not 'oldState == 
newState' or 'oldState is savedState'.

I would like to know what's going on here. For example, if 'oldState == 
newState', can I safely assume that newState is correct and there's no 
need to merge changes (which changes?) between oldState and savedState?


Now follows the printed state, in case that may help explaining this. 
The 'Feed' insances in the folder are named feed_###.

state == {
    'feed_view__doc__': 'dummy',
    '__ac_local_roles__': {'wilm': ['Owner']},
    'index_html__doc__': 'dummy',
    '_owner': (['acl_users'], 'wilm'),
    'cookie_name': 'DF_cat_skin',
    'title': '',
    'id': 'cat',
    'nav_frame__doc__': 'dummy',

   'feed_902912': PR(164726636 ('\x00\x00\x00\x00\x00\x00\r\x0e',
       ('Products.DogFeed.DFFeed', 'Feed'))),
   'feed_070984': PR(164727028 ('\x00\x00\x00\x00\x00\x00\r\x0f',
       ('Products.DogFeed.DFFeed', 'Feed'))),
   [...]

   '_objects': (
     {'meta_type': 'DogFeed RSS Feed', 'id': 'feed_902912'},
     {'meta_type': 'DogFeed RSS Feed', 'id': 'feed_070984'},
     [...]
    )
}


Thanks.

- Willem