[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnperms.py test is OK but not work!

From: Zoom.Quiet <zoom.quiet_at_gmail.com>
Date: 2006-07-06 09:09:23 CEST

fixed bug for:
http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svnperms.py
in class:"class SVNLook:"""
def _execsvnlook(self, cmd, *args, **kwargs):
    execcmd_args = ["svnlook", cmd, self.repospath]
...
"""
here directness call "svnlook" in HOOKS env. is bad!
i define new var in class SVNLook::"""
def __init__(self, repospath, txn=None, rev=None):
    self.SVNLOOK = "/usr/local/bin/svnlook"
...
"""
and fixed _execsvnlook() :"""
def _execsvnlook(self, cmd, *args, **kwargs):
    execcmd_args = [self.SVNLOOK, cmd, self.repospath]
...
"""
it look like can working!

i suggest fixed class MissingArgumentsException(Exception)
add one Option:"""
-L SVNLOOK absolut path
"""
ask setup the SVNLOOK call path in pre-commit

that all!

On 7/5/06, Zoom. Quiet <zoom.quiet@gmail.com> wrote:
> i like svnserver, hate Apache mod!
> so usage HOOKS to support projects Ctrl:
> in pre-commit config as:"""
> REPOS="$1"
> TXN="$2"
> ...
> HOOKS="/usr/local/repos/sinamu/hooks/script"
> $HOOKS/svnperms.py -r "$REPOS" -t "$TXN"
> """
> in conf/svnperms.conf setup as:"""
> [groups]
> svnadmin = zoomq svnmgt
> ## proj mu's dev.
> mumu = liulei xiaokui xiaobo1 zhangchao lingbo
> ## proj mc's dev.
> mumc = liulei xiaokui jiachao liwei2 sunchen lilu2 langrui
> ### Ctrl for repo sinamu
> [sinamu]
> ## root Ctrl::
> trunk/[^/]+/ = @svnadmin(add,remove)
> tags/[^/]+/ = @svnadmin(add,remove)
> branches/[^/]+/ = @svnadmin(add,remove)
> ## foo Ctrl::
> trunk/foo/.+ = @mumu(add,remove,update)
> tags/foo/[^/]+/ = @mumu(add,remove)
> branches/foo/[^/]+/.* = @mumu(add,remove,update)
> ...
> """
> and testing svnperms.py is OK like:"""
> [svn@100] /usr/local/repos/sinamu/hooks/script> ./svnperms.py -r
> "/usr/local/repos/sinamu" -R "2856" -A "lingbo"
> error: you don't have enough permissions for this transaction:
> you can't update trunk/mc1.0/sina_doc/readme.txt
> """
> notice i usage esp. user "svn" to running svnserver
>
> so so, but through TortoiseSVN in Windows client env,
> the svnperms.py not work; like limited :"trunk/foo/.+ =
> @mumu(add,remove,update)"
> is not stop others group user ci !
>
> what happen?
>
> thanx for any suggest.
>
> this problem is baffle me one month,google and google can not find
> good solution...
>
> --
> """Time is unimportant, only life important!
> blogging : http://blog.zoomquiet.org/pyblosxom/
> wiki enter: http://wiki.woodpecker.org.cn/moin/ZoomQuiet
> in douban: http://www.douban.com/people/zoomq/
> """
>

-- 
"""Time is unimportant, only life important!
blogging  :  http://blog.zoomquiet.org/pyblosxom/
wiki enter:   http://wiki.woodpecker.org.cn/moin/ZoomQuiet
in douban:  http://www.douban.com/people/zoomq/
"""
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 6 09:11:04 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.