Bruce,

I'm not sure what you're looking for. If something distributed with Gforge
is broken, shouldn't you ask its forum or the authors? Or are you trying to
add functionality that doesn't currently exist?

- Mark. 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of bruce
> Sent: Sunday, April 17, 2005 10:42 PM
> To: [email protected]
> Subject: trying to parse a file...
> 
> hi,
> 
> i'm trying to modify an app (gforge) that uses python to do 
> some file parsing/processing...
> 
> i have the following shell file that uses python. if i 
> understand it correctly, it's supposed to modify the 
> 'viewcvs.conf' file, and replace/update the section with 'svn_roots'.
> 
> it isn't working correctly... and i'm willing to consider using perl.
> basically, i'd like to continually add to the svn_root: block 
> with an additional line as required. also, can someone tell 
> me what i'd need to do, if i wanted to remove a line of text 
> from the 'svn_root' block if i had a given 'test_x:'
> 
> i need to be able to call the script like 'foo arg1'
> 
> can somebody tell me what i need to do to accomplish this?
> 
> thanks
> 
> bruce
> [EMAIL PROTECTED]
> 
> -----------------------------------------------------------
> viewcvs.conf:
>   .
>   .
>   .
>   #
>   # This setting specifies each of the Subversion roots (repositories)
>   # on your system and assigns names to them. Each root 
> should be given
>   # by a "name: path" value. Multiple roots should be separated by
>   # commas and can be placed on separate lines.
>   #
>   #svn_roots = test2: /svn-gforge/uploadsvn
>   svn_roots = test5: /gforge-svn/test7/svn,
>               test2: /gforge-svn/test7/svn,
>               test3: /gforge-svn/test7/svn,
> 
>   # The 'root_parents' setting specifies a list of 
> directories in which
>   # any number of repositories may reside.  Rather than force 
> you to add
>   .
>   .
>   .
> -----------------------------------------------------------
> 
> 
> 
> 
> [EMAIL PROTECTED] bin]# cat test.sh
> -----------------------------------------------------------
> #! /bin/sh
> 
> python <<EOF
> import sys
> import os
> import string
> import ConfigParser
> r = ConfigParser.RawConfigParser ()
> r.read ("/etc/viewcvs/viewcvs.conf")
> r.set ("general","svn_roots","")
> l = os.listdir ("/var/lib/gforge/chroot/svnroot")
> l2 = []
> for d in l:
>   l2.append (d + ": svn://localhost/" + d) r.set 
> ("general","svn_roots",string.join (l2, ', ')) r.set 
> ("general","cvs_roots","") r.set ("general","default_root", l 
> [0]) r.write (open ("/var/lib/gforge/etc/viewcvs.conf", "w")) EOF
> 
> sed 's,pathname = CONF_PATHNAME .*,pathname = 
> "/var/lib/gforge/etc/viewcvs.conf",' \
>     /usr/lib/python2.3/site-packages/viewcvs/viewcvs.py > 
> /var/lib/gforge/etc/viewcvs.py
> -----------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to