You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Richard Moore <mo...@iinet.net.au> on 2004/03/17 13:47:09 UTC
pre-commit hook
Hi all
Are there any trick to using the pre-commit hook, as I'm having troubles
with mine.
SVN is on a W2K server PC.
Thanks in advance
Richard Moore
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: pre-commit hook
Posted by Richard Moore <mo...@iinet.net.au>.
Juanma
Thanks for the help, you got over this hurdle.
Richard Moore
-----Original Message-----
From: Juanma Barranquero [mailto:jmbarranquero@wke.es]
Sent: Thursday, 18 March 2004 18:59
To: users@subversion.tigris.org
Subject: Re: pre-commit hook
On Thu, 18 Mar 2004 09:15:39 +1000
"Richard J. Moore" <ri...@debtorsoftware.com.au> wrote:
> My understanding is that all I need to do is have a file called
> pre-commit.(bat,exe,vbs, etc...) in the repository at ... \_svn\hooks.
Only .exe, .cmd, and .bat, although there was some thought into using
%PATHEXT% to determine which extensions to allow.
> The pre-commit.* file then get called with two arguments ([1] REPOS-PATH
> (the path to this repository) and [2] TXN-NAME (the name of the txn
> about to be committed)).
Yes.
> I've tried to do a little test file where all it does is take the
> arguments and append them to a text file, but without much luck.
I think you're being bitten by the fact that you cannot rely on the
current working directory being hooks/. Try setting explicitly the
current directory on you pre-commit hook, or else use a full path when
pointing to the text file.
Something like:
@ECHO OFF
ECHO REPOS-PATH = %1 >> c:\my.log
ECHO TXN = %2 >> c:\my.log
should work (and in fact does, in my setup).
Juanma
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: pre-commit hook
Posted by Juanma Barranquero <jm...@wke.es>.
On Thu, 18 Mar 2004 09:15:39 +1000
"Richard J. Moore" <ri...@debtorsoftware.com.au> wrote:
> My understanding is that all I need to do is have a file called
> pre-commit.(bat,exe,vbs, etc...) in the repository at ... \_svn\hooks.
Only .exe, .cmd, and .bat, although there was some thought into using
%PATHEXT% to determine which extensions to allow.
> The pre-commit.* file then get called with two arguments ([1] REPOS-PATH
> (the path to this repository) and [2] TXN-NAME (the name of the txn
> about to be committed)).
Yes.
> I've tried to do a little test file where all it does is take the
> arguments and append them to a text file, but without much luck.
I think you're being bitten by the fact that you cannot rely on the
current working directory being hooks/. Try setting explicitly the
current directory on you pre-commit hook, or else use a full path when
pointing to the text file.
Something like:
@ECHO OFF
ECHO REPOS-PATH = %1 >> c:\my.log
ECHO TXN = %2 >> c:\my.log
should work (and in fact does, in my setup).
Juanma
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: pre-commit hook
Posted by Juanma Barranquero <jm...@wke.es>.
On Wed, 17 Mar 2004 23:47:09 +1000
"Richard Moore" <mo...@iinet.net.au> wrote:
> Are there any trick to using the pre-commit hook, as I'm having troubles
> with mine.
What kind of trouble?
Juanma
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org