You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jewel Nuruddin <ju...@yahoo.com> on 2009/04/23 11:03:01 UTC

Need Help

Hi,
I am sorry if I make mistake to post this mail here.
I work hooks with subversion and its work fine for me, but now I want email if from a particuler repository like I have

/game/branch/test
and
/game/trunk/test

how can I do that.
Please help me
if you want my configuration I can send it to you.
Thanks

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1876691

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Need Help

Posted by Erik Hemdal <er...@comprehensivepower.com>.
-----Original Message-----
From: Jewel Nuruddin [mailto:jungi_unavailable@yahoo.com] 
Sent: Thursday, April 23, 2009 11:25 AM
To: Ryan Schmidt
Cc: users@subversion.tigris.org
Subject: Re: Need Help



yes I want to get mail only from certain path.
in my post-commit file I write the following code

REPOS="$1"
REV="$2"
/usr/local/bin/commit-email.pl "$REPOS" "$REV" --from admin@game.com -s "SVN
commit in packages" subversion-users@game.com

and I use commit-email.pl file and it give me notification mail for every
repository
so if you can would you please kindly give me some solution.
Thank you very much for great help
 
Jewel, I think I ran into the same problem you have.  The commit-email.pl
script is documented to take an argument for a path regular expression.  But
when I tested it, I could not discover the right syntax to make it work and
do what you describe.  I burned a lot of time trying to sort it out.
 
The default regex seems to be set at line 742, in sub new_project.(look for
the value associated with the key match_regex).  I changed that default from
'.' to 'trunk' and got the script to notify only on trunk changes.
Obviously, this is changing the default behavior, but all I want is trunk
notifications anyway.
 
I'm sure there's a smarter, better fix, but this worked for me.  Maybe it
will work for you, too.
 
Erik

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1880392

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need Help

Posted by Jewel Nuruddin <ju...@yahoo.com>.
yes I want to get mail only from certain path.

in my post-commit file I write the following code



REPOS="$1"

REV="$2"

/usr/local/bin/commit-email.pl "$REPOS" "$REV" --from admin@game.com -s "SVN commit in packages" subversion-users@game.com



and I use commit-email.pl file and it give me notification mail for every repository

so if you can would you please kindly give me some solution.

Thank you very much for great help





--- On Thu, 4/23/09, Ryan Schmidt <su...@ryandesign.com> wrote:

From: Ryan Schmidt <su...@ryandesign.com>
Subject: Re: Need Help
To: "Jewel Nuruddin" <ju...@yahoo.com>
Cc: users@subversion.tigris.org
Date: Thursday, April 23, 2009, 10:29 PM

On Apr 23, 2009, at 08:22, Jewel Nuruddin wrote:

> Thank you very much, I had seen this now I received mail both from
> 
> /game/branch/test (Actual repository path --> https://svn.game.com/game/branch/test)
> and
> /game/trunk/test (Actual repository path ---> https://svn.game.com/game/trunk/test)
> 
> I want to get mail only from /game/trunk/test  this repository
> 
> Would you please kindly give me and example

Oh,
so you don't want to send mail only for some repositories and not for
other repositories after all. You want to send mail only for certain
paths within a repository and not for certain other paths within the
same repository.

Investigate the options for your mailer. For
example, if you are using the currently recommended mailer script,
mailer.py, then read up on the mailer.conf options. You can define a
regular expression in the for_paths variable defining what paths you
want it to match. In your case you might set this to ^/game/trunk/test


http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/mailer.conf.example




--- On Thu, 4/23/09, Ryan Schmidt <su...@ryandesign.com> wrote:

From: Ryan Schmidt <su...@ryandesign.com>
Subject: Re: Need Help
To: "Jewel Nuruddin" <ju...@yahoo.com>
Cc: users@subversion.tigris.org
Date: Thursday, April 23, 2009, 10:29 PM

On Apr 23, 2009, at 08:22, Jewel Nuruddin wrote:

> Thank you very much, I had seen this now I received mail both from
> 
> /game/branch/test (Actual repository path --> https://svn.game.com/game/branch/test)
> and
> /game/trunk/test (Actual repository path ---> https://svn.game.com/game/trunk/test)
> 
> I want to get mail only from /game/trunk/test  this repository
> 
> Would you please kindly give me and example

Oh, so you don't want to send mail only for some repositories and not for other repositories after all. You want to send mail only for certain paths within a repository and not for certain other paths within the same repository.

Investigate the options for your mailer. For example, if you are using the currently recommended mailer script, mailer.py, then read up on the mailer.conf options. You can define a regular expression in the for_paths variable defining what paths you want it to match. In your case you might set this to ^/game/trunk/test


http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/mailer.conf.example

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1879241

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need Help

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 23, 2009, at 06:03, Jewel Nuruddin wrote:

> I work hooks with subversion and its work fine for me, but now I  
> want email if from a particuler repository like I have
>
> /game/branch/test
> and
> /game/trunk/test
>
> how can I do that.


If you look in the file post-commit.tmpl that Subversion creates for  
you in the hooks directory of every new repository, it begins with  
the following comment:

# The post-commit hook is invoked after a commit.  Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
#   [1] REPOS-PATH   (the path to this repository)
#   [2] REV          (the number of the revision just committed)

So you can examine the first argument to your hook script to see what  
repository is being committed to.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1877405

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Need Help

Posted by Jewel Nuruddin <ju...@yahoo.com>.
Great Erik.......
Its work for me also.
Thank you very much

--- On Fri, 4/24/09, Erik Hemdal <er...@comprehensivepower.com> wrote:

From: Erik Hemdal <er...@comprehensivepower.com>
Subject: RE: Need Help
To: "'Jewel Nuruddin'" <ju...@yahoo.com>
Cc: users@subversion.tigris.org
Date: Friday, April 24, 2009, 2:30 AM



 
Message

 

  
  -----Original Message-----
From: Jewel Nuruddin 
  [mailto:jungi_unavailable@yahoo.com] 
Sent: Thursday, April 23, 2009 
  11:25 AM
To: Ryan Schmidt
Cc: 
  users@subversion.tigris.org
Subject: Re: Need 
  Help


  
    
    
      
        yes I want to get mail only from certain path.
in my post-commit 
        file I write the following 
        code

REPOS="$1"
REV="$2"
/usr/local/bin/commit-email.pl 
        "$REPOS" "$REV" --from admin@game.com -s "SVN commit in packages" 
        subversion-users@game.com

and I use commit-email.pl file and it 
        give me notification mail for every repository
so if you can would 
        you please kindly give me some solution.
Thank you very much for 
        great help
 
        Jewel, I think I ran into the same problem you have.  
        The commit-email.pl script is documented to take an argument for a path 
        regular expression.  But when I tested it, I could not discover the 
        right syntax to make it work and do what you describe.  I burned a 
        lot of time trying to sort it out.
         
        The default regex seems to be set at line 742, in sub 
        new_project.(look for the value associated with the key 
        match_regex).  I changed that default from '.' to 'trunk' and got 
        the script to notify only on trunk changes.  Obviously, this is changing the default behavior, 
        but all I want is trunk notifications anyway.
         
        I'm sure there's a smarter, better fix, but this worked for 
        me.  Maybe it will work for you, too.
         
        Erik

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1887619

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need Help

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 23, 2009, at 08:22, Jewel Nuruddin wrote:

> Thank you very much, I had seen this now I received mail both from
>
> /game/branch/test (Actual repository path --> https://svn.game.com/ 
> game/branch/test)
> and
> /game/trunk/test (Actual repository path ---> https://svn.game.com/ 
> game/trunk/test)
>
> I want to get mail only from /game/trunk/test  this repository
>
> Would you please kindly give me and example

Oh, so you don't want to send mail only for some repositories and not  
for other repositories after all. You want to send mail only for  
certain paths within a repository and not for certain other paths  
within the same repository.

Investigate the options for your mailer. For example, if you are  
using the currently recommended mailer script, mailer.py, then read  
up on the mailer.conf options. You can define a regular expression in  
the for_paths variable defining what paths you want it to match. In  
your case you might set this to ^/game/trunk/test


http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/ 
mailer.conf.example

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1878473

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need Help

Posted by Jewel Nuruddin <ju...@yahoo.com>.
Thank you very much, I had seen this now I received mail both from

/game/branch/test (Actual repository path --> https://svn.game.com/game/branch/test)
and
/game/trunk/test (Actual repository path ---> https://svn.game.com/game/trunk/test)

I want to get mail only from /game/trunk/test  this repository

Would you please kindly give me and example

Thanks

--- On Thu, 4/23/09, Ryan Schmidt <su...@ryandesign.com> wrote:

From: Ryan Schmidt <su...@ryandesign.com>
Subject: Re: Need Help
To: "Jewel Nuruddin" <ju...@yahoo.com>
Cc: users@subversion.tigris.org
Date: Thursday, April 23, 2009, 8:55 PM

On Apr 23, 2009, at 06:03, Jewel Nuruddin wrote:

> I work hooks with subversion and its work fine for me, but now I want email if from a particuler repository like I have
> 
> /game/branch/test
> and
> /game/trunk/test
> 
> how can I do that.


If you look in the file post-commit.tmpl that Subversion creates for you in the hooks directory of every new repository, it begins with the following comment:

# The post-commit hook is invoked after a commit.  Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
#   [1] REPOS-PATH   (the path to this repository)
#   [2] REV          (the number of the revision just committed)

So you can examine the first argument to your hook script to see what repository is being committed to.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1878420

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Need Help

Posted by Jewel Nuruddin <ju...@yahoo.com>.
Thank you very much, it help me lot

--- On Fri, 4/24/09, Ryan Schmidt <su...@ryandesign.com> wrote:

From: Ryan Schmidt <su...@ryandesign.com>
Subject: Re: Need Help
To: "Jewel Nuruddin" <ju...@yahoo.com>
Cc: users@subversion.tigris.org
Date: Friday, April 24, 2009, 12:45 AM


On Apr 23, 2009, at 10:24, Jewel Nuruddin wrote:

> yes I want to get mail only from certain path.
> in my post-commit file I write the following code
> 
> REPOS="$1"
> REV="$2"
> /usr/local/bin/commit-email.pl "$REPOS" "$REV" --from admin@game.com -s "SVN commit in packages" subversion-users@game.com
> 
> and I use commit-email.pl file and it give me notification mail for every repository
> so if you can would you please kindly give me some solution.
> Thank you very much for great help

Read the commit-email.pl script and/or its usage message to find out how to tell it to send mail only for certain paths. Or switch to using the mailer.py script and read how to configure its mailer.conf file.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1885930

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].