Tux

...making Linux just a little more fun!

SVN commit_email.pl script support for multiple repositories

Smile Maker [britto_can at yahoo.com]


Wed, 9 Jan 2008 22:45:52 -0800 (PST)

Folks,

I have got a subversion repository running on /svn

Under that there are different directories /svn/a/aa ,/svn/b/bb like that.

I would like to send a mail to a group of ppl when the checkin happens in only /svn/a/aa this directory and sub dirs

I used post-commit script hook supplied with svn.

in that I added a line like

$REPOS/hooks/commit-email.pl "$REPOS" "$REV"  -m "*aa*" britto@yahoo.com  --diff "n" --from "ppl@mycom.com"
this is not working.

-m makes the support to multiple project and it accepts regex as an argument.

whatever i have provided any thing wrong.........

This is not following link also doesnt help

http://svn.haxx.se/users/archive-2007-05/0402.shtml

Thanks in Advance

--- Britto


Top    Back


Ben Okopnik [ben at linuxgazette.net]


Mon, 14 Jan 2008 11:57:35 -0500

On Wed, Jan 09, 2008 at 10:45:52PM -0800, Smile Maker wrote:

>    Folks,
> 
>    I have got a subversion repository running on  /svn
> 
>    Under that there are different directories /svn/a/aa ,/svn/b/bb like that.
> 
>    I would like to send a mail to a group of ppl when the checkin happens in
>    only /svn/a/aa this directory and sub dirs
> 
>    I used post-commit script hook supplied with svn.
> 
>    in that I added a line like
> 
>    $REPOS/hooks/commit-email.pl "$REPOS" "$REV"  -m "*aa*" britto@yahoo.com 
>    --diff "n" --from "ppl@mycom.com"
>
>    this is not working.

Are you sure that the script hook actually knows what '$REPOS' is? Try it with the full path and see if that works. You should also test 'commit-email.pl' by running it manually and seeing if it does what you need. You should also check the permissions on the hook script.

>    -m makes the support to multiple project and it accepts regex as an
>    argument.

If it accepts a regex, then '*aa*' is going to fail: it uses a quantifier (*) without a preceding atom (i.e., you've used globbing instead of a regex.) A working regex for the above would be '.*aa.*' - although that definition (just like your original one) is too broad, and should be defined better.

>    whatever i have provided any thing wrong.........
> 
>    This is not following link also doesnt help
> 
>    http://svn.haxx.se/users/archive-2007-05/0402.shtml

The thread doesn't appear to be related. "Doesn't work" isn't a sufficient diagnostic.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Top    Back