[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:16:38 -0500

On Tue, Jan 10, 2012 at 10:11, Amitakhya Phukan
<aphukan_at_fedoraproject.org> wrote:
> Hi all,
>
> I have a svn structure where we need to enable code collaborator check-in
> for a particular branch, branch5.
>
> For this, I have written the following pre-commit hook script.
>
> ====================================================
> #!/bin/bash
>
> dbUserName="dbuser"
> dbPassword="dbuser_at_123"
> dbIP="192.168.0.178"
> dbSchema="codecollabdb"
> REPOS="$1"
> TXN="$2"
> SVNLOOK=/usr/bin/svnlook
> if [[ `echo "$BRANCH" | grep
> "branch1\|branch2\|branch3\|branch4\|branch6\|branch7...\|branch50"` == ""
> ]] ; then

> ====================================================
>
> However, even though I am able to commit to all branches without any review
> ID, for branch5 also I am able to commit without a review ID. It is clear
> that something is wrong with the script. But I am not able to figure out
> what. Please help me to correct it.

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?
Received on 2012-01-10 16:17:53 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.