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

Re: start/pre-commit hook making tags write once?

From: Greg Thomas <thomasgd_at_omc.bt.co.uk>
Date: 2004-08-11 11:01:37 CEST

On Tue, 10 Aug 2004 11:51:38 -0600, Ian Schneider
<Ian.Schneider@ars.usda.gov> wrote:

>On Tuesday 10 August 2004 06:53 am, Ben Collins-Sussman wrote:
>> On Tue, 2004-08-10 at 05:36, Greg Thomas wrote:
>> > Hi,
>> >
>> > I hate re-inventing the wheel, so has anyone already got a pre or
>> > start-commit hook script that makes tags write-once?
>> >
>> > i.e. you can create a tag, but you can't edit it once you have?
>
>I put this in my pre-commit:
>
>/usr/bin/svnlook changed -t $2 $1 | grep "^U\W*tags" && /bin/echo "Cannot commit to tags" 1>&2 && exit 1

Many thanks for that; I may need to convert to Perl (for a Win32 based
server), but at least I can now see how to do it!

>> Is this really a problem that needs to be solved?
>
>True enough, but with this one-liner, you won't have to take that small step
>of undoing the change.

My feelings exactly. If I can prevent someone (esp. me!) from shooting
off their foot, I'd rather do so than re-attach it later ;-)

Greg

-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 11 11:02:15 2004

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.