[Zope-CMF] Historical revisions in CMF (was Re: CMF newbie questions)

Florent Guillaume fg@nuxeo.com
Thu, 27 Mar 2003 15:00:37 +0100


In article <1048700679.20407.4.camel@beauty> you write:
> On Wed, 2003-03-26 at 11:32, Ausum Studio wrote:
> > I've enabled CMF to handle revisions by allowing it to inherit from
> > OFS.History, on a experimental basis, and it works fine so far. If you want
> > to try it, open CMFCore/PortalContent.py with any editor an perform the
> > changes indicated down below. After you restart Zope, the "History" tab will
> > appear for all contentish objects, in the management interface. Starting
> > that point you'll need to provide methods (or modify existing ones) to
> > access those revisions. I'm including a simple history-viewer script.
> > 
> > A simple and general workaround in your case is to modify the view methods
> > of your content types to make them render the closest published revision (or
> > any other you indicate, based on your site's policy), when the object's
> > state is 'retracted' (yes, create that one). As currently there's no
> > relation between revisions and the workflow's review_history, as provided by
> > 'portal_workflow.getInfoFor', one of your to-write methods might be one that
> > compares timestamps and returns the mentioned revision object.
> > 
> > I'll publish a How-to on this subject, provided there's no code conflicts
> > I'm not aware of. :)
>
> [...]
> 
> Given a working example, with reasonable testing:  can anyone see /
> think of a reason not to land this for 1.4?

I'm wary of using ZODB-level versionning to provide user-level or
application-level versionning. In practice we have found it doesn't
work. It prevents one from packing the database as you want to minimize
space, and it doesn't give you any flexibility in how versions are
handled.

In our experience, versionning and archiving must be coded into the
application itself, and bound to a workflow, with explicit policies to
decide how long and under what circumstances you keep archived versions.

Archiving is fundamentally a workflow operation.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com