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

RE: Hook scripts for win32

From: McKenna, Simon (RGH) <Simon.McKenna_at_rgh.sa.gov.au>
Date: 2005-05-06 04:06:05 CEST

-> > Does anyone have any good hook scripts for win32?
->
-> If you're looking for a post-commit hook, check out
-> http://chrison.net/NewVersionOfSvnPostCommitHook.aspx

Cool, I needed to do something similar, and went with NAnt
and NAntContrib to make use of their existing framework:

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

An example post-commit hook looks this:

start /b subnant commit-email -D:repos="%1" -D:rev="%2"

commit-email uses subversion properties in combination with
the svnlook subcommands, spec is here:
http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/doc/commit-email.html

The nice thing about NAnt is it makes chaining processes
together quite easy, so if you wanted to perform a dump
via the post-commit hook (for the committed revision),
as well as calling the commit-email target, it's just:

start /b subnant commit-email dump -D:repos="%1" -D:rev="%2"

Our nightly backup regime is a hotcopy (immediate recovery)
and dump (offsite backup) of our 30+ repositories, which is
just a case of adding a scheduled task to call:

subnant hotcopy dump -D:sendmail=true

This also keeps a log of when and what was backed up, sends
an email showing the hotcopy and verify result, along with
dump and compressed dump sizes, and because it picks up all
repositories under a svn-root directory, you don't need to
modify it if a repository is added or deleted.

Have tried to keep things flexible - options are parameterised
and there are defaults which you can over-ride if needed:
http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/conf/subnant.config.example

Also recently added a commit-message target for use with
the pre-commit hook to ensure a log message is entered,
so the pre-commit hook looks like:

subnant commit-message commit-access -D:repos="%1" -D:txn="%2"

Still working on commit-access target (access-control):
http://svn.berlios.de/viewcvs/*checkout*/subnant/trunk/doc/access-control.html

disclaimer: Subnant is a work in progress and unstable,
I'm eating my own dog food and still feel fine,
but that doesn't mean you will :)

peace
si

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 6 04:06:33 2005

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.