You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tremal Naik <tr...@gmail.com> on 2006/10/24 13:53:05 UTC

How to test a hook script?

Hello,
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?

thanks

-- 
TREMALNAIK

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

Re: How to test a hook script?

Posted by Ryan Schmidt <su...@ryandesign.com>.
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