subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Levy <andy.l...@gmail.com>
Subject Re: Help with svn pre-commit hook needed
Date Tue, 10 Jan 2012 15:16:38 GMT
On Tue, Jan 10, 2012 at 10:11, Amitakhya Phukan
<aphukan@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@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?

Mime
View raw message