[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: si <sshnug.si_at_gmail.com>
Date: 2006-08-22 10:01:16 CEST

Hi Ernest (subnant author here),

On 8/20/06, Ernest L. Williams Jr. <ernesto@ornl.gov> wrote:
> On Sat, 2006-08-19 at 07:56 -0400, Kevin Greiner wrote:
> >
> > On 8/18/06, Ernest L. Williams Jr. <ernesto@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
Received on Tue Aug 22 10:02:50 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.