You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by annick collet <an...@hotmail.com> on 2006/06/21 12:27:48 UTC
tags pattern
Dear all,
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 ?
Thanks, Ann.
_________________________________________________________________
Is your computer as tidy as your bedroom? Find everything with the MSN
Search toolbar! http://join.msn.com/mobile-Messaging/overview
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: tags pattern
Posted by Ryan Schmidt <su...@ryandesign.com>.
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.