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

RE: Setting "tags" to read only ?

From: Bailey, Darragh <dbailey_at_hp.com>
Date: Wed, 29 Sep 2010 14:39:43 +0000

> -----Original Message-----
> From: Phil Pinkerton [mailto:pcpinkerton_at_gmail.com]
> Sent: 29 September 2010 15:20
> To: users_at_subversion.apache.org
> Subject: Setting "tags" to read only ?
>
> How can we set a tag as read only at creation time ?
>
> We have a tags subdirectory and we keep tags created from
> trunk there, we want to set these tags to ready-only so
> they cannot be modified. We also copy our tags to a static
> tag for build reference ( we call this a sliding tag ). The
> static tag always has the same name but is always a copy of
> the actual tag to be built.
>
> Is it possible to set these tags to read-only once ther are
> copied from the trunk to the tags directory ?
>
> thanks

pre-commit hook script, don't believe there is any properties you can set to make any branches (which is essentially what a tag is) read-only in svn.

Something like the following should work depending if your svn repository is hosted on a linux system.
$SVNLOOK changed -t $2 $1 | grep "/tags/" && /bin/echo "Cannot commit to tags" 1>&2 && exit 1

You'll have to adjust the path to match the location in your tree amd also add an exception to allow some user to create the tag in the first place.

--
Regards,
Darragh Bailey
Received on 2010-09-29 16:41:41 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.