[Zope] request for advice

Steve Spicklemire steve@spvi.com
Wed, 2 Aug 2000 06:56:58 -0500 (EST)


Hi Folks,

ZCVSMixin is coming along... there are several things that need to be
done, but I've been on vacation.. I'm thinking of some kind of
fishbowl proposal, but there might be something that could be done
easily to allow it to work 'as is' on Windows. (I run windows only
when I am forced to ;-> ) Here is the only code in ZCVSMixin that
currently makes it fail on Windows:

>
>     #
>     # zope doesn't like forking... so let's just be dumb and use files
>     # rather than pipes..
>     #
>
>     stdoutFname = tempfile.mktemp()
>     stderrFname = tempfile.mktemp()
>
>     cmd = 'sh -v -c "%s" >%s 2>%s' % (command, stdoutFname, stderrFname)
>
>     zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'processing streams.. "%s"' % cmd)
>
>     iresult = os.system(cmd)
>
>     zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'checking result .. "%i"' % iresult)
>
>     resultStd = open(stdoutFname).read()
>     resultErr = open(stderrFname).read()
>
>     os.remove(stdoutFname)
>     os.remove(stderrFname)
>
>     zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'Got result.. "%s"' % resultStd)
>     zLOG.LOG('ZCVSMixin', zLOG.BLATHER, 'Got err result.. "%s"' % resultErr)
>
>     return iresult, resultStd, resultErr
>

I started with popen2 and friends.. but that didn't seem to play well
with Zope... probably mixing processes and threads is a bad idea... I
dunno. Anyway I'm not sure of the best way to do this in Windows. Of
course, ulitmately Shane Hathaway's idea of having a separate 'mini
cvs servelet' process running that zope communicates with via tcp/ip
could be the best way to add security and platform independence, but
it sounds like a fair amount of extra complexity to me, esp when I
don't have a lot of 'free time' to implement such a strategy.

Any thoughts about this? 

Also.. I'm trying to find a sane way to handle folder hierarchies with
ZCVSMixin. The main problem I have is separating the attributes of
containers with their contents. Right now the export/import code
treats folderish objects as a 'clump'. I think need a sort of
'export contents' and 'export attributes' protocol so that folders
under CVS control can export their attributes (as if it were some
'content') into some 'special' file, then delegate the exportation of
their contents to the CVS Folder.

Any thoughts about this appreciated! ;-)

-steve
   
>>>>> "Chris" == Chris McDonough <chrism@digicool.com> writes:

    Chris> Steve Spicklmire has also written the ZCVSMixin product
    Chris> (which I've never actually used) that might let you
    Chris> integration filesystem versioning with Zope more easily as
    Chris> well...

    >> -----Original Message----- From: Patrick Lewis
    >> [mailto:pl@teleport.com] Sent: Friday, July 21, 2000 12:50 PM
    >> To: 'zope@zope.org' Subject: Re: [Zope] request for advice
    >> 
    >> 
    >> On Fri, Jul 21, 2000 at 04:29:01PM +0100, Seb Bacon wrote: >
    >> Hello folks,
    >> > 
    >> > I'm just beginning to design my first big Zope application.
    >> I'm writing to > ask zopististitiatatas for some advice, since
    >> I'm a bit of a newbie and I > want to make sure:
    >> > 
    >> > [a] I reuse as much code as possible > [b] I make my code as
    >> reusable as possible > [c] my application is stable and
    >> scalable
    >> > 

    .....