You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@newton.ch.collab.net> on 2002/10/22 15:14:31 UTC

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

kfogel@tigris.org writes:
> New Revision: 3434
> Log:
> * tools/hook-scripts/svnperms.py,
>   tools/hook-scripts/svnperms.conf.example: New access control script
>   and sample conf file from Gustavo Niemeyer <ni...@conectiva.com>.
> 
> * tools/hook-scripts/README: Mention svnperms.py.  Reorganize a bit.

Gustavo, I put these in tools/hook-scripts now.  If you'd like to just
maintain them there, just send me a username/password pair (plaintext
please) and I'll set you up for commit access on that area.

Note that I commented out this line near the top of the script:

   from __future__ import generators

because it caused this error for me in Python 2.1:

   $ ./svnperms.py
     File "./svnperms.py", line 2
       from __future__ import generators
   SyntaxError: future feature generators is not defined

Not sure what's going on there; is my Python already too old?  Then we
probably want a minimum version check.  Anyway, you can fix it in the
tree...

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Gustavo Niemeyer <ni...@conectiva.com>.
> I think you'd need a really huge and complex config file before you'd 
> start hitting memory problems.

Indeed.

> >but will reduce the needed python version.
> >
> >Ok.. I'll do that as soon as I get repository access.

> You'll also have to get rid of xreadlines in _read. Or rather, just use 

IIRC, xreadlines was reworked in the latest version to be implemented with
generators, but it was already available in earlier versions:

Python 2.1 (#1, Jan 18 2002, 22:26:24) 
[GCC 2.95.3 20010315 (release) (conectiva)] on linux-ppc
Type "copyright", "credits" or "license" for more information.
>>> open("/etc/passwd").xreadlines()
<xreadlines object at 0x10186e48>
>>> 

> ConfigParser and be done with it.

As I explained in the other mail, I can't use ConfigParser.. :-(

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Branko Čibej <br...@xbc.nu>.
Gustavo Niemeyer wrote:

>It's needed. I'm using a generator in the Permission.walk() function.
>Well, I can change it to return a list instead. It will increase a
>little bit the memory usage,
>
I think you'd need a really huge and complex config file before you'd 
start hitting memory problems.

> but will reduce the needed python version.
>
>Ok.. I'll do that as soon as I get repository access.
>
You'll also have to get rid of xreadlines in _read. Or rather, just use 
ConfigParser and be done with it.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Gustavo Niemeyer <ni...@conectiva.com>.
> > New Revision: 3434
> > Log:
> > * tools/hook-scripts/svnperms.py,
> >   tools/hook-scripts/svnperms.conf.example: New access control script
> >   and sample conf file from Gustavo Niemeyer <ni...@conectiva.com>.
> > 
> > * tools/hook-scripts/README: Mention svnperms.py.  Reorganize a bit.
> 
> Gustavo, I put these in tools/hook-scripts now.  If you'd like to just

Thank you!

> maintain them there, just send me a username/password pair (plaintext
> please) and I'll set you up for commit access on that area.

I'll mail you a password.

> Note that I commented out this line near the top of the script:
> 
>    from __future__ import generators
> 
> because it caused this error for me in Python 2.1:
> 
>    $ ./svnperms.py
>      File "./svnperms.py", line 2
>        from __future__ import generators
>    SyntaxError: future feature generators is not defined
> 
> Not sure what's going on there; is my Python already too old?  Then we
> probably want a minimum version check.  Anyway, you can fix it in the
> tree...

It's needed. I'm using a generator in the Permission.walk() function.
Well, I can change it to return a list instead. It will increase a
little bit the memory usage, but will reduce the needed python version.

Ok.. I'll do that as soon as I get repository access.

Thanks!

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can't build from latest...

Posted by su...@collab.net.
From: Ben Collins-Sussman <su...@collab.net>
Date: 22 Oct 2002 15:11:52 -0500
In-Reply-To: <3D...@honeylocust.com>
Message-ID: <86...@kepler.ch.collab.net>
Lines: 12
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Paul Houle <pa...@honeylocust.com> writes:

> $ svn update
> $ make clean
> $ make
>
> /home/paul/packages/subversion/subversion/clients/cmdline/checkout-cmd.c:76:
> undefined reference to `svn_opt_args_to_target_array'

Re-run ./autogen.sh.  Our gen-make.py script needs to detect that fact
that libsvn_subr/opt.c was added to your working copy.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Can't build from latest...

Posted by Paul Houle <pa...@honeylocust.com>.
   I've been using svn for a project for a while,  but I ran into a 
problem and thought it might good to check if it's been checked in the 
latest version...  I did an

$ svn update
$ make clean
$ make

and the compile fails with:

cd subversion/clients/cmdline && /bin/sh 
/home/paul/packages/subversion/libtool --silent --mode=link  gcc 
-DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE 
-D_GNU_SOURCE  -g -Wall -Wmissing-prototypes -Wstrict-prototypes 
-Wmissing-declarations -pthread -DNEON_ZLIB -Wpointer-arith 
-Wwrite-strings -Wshadow -DSVN_DEBUG -DAP_DEBUG   -I./subversion/include 
-I. -I/usr/local/include/neon -I/home/paul/packages/subversion/db/dist  
-I/usr/local/apache2/include   -I/usr/local/apache2/include 
-I/usr/local/BerkeleyDB.4.0/include -L/usr/local/BerkeleyDB.4.0/lib  
-rpath /usr/local/lib -o svn  add-cmd.o checkout-cmd.o cleanup-cmd.o 
commit-cmd.o copy-cmd.o delete-cmd.o diff-cmd.o export-cmd.o feedback.o 
help-cmd.o import-cmd.o info-cmd.o log-cmd.o ls-cmd.o main.o merge-cmd.o 
mkdir-cmd.o move-cmd.o prompt.o propdel-cmd.o propedit-cmd.o 
propget-cmd.o proplist-cmd.o props.o propset-cmd.o resolve-cmd.o 
revert-cmd.o status-cmd.o status.o switch-cmd.o update-cmd.o util.o 
../../../subversion/libsvn_client/libsvn_client-1.la 
../../../subversion/libsvn_wc/libsvn_wc-1.la 
../../../subversion/libsvn_ra/libsvn_ra-1.la 
../../../subversion/libsvn_delta/libsvn_delta-1.la 
../../../subversion/libsvn_subr/libsvn_subr-1.la 
/usr/local/apache2/lib/libaprutil-0.la -lgdbm -ldb -lexpat 
/usr/local/apache2/lib/libapr-0.la -lm -lcrypt -lnsl  -ldl 
-L/usr/local/lib -lneon -lz -lxml2 -lz -lm
add-cmd.o: In function `svn_cl__add':
/home/paul/packages/subversion/subversion/clients/cmdline/add-cmd.c:55: 
undefined reference to `svn_opt_args_to_target_array'
checkout-cmd.o: In function `svn_cl__checkout':
/home/paul/packages/subversion/subversion/clients/cmdline/checkout-cmd.c:76: 
undefined reference to `svn_opt_args_to_target_array'
cleanup-cmd.o: In function `svn_cl__cleanup':
/home/paul/packages/subversion/subversion/clients/cmdline/cleanup-cmd.c:47: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/cleanup-cmd.c:54: 
undefined reference to `svn_opt_push_implicit_dot_target'
commit-cmd.o: In function `svn_cl__commit':
/home/paul/packages/subversion/subversion/clients/cmdline/commit-cmd.c:58: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/commit-cmd.c:68: 
undefined reference to `svn_opt_push_implicit_dot_target'
copy-cmd.o: In function `svn_cl__copy':
/home/paul/packages/subversion/subversion/clients/cmdline/copy-cmd.c:52: 
undefined reference to `svn_opt_args_to_target_array'
delete-cmd.o: In function `svn_cl__delete':
/home/paul/packages/subversion/subversion/clients/cmdline/delete-cmd.c:69: 
undefined reference to `svn_opt_args_to_target_array'
diff-cmd.o: In function `svn_cl(double, int, float, float)':
/home/paul/packages/subversion/subversion/clients/cmdline/diff-cmd.c:70: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/diff-cmd.c:76: 
undefined reference to `svn_opt_push_implicit_dot_target'
/home/paul/packages/subversion/subversion/clients/cmdline/diff-cmd.c:147: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/diff-cmd.c:154: 
undefined reference to `svn_opt_push_implicit_dot_target'
export-cmd.o: In function `svn_cl__export':
/home/paul/packages/subversion/subversion/clients/cmdline/export-cmd.c:47: 
undefined reference to `svn_opt_args_to_target_array'
help-cmd.o: In function `svn_cl__help':
/home/paul/packages/subversion/subversion/clients/cmdline/help-cmd.c:70: 
undefined reference to `svn_opt_print_help'
import-cmd.o: In function `svn_cl__import':
/home/paul/packages/subversion/subversion/clients/cmdline/import-cmd.c:86: 
undefined reference to `svn_opt_args_to_target_array'
info-cmd.o: In function `svn_cl__info':
/home/paul/packages/subversion/subversion/clients/cmdline/info-cmd.c:238: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/info-cmd.c:245: 
undefined reference to `svn_opt_push_implicit_dot_target'
log-cmd.o: In function `svn_cl__log':
/home/paul/packages/subversion/subversion/clients/cmdline/log-cmd.c:376: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/log-cmd.c:386: 
undefined reference to `svn_opt_push_implicit_dot_target'
ls-cmd.o: In function `svn_cl(long, short)':
/home/paul/packages/subversion/subversion/clients/cmdline/ls-cmd.c:128: 
undefined reference to `svn_opt_args_to_target_array'
main.o: In function `main':
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:537: 
undefined reference to `svn_opt_parse_revision'
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:721: 
undefined reference to `svn_opt_get_canonical_subcommand'
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:737: 
undefined reference to `svn_opt_get_canonical_subcommand'
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:764: 
undefined reference to `svn_opt_subcommand_takes_option'
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:767: 
undefined reference to `svn_opt_get_option_from_code'
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:769: 
undefined reference to `svn_opt_format_option'
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:773: 
undefined reference to `svn_opt_subcommand_help'
/home/paul/packages/subversion/subversion/clients/cmdline/main.c:818: 
undefined reference to `svn_opt_subcommand_help'
merge-cmd.o: In function `svn_cl__merge':
/home/paul/packages/subversion/subversion/clients/cmdline/merge-cmd.c:62: 
undefined reference to `svn_opt_subcommand_help'
/home/paul/packages/subversion/subversion/clients/cmdline/merge-cmd.c:70: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/merge-cmd.c:91: 
undefined reference to `svn_opt_subcommand_help'
/home/paul/packages/subversion/subversion/clients/cmdline/merge-cmd.c:116: 
undefined reference to `svn_opt_subcommand_help'
mkdir-cmd.o: In function `svn_cl__mkdir':
/home/paul/packages/subversion/subversion/clients/cmdline/mkdir-cmd.c:51: 
undefined reference to `svn_opt_args_to_target_array'
move-cmd.o: In function `svn_cl__move':
/home/paul/packages/subversion/subversion/clients/cmdline/move-cmd.c:52: 
undefined reference to `svn_opt_args_to_target_array'
propdel-cmd.o: In function `svn_cl__propdel':
/home/paul/packages/subversion/subversion/clients/cmdline/propdel-cmd.c:49: 
undefined reference to `svn_opt_parse_num_args'
/home/paul/packages/subversion/subversion/clients/cmdline/propdel-cmd.c:54: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/propdel-cmd.c:61: 
undefined reference to `svn_opt_push_implicit_dot_target'
propedit-cmd.o: In function `svn_cl__propedit':
/home/paul/packages/subversion/subversion/clients/cmdline/propedit-cmd.c:50: 
undefined reference to `svn_opt_parse_num_args'
/home/paul/packages/subversion/subversion/clients/cmdline/propedit-cmd.c:55: 
undefined reference to `svn_opt_args_to_target_array'
propget-cmd.o: In function `svn_cl__propget':
/home/paul/packages/subversion/subversion/clients/cmdline/propget-cmd.c:51: 
undefined reference to `svn_opt_parse_num_args'
/home/paul/packages/subversion/subversion/clients/cmdline/propget-cmd.c:57: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/propget-cmd.c:64: 
undefined reference to `svn_opt_push_implicit_dot_target'
proplist-cmd.o: In function `svn_cl__proplist':
/home/paul/packages/subversion/subversion/clients/cmdline/proplist-cmd.c:48: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/proplist-cmd.c:55: 
undefined reference to `svn_opt_push_implicit_dot_target'
propset-cmd.o: In function `svn_cl__propset':
/home/paul/packages/subversion/subversion/clients/cmdline/propset-cmd.c:53: 
undefined reference to `svn_opt_parse_num_args'
/home/paul/packages/subversion/subversion/clients/cmdline/propset-cmd.c:78: 
undefined reference to `svn_opt_args_to_target_array'
resolve-cmd.o: In function `svn_cl__resolve':
/home/paul/packages/subversion/subversion/clients/cmdline/resolve-cmd.c:54: 
undefined reference to `svn_opt_args_to_target_array'
revert-cmd.o: In function `svn_cl__revert':
/home/paul/packages/subversion/subversion/clients/cmdline/revert-cmd.c:50: 
undefined reference to `svn_opt_args_to_target_array'
status-cmd.o: In function `svn_cl__status':
/home/paul/packages/subversion/subversion/clients/cmdline/status-cmd.c:49: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/status-cmd.c:59: 
undefined reference to `svn_opt_push_implicit_dot_target'
switch-cmd.o: In function `svn_cl__switch':
/home/paul/packages/subversion/subversion/clients/cmdline/switch-cmd.c:56: 
undefined reference to `svn_opt_args_to_target_array'
update-cmd.o: In function `svn_cl__update':
/home/paul/packages/subversion/subversion/clients/cmdline/update-cmd.c:50: 
undefined reference to `svn_opt_args_to_target_array'
/home/paul/packages/subversion/subversion/clients/cmdline/update-cmd.c:60: 
undefined reference to `svn_opt_push_implicit_dot_target'

I'm running RH 7.3 on x86 with patches up to date.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Branko Čibej <br...@xbc.nu>.
Gustavo Niemeyer wrote:

>>Yes, I suppose ordering would be a problem. Hm. I wonder if you could 
>>somehow extend ConfigParser to use a different dictionary 
>>implementation, or change the config file layout a bit to make that 
>>unnecessary.
>>
>>And I wonder if it's worth the trouble. :-)
>>    
>>
>
>I don't think so. All the beauty of svnperms.py is based on the
>flexibility offered by the configuration file. The current scheme of
>"the latest match is what counts" makes it very confortable to
>specify any kind of access control.
>
>Is there anything in that 40 lines Config class that makes you feel
>unconfortable?
>
Hm? Oh, no, I'm just a bit allergic to duplicating code. But even I can 
cooperate with the inevitable. :-)

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Gustavo Niemeyer <ni...@conectiva.com>.
> Yes, I suppose ordering would be a problem. Hm. I wonder if you could 
> somehow extend ConfigParser to use a different dictionary 
> implementation, or change the config file layout a bit to make that 
> unnecessary.
> 
> And I wonder if it's worth the trouble. :-)

I don't think so. All the beauty of svnperms.py is based on the
flexibility offered by the configuration file. The current scheme of
"the latest match is what counts" makes it very confortable to
specify any kind of access control.

Is there anything in that 40 lines Config class that makes you feel
unconfortable?

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Branko Čibej <br...@xbc.nu>.
Gustavo Niemeyer wrote:

>>BTW, Gustavo, why are you parsing the config explicitly, instead of just 
>>using the ConfigParser module?
>>    
>>
>
>Basically because I need to keep the ordering, and because I need
>multiple options with the same key. ConfigParser uses a dictionary to
>store information, thus making it impossible to get these behaviors.
>
Yes, I suppose ordering would be a problem. Hm. I wonder if you could 
somehow extend ConfigParser to use a different dictionary 
implementation, or change the config file layout a bit to make that 
unnecessary.

And I wonder if it's worth the trouble. :-)

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Gustavo Niemeyer <ni...@conectiva.com>.
> Yes, I was wondering about that, too. IIRC generators are slated to be a 
> Python 2.3 feature, and are __future__-proofed in 2.2. We require 2.0 
> for everythng else.
> 
> I don't know whether replacing the generator usage with 2.0 features is 
> worth the trouble; using them makes the script much more concise.

Ok.. I'll check it and let you know.

> BTW, Gustavo, why are you parsing the config explicitly, instead of just 
> using the ConfigParser module?

Basically because I need to keep the ordering, and because I need
multiple options with the same key. ConfigParser uses a dictionary to
store information, thus making it impossible to get these behaviors.

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Gustavo Niemeyer <ni...@conectiva.com>.
> > By all means, let's leave them in.  But protect the script so it bombs
> > in a friendly way if the Python interpreter is too old.
> 
> I'll do that. Thank you!

Oops.. there's a minor problem here. "from __future__" statements must
be the very first thing in a python file. I'll just get rid of the
generator. Here's the patch I'm applying:

Index: svnperms.py
===================================================================
--- svnperms.py
+++ svnperms.py	2002-10-22 15:12:39.000000000 -0300
@@ -1,5 +1,4 @@
 #!/usr/bin/python
-### from __future__ import generators
 import commands
 import sys, os
 import getopt
@@ -67,13 +66,15 @@
         return self._sections_dict.get(option.lower(), default)
 
     def walk(self, section, option=None):
+        ret = []
         if option:
             option = option.lower()
         for sectname, options in self._sections_list:
             if sectname == section:
                 for optname, value in options:
                     if not option or optname == option:
-                        yield (optname, value)
+                        ret.append((optname, value))
+        return ret
 
 
 class Permission:

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Gustavo Niemeyer <ni...@conectiva.com>.
> By all means, let's leave them in.  But protect the script so it bombs
> in a friendly way if the Python interpreter is too old.

I'll do that. Thank you!

-- 
Gustavo Niemeyer

[ 2AAC 7928 0FBF 0299 5EB5  60E2 2253 B29A 6664 3A0C ]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Branko Čibej <br...@xbc.nu> writes:
> Yes, I was wondering about that, too. IIRC generators are slated to be
> a Python 2.3 feature, and are __future__-proofed in 2.2. We require
> 2.0 for everythng else.
> 
> I don't know whether replacing the generator usage with 2.0 features
> is worth the trouble; using them makes the script much more concise.

By all means, let's leave them in.  But protect the script so it bombs
in a friendly way if the Python interpreter is too old.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3434 - trunk/tools/hook-scripts

Posted by Branko Čibej <br...@xbc.nu>.
Karl Fogel wrote:

>kfogel@tigris.org writes:
>  
>
>>New Revision: 3434
>>Log:
>>* tools/hook-scripts/svnperms.py,
>>  tools/hook-scripts/svnperms.conf.example: New access control script
>>  and sample conf file from Gustavo Niemeyer <ni...@conectiva.com>.
>>
>>* tools/hook-scripts/README: Mention svnperms.py.  Reorganize a bit.
>>    
>>
>
>Gustavo, I put these in tools/hook-scripts now.  If you'd like to just
>maintain them there, just send me a username/password pair (plaintext
>please) and I'll set you up for commit access on that area.
>
>Note that I commented out this line near the top of the script:
>
>   from __future__ import generators
>
Yes, I was wondering about that, too. IIRC generators are slated to be a 
Python 2.3 feature, and are __future__-proofed in 2.2. We require 2.0 
for everythng else.

I don't know whether replacing the generator usage with 2.0 features is 
worth the trouble; using them makes the script much more concise.

>because it caused this error for me in Python 2.1:
>
>   $ ./svnperms.py
>     File "./svnperms.py", line 2
>       from __future__ import generators
>   SyntaxError: future feature generators is not defined
>
>Not sure what's going on there; is my Python already too old?  Then we
>probably want a minimum version check.  Anyway, you can fix it in the
>tree...
>  
>
Yes, your Python is too old.


BTW, Gustavo, why are you parsing the config explicitly, instead of just 
using the ConfigParser module?


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org