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

Re: tags pattern

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-22 14:05:00 CEST

On Jun 21, 2006, at 14:27, annick collet wrote:

> I'd like to modify the pre-commit hook in order that whenever a
> transaction is a add in /tags folder, to check that the new-tag
> follows naming convention such as 9.9.9[R/T/A]
>
> How can I test that the tag name is with pattern ?

Here's a pre-commit hook script to do this. You'll probably have to
adjust the path to svnlook within the script.

I hope I got it to check what you wanted to check. I interpreted
"9.9.9[R/T/A]" to mean "number, dot, number, dot, number, and then R
or T or A". If you meant something different, you'll have to adjust
the regular expression.

The script was developed on Mac OS X, so I hope it would also work
without problems on *BSD systems. Mac OS X uses the BSD version of
sed, and I'm worried that the script might not work on Linux or other
systems with the GNU sed implementation because it has different
switches. Mac OS X has the GNU version of grep.

It obviously won't work at all on Windows. You'd need to write a
batch script, or a python script or a perl script or a visual basic
script or what have you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Thu Jun 22 14:06:51 2006

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.