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

Re: Help with svn pre-commit hook needed

From: Andy Levy <andy.levy_at_gmail.com>
Date: Tue, 10 Jan 2012 10:43:37 -0500

Please quote context in your replies so people know what you're talking about.

On Tue, Jan 10, 2012 at 10:31, Amitakhya Phukan
<aphukan_at_fedoraproject.org> wrote:
> Hi Andy,
>
>
>
> On Tue, Jan 10, 2012 at 8:46 PM, Andy Levy <andy.levy_at_gmail.com> wrote:
>>
>>
>> Not sure if that's a typo or not, but you skipped from branch4 to branch6.
>>
>> Wouldn't it be better to do a pattern match here so that you don't
>> have to explicitly list every branch number?
>
>
>
> Can you give me an example please ? I am writing these scripts for the first
> time. An example would be good.

This isn't unique to svn hooks, this is just shell scripting & grep.

My grep is rusty but try this:

grep "branch[0-9]+/"

This should match any string with branch, followed by one or more
numbers, followed by a slash.
Received on 2012-01-10 16:44:51 CET

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.