-> > Does anyone have any good hook scripts for win32?
-> If you're looking for a post-commit hook, check out
Cool, I needed to do something similar, and went with NAnt
and NAntContrib to make use of their existing framework:
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:
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:
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):
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 :)
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Fri May 6 04:06:33 2005