[Zope-dev] ZCVS Mixin class... feedback sought.

Steve Spicklemire steve@spvi.com
Wed, 24 May 2000 16:11:33 -0500 (EST)


Hi Jerry, (in case you're wondering.. Jerry really *is* my brother..)

>>>>> "JS" == Jerry Spicklemire <jerry@spicklemire.com> writes:

    JS> Chris Withers wrote:

    >> Sounds like a cool idea, but I don't really understand what it
    >> does and how you use it.
    >> 
    >> Could you give use some enlightenment?

    JS> ZCVSMixin is a sort of replacement for a standard Zope Folder
    JS> Object. If you want to be able to maintain an entire Zope
    JS> Folder (and everything in it) in CVS, use a ZCVSMixin Object
    JS> instead. Then, from the Manage view, you get a new tab showing
    JS> up that provides the interaction with CVS.

That's basically right. Technically there are two parts. ZCVSMixin is
a python "Product" that handles talking to CVS and importing and
exporting objects. There is also a ZClass that inherits from both
Folder, and ZCVSMixin to provide Folder behavior and methods while
adding CVS support, hence the name Mixin. I believe you could really
use the 'Mixin' to add CVS support to any subclass of ObjectManager,
in a similar way.

    JS> What it actually does is an Export as XML on the whole
    JS> "folder", which then can be stored, view, checked out, checked
    JS> back in, and otherwise thoroughly managed and maintained
    JS> within CVS. For developers that are deep into Zope, and
    JS> familiar with CVS, this represents some potent possibilites.

Well.. close! It exports and imports all the objects in the folder
individually. This way I can edit one method, then 'checkin' that 
change with CVS. Anyone else with access to my repository can do
a 'checkout' from their Zope and get all the latest versions of
my objects in their zope. Think of it as the public CVS that 
CD uses now to publish Zope itself, but taken to the level of
tracking individual zope objects contained in Zope folders.

I've just been playing with it.. and you can sorta get the idea
looking at:

http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopeObjs/testCVS/

With CVS you can tag revisions etc and take a snapshot in time
of your zope objects, just like we do now with source code.

    JS> Think about checking out a Zope Widget from a CVS on the other
    JS> side of the planet, importing as XML into your local Zope,
    JS> where it is marshalled back from its CVSish XML form into the
    JS> original native Zope self. Now you can tweek it to your hearts
    JS> content, export as XML, then check the updated version back
    JS> in, where it becomes part of the trackable, archived,
    JS> searchable CVS system.

Right... that's the idea.

    JS> Steve, please clarify any of the concepts I've managed to
    JS> mangle!

Hope that helps.... It's really shocking just how easy it was
to do this.... makes me wonder why it hasn't been done already,
and *that* makes me wonder if I'm doing something really dumb 
here. ;-) It seems kinda cool to me. 

-steve