Florent Guillaume wrote:
  base._p_activate()       # make sure we're not a ghost
  base.__setstate__(state) # change the state
  base._p_changed = True   # marke object as dirty


OK, this is the code I went with.

Well the C code is pretty clear, it does a PyDict_Clear before doing PyDict_Update on the __dict__. Dunno how it was at the time Evan made his comment.

Well, there's tests now, so we should find out if this changes in the future...

OFS.tests.testCopySupport was a good starting place, but it used DemoStorage which doesn't support history, so I had to swap in a real, live filestorage ;-)

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
_______________________________________________
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