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

Re: Making tags read-only - use commit-access-control.pl ?

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Wed, 3 Sep 2008 11:26:42 -0500

On Sep 3, 2008, at 4:54 AM, David Aldrich wrote:

>> http://svn.haxx.se/users/archive-2005-11/0056.shtml
>
> Thanks for directing me to the above thread.
>
> The condition in the example given in the thread is:
>
> # Deny transaction if any line writes to tags directory that exists.
>
> I have an unusual requirement from a user who wants to prevent
> modification of any files in a tag, but to allow addition of files
> to a tag. (I know this doesn't sound like the usual use of tag).
> Any idea how I could implement that?

Sure. The hook script given above runs "$SVNLOOK" changed -t "$TXN"
"$REPOS" and looks at the second word (presumably intended to be the
path to the file, though this will fail if the path to the file ever
contains spaces). You would need to add code to look at the first
character of the response from svnlook changed rather than throwing
it away like the script does. The first character will be "A" if a
file is added (which you want to allow) and "M" if a file is modified
(which you want to deny). You can also handle "D" (deleted) in any
way you choose.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-03 18:27:19 CEST

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.