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

Re: How do I disable tag modification?

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-09-14 14:31:30 CEST

Wolfgang Fritz wrote:
> Hello,
> I'm trying to disable the modification of tags after creation.
> My tags are located in a project/tags directory as proposed in the "book".
> Users should be able to create a tag but should never be able to modify
> an existing tag (maybe delete a tag, that's under discussion)
> I see that using a pre-commit hook is probably the way to go. In the
> hook script I want to do the following:
> If a subdirectory */tags/foobar is involved in the commit (svnlook
> dirs-changed) and this directory already exists: abort the commit.
> Otherwise: perform the commit.
> Unfortunately I have not found an easy way to check if the directory
> */tags/foobar already exists. I see that in the "svnlook tree
> --show-ids" output, new directories seem to have ids of the form
> <4._0.t21-1> (the _0), but maybe there is a better way.
> Completely different approaches which achieve my goal are of course
> welcome :-)

Run svnlook changed
If any lines match "^.. tags/[^/]+/.+$" then deny the commit


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 14 14:36:23 2004

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