Hi all,
Svn perms is perfect, it has more accurate privilege control.
But if you want a simple control according to the file type, hope
the following pseudo code can helps:
[code]
for FILE in `svnlook changed -t "$TXN" "$REPOS"`
do
FLAG=`echo $FILE | grep -c '.txt$'`
if [ $FLAG -gt 0 ]; then
# Do you right check here, exit 1 if not pass
fi
done
[/code]
Note, it's of bash shell.
Regards,
Roy Dong
-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2007b@ryandesign.com]
Sent: 2007Äê7ÔÂ12ÈÕ 16:29
To: Pieter
Cc: users@subversion.tigris.org
Subject: Re: pre-commit hook: dont allow given diretory's and file-types
On Jul 12, 2007, at 03:07, Pieter wrote:
> Ryan Schmidt wrote:
>
>> This shouldn't be too difficult. In the pre-commit hook, you'll
>> want to
>> run "svnlook changed" on the transaction, and for each line of
>> output,
>> see if it matches one of the things you want to disallow.
>>
>> Or you may be able to just write a configuration file for
>> svnperms.py to
>> do this for you.
>>
>> http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/
>
> Thanks, but... err..., this is difficult for me, hehe I don't have
> a clue to
> do such a thing with Perl :-) Isn't there anybody who could help me
> a little
> bit with such a script?
Then have you looked into svnperms? All you would need to do there is
look at their example configuration file and see if you can use that
information to write a configuration file that meets your needs. And,
well, you would need to write a one-line hook script which calls
svnperms, and you'd need to install Python if you don't already have
it on your server.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
____________________________________________________________________________
_
Scanned by IBM Email Security Management Services powered by MessageLabs.
For more information please visit http://www.ers.ibm.com
____________________________________________________________________________
_
_____________________________________________________________________________
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 12 11:28:27 2007