I did a small chunk of work on the GOSH / ICH Content Management System today.
The original dev, ocope, implemented version control in the system using ZopeVersionControl. It appears that the same idea went into CMF and Plone 3.0, the idea is to have a site-global "repository" tool that does the verioning for us, no need to implement it in our objects.
The tool is called CMFEditions and works like that:
Save:
repo = site.portal_repository
repo.save(object)
This creates a new version of the object.
Iterate:
repo = site.portal_repository
for version_date in ...
You get the version data for each version stored.
CMFEditions has a handful of interfaces for doing stuff, but the most important is the repository one, it lets you manipulate the object’s history.
Now I need to figure out how to move my CMS objects to that repository tool without breaking the version history...
Next step, integrate my CMS with CMFDiffTool.