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

Re: How to test a hook script?

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-10-24 19:58:40 CEST

On Oct 24, 2006, at 08:53, Tremal Naik wrote:

> I'm trying to test a hook script, before I include it in the
> pre-commit script. I should pass the transaction name as an argument.
> How do I know this? Can I use an old transaction? Is it possible
> testing the hook without a real transaction, simulating one?

The transaction directories are created in response to a commit. If
the commit was successful, the transaction becomes a revision; if the
commit was rejected by the pre-commit hook script, the transaction is
deleted. So the only way to test a pre-commit hook is really to
install it in a real repository and commit things to it. If you can't
afford to mess with your production repository, you can always create
a test repository and develop your hook script there, and only move
it over to your production repository when you're sure it works.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 24 19:59:31 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.