[<<] Industrie Toulouse

Today, I deployed RevisionManager (and its sibling, RevisionObjects) into a Zope development site. RevisionManager seems to be the least obtrusive yet most (generally) effective CVS front end to come along for Zope.

RevisionManager aims for the notion that most Zope objects that you want to excite source control over in fact tend to have a single text (or binary, in the case of files and images) based representation. It also deals with Zope's generic Properties data description and extension system.

For general usage, a RevisionManager can be added and set up for a site root. It's a unique object, and doesn't interfere with any other content unless you tell it to - it doesn't add extra tabs, etc. If you do want an extra tab to do checkins/updates/diffs/etc per item, RevisionObjects patches in to give you that ability. But most of a site can be managed via the RevisionManager object.

RevisionManager's implementation is pretty intelligent and fairly well done. I found one problem today that I reported to the author (basically - if you have a Zope object, such as a folder, called 'read', the synchronization process will fail). But overall, RevisionManager seems to take to heart a lot of the concepts espoused in Zope 3's philosophy:

  • RevisionManager acts as a new service on behalf of managed objects, and doesn't require that those objects change.
  • RevisionObjects do patch the system to add extra functionality. Basically, a new tab, versioning is added to objects in the ZODB. This tab is a view that communicates with the RevisionManager service to perform per-item CVS actions. In Zope 3, this would most likely be written as a View and registered as a menu item, and not require any dynamic patching at all. Zope 3's architecture should encourage this kind of "harmless extension" to add new functionality to basic content/business objects.
  • New Adapters can be implemented for custom data objects that make them conform to an interface expected by RevisionManager's property marshalling system. Again, this is akin to Zope 3's adapter system. RevisionManager says "I need this interface in order to marshal properties" and you say "well, my object doesn't implement that interface, but let me write something that will talk to it AND to you in the way that you both want."

ZopeMag Issue 5 features a free article discusses the design considerations for RevisionManager, offers insight into how it works, and compares it to other (older) solutions for Zope.