You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Ernest L. Williams Jr." <er...@ornl.gov> on 2006/08/19 03:16:03 UTC

How to use post-commit to send email to users of various projects?

Hi,

Can someone send me an example of a post-commit script that sends email
for multiple projects and multiple users?





Thanks,
Ernest

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to use post-commit to send email to users of various projects?

Posted by si <ss...@gmail.com>.
Hi Ernest (subnant author here),

On 8/20/06, Ernest L. Williams Jr. <er...@ornl.gov> wrote:
> On Sat, 2006-08-19 at 07:56 -0400, Kevin Greiner wrote:
> >
> > On 8/18/06, Ernest L. Williams Jr. <er...@ornl.gov> wrote:
> >
> >         Can someone send me an example of a post-commit script that
> >         sends email
> >         for multiple projects and multiple users?
> >
> >
> > We've been using subnant on Windows 2003 Server with great success. It
> > allows you to add properties to the svn folders you want to watch.

Nice to hear someones using it!

> > http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/doc/commit-email.html
> >
> Great. :)
>
> I think I understand how to set the property.
> ==================================================
> Is the following correct??:
> svn propset hook-commit-email \

The default property is "hook:commit-email"  (note colon)

You can override this using the "hook-prop" property in Subnant's
"commit-email" target. Once you have Subnant up and running, do
"subnant help commit-email", this should give more detail.

> 'ernesto@mydomain.com=author,date,log,changed' \
> /path-to-svnroot
> ==================================================
>
>
> However, I don't understand what to do for post-commit.
>
> Could you send a generic example of showing how to do this?

This is the simplest approach:

subnant commit-email -D:repos=%1 -D:rev=%2      (Windows)
subnant commit-email -D:repos="$1" -D:rev="$2" &   (Linux)


This is our current post-commit.bat, it does the commit-email,
then performs a fast backup using unison:

HookStart commit-email backup -D:repos=%1 -D:rev=%2 -D:unison-log=true


Have a look at the hook example at the bottom of:

http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/README.txt

Subnant has a complete test environment (creates/deletes temporary
repository, working copy, log directory, etc) so you don't have to mess
with existing repositories until you're happy everything is setup correctly.

If you can get this working on your server:

subnant test -D:target=commit-email -D:sendmail=ernesto@ornl.gov

Then you know everything is setup for any repository (which has
the hook to call the commit-email target), then you just have to
configure the hook:commit-email property with the required value
in the appropriate repository directory path.

Any other questions just holla and I'll be happy to help, aside from
the recently added backup target (uses unison) and the "hookstart"
executable*** for post-commit hooks, Subnant hasn't had a lot of
recent work (12 month old son and new non-government job;-),
but I think it aside from getting the website and wiki up, and the
case-insensitive target finished, it covers all of our Subversion
administration needs.  Feedback welcome of course!

peace
si

*** Hookstart is a workaround for Windows issue with Subversion
>= 1.3.1 post-commit hooks not returning from spawned processes.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to use post-commit to send email to users of various projects?

Posted by "Ernest L. Williams Jr." <er...@ornl.gov>.
On Sat, 2006-08-19 at 07:56 -0400, Kevin Greiner wrote:
> 
> On 8/18/06, Ernest L. Williams Jr. <er...@ornl.gov> wrote:
>         
>         Can someone send me an example of a post-commit script that
>         sends email
>         for multiple projects and multiple users?
>         
> 
> We've been using subnant on Windows 2003 Server with great success. It
> allows you to add properties to the svn folders you want to watch. 
> 
> http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/doc/commit-email.html
> 
Great. :)

I think I understand how to set the property.
==================================================
Is the following correct??:
svn propset hook-commit-email \
'ernesto@mydomain.com=author,date,log,changed' \
/path-to-svnroot
==================================================


However, I don't understand what to do for post-commit.

Could you send a generic example of showing how to do this?



Thanks,
Ernest

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to use post-commit to send email to users of various projects?

Posted by Kevin Greiner <gr...@gmail.com>.
On 8/18/06, Ernest L. Williams Jr. <er...@ornl.gov> wrote:
>
>
> Can someone send me an example of a post-commit script that sends email
> for multiple projects and multiple users?
>
>
We've been using subnant on Windows 2003 Server with great success. It
allows you to add properties to the svn folders you want to watch.

http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/doc/commit-email.html

Re: How to use post-commit to send email to users of various projects?

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
Mathias Weinert wrote:
> Ernest L. Williams Jr. wrote:
>> Hi,
>>
>> Can someone send me an example of a post-commit script that sends
>> email for multiple projects and multiple users?
>
> You can use mailer.py which is part of the Subversion tools section.
> It's part of the Subversion source archive or can be found here:
> trunk:
> http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/
> 1.3.2:
> http://svn.collab.net/repos/svn/tags/1.3.2/tools/hook-scripts/mailer/
>
> And there is also an alternative script named commit-email.pl in the
> tools/hook-scripts section.
>
> Mathias

There's also the plain old "mail" command, or simply setting up a standard 
"mailman" mailing list, and setting that up to provide a web archve of old 
commit mail messages. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: How to use post-commit to send email to users of various projects?

Posted by Mathias Weinert <Ma...@hyposystems.de>.
Ernest L. Williams Jr. wrote:
> Hi,
> 
> Can someone send me an example of a post-commit script that sends email
> for multiple projects and multiple users?

You can use mailer.py which is part of the Subversion tools section. It's
part of the Subversion source archive or can be found here:
trunk: http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/mailer/
1.3.2: 
http://svn.collab.net/repos/svn/tags/1.3.2/tools/hook-scripts/mailer/

And there is also an alternative script named commit-email.pl in the
tools/hook-scripts section.

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org