You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Erik Hemdal <er...@comprehensivepower.com> on 2010/05/17 21:50:54 UTC

mailer.py matches all paths; ignores for_paths; SVN 1.6.9

I'm trying to solve what must be a trivial problem; yet I'm missing something -- probably very basic.

Goal:  Use mailer.py to email for all commits to trunk; send no email for commits that do not change the trunk. I'm OK with being stupidly simple here, so for example if someone changes branches/branch/trunk.c it's ok to send mail.  But if the only path changed is branches/branch/foo.c, I don't want to send an email.

Actual results:  I get notifications for every change, even if trunk is unchanged at a particular revision.

In mailer.conf I have the following in my [general] section:

for_paths = trunk

There's nothing set for 'for_repos'.


I believe that I am reading the right copy of mailer.conf because I've set the commit_subject_prefix to a non-default value and I'm seeing the prefix that I set up.  But I can't seem to get mailer.py to respect for_paths.

Most of the posts I find in the archives simply point back to the example file, which did not help me.  And some more complicated regexes that seemed to be right for others did not work for me either.  Regardless of what I seem to set in "for_paths", I get an email for every change.

Obviously I am misunderstanding how mailer.py is matching paths, but I can't seem to find an answer online, in the SVN book, or in my other references.

If you have set this up correctly, I'd appreciate learning how you did it.  Thanks!  Erik

RE: mailer.py matches all paths; ignores for_paths; SVN 1.6.9

Posted by Erik Hemdal <er...@comprehensivepower.com>.

From: Erik Andersson [mailto:kirean@gmail.com]
Sent: Tuesday, May 18, 2010 2:37 AM
To: Erik Hemdal
Cc: users@subversion.apache.org
Subject: Re: mailer.py matches all paths; ignores for_paths; SVN 1.6.9


Thanks for the help, Erik

How have you setup your structure?

module/trunk
module/branches

Yes, this is how our repos are set up.


If so, try:
*/trunk


All these will produce notifications regardless of where in the repo the change is made:

 */trunk
.*/trunk
trunk/*

Is there something else where "trunk" is referenced?  Or perhaps there's a group or some other trigger (other than the path) that is causing the email to be sent? Do I need to set up groups or something else to make this work?

Thanks!   Erik

Re: mailer.py matches all paths; ignores for_paths; SVN 1.6.9

Posted by Erik Andersson <ki...@gmail.com>.
How have you setup your structure?

module/trunk
module/branches

If so, try:
*/trunk

Cheers / Erik

On Mon, May 17, 2010 at 11:50 PM, Erik Hemdal
<er...@comprehensivepower.com>wrote:

> I'm trying to solve what must be a trivial problem; yet I'm missing
> something -- probably very basic.
>
> Goal:  Use mailer.py to email for all commits to trunk; send no email for
> commits that do not change the trunk. I'm OK with being stupidly simple
> here, so for example if someone changes branches/branch/trunk.c it's ok to
> send mail.  But if the only path changed is branches/branch/foo.c, I don't
> want to send an email.
>
> Actual results:  I get notifications for every change, even if trunk is
> unchanged at a particular revision.
>
> In mailer.conf I have the following in my [general] section:
>
> for_paths = trunk
>
> There's nothing set for 'for_repos'.
>
>
> I believe that I am reading the right copy of mailer.conf because I've set
> the commit_subject_prefix to a non-default value and I'm seeing the prefix
> that I set up.  But I can't seem to get mailer.py to respect for_paths.
>
> Most of the posts I find in the archives simply point back to the example
> file, which did not help me.  And some more complicated regexes that seemed
> to be right for others did not work for me either.  Regardless of what I
> seem to set in "for_paths", I get an email for every change.
>
> Obviously I am misunderstanding how mailer.py is matching paths, but I
> can't seem to find an answer online, in the SVN book, or in my other
> references.
>
> If you have set this up correctly, I'd appreciate learning how you did it.
>  Thanks!  Erik
>
>