You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by François <fr...@yahoo.ca> on 2006/05/22 09:29:30 UTC

Hooks and parameters

Hi,

Is it possible to send custom parameters to hooks? And if so, does Tortoise
SVN allow it?

My goal is to be able to switch between two different actions in a
post-commit, depending on the user's input.

Thanks.

François


Re: Hooks and parameters

Posted by Eric Lemes <er...@gmail.com>.
Hello François,

In CVS, I saw some plugins that parses the log message, obtaining some tags
to do different actions. Ex.: A CVS + Mantis integrations looks for #Issue:
Blah# in the log message. If it has some, change the issue "Blah" status in
mantis based on this tag.

This is an approach. Not so beatiful, but works.


[]'s

Eric Lemes

On 5/23/06, Bob Proulx <bo...@proulx.com> wrote:
>
> François wrote:
> > Is it possible to send custom parameters to hooks? And if so, does
> Tortoise
> > SVN allow it?
>
> No.  The hook interface is defined in the subversion server code.  You
> would need to patch the code and recompile in order to change it.
>
> The TortoiseSVN interface works on the client side.  Hooks are
> triggered on the server not the client.  Your TortoiseSVN client like
> any other client would cause the server to trigger the hooks.
>
> > My goal is to be able to switch between two different actions in a
> > post-commit, depending on the user's input.
>
> There is no way to do what you are asking.  Things are not set up that
> way.  Please provide a little more detail.  What are you trying to do?
>
> The post-commit is non-interactive.  It is invoked *after* the
> commit.  It is too late to affect the commit at that time.  In the
> pre-commit you are not allowed to modify the transaction.  The
> template documents what can and cannot be done in pre-commit.
>
> Bob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Re: Hooks and parameters

Posted by Bob Proulx <bo...@proulx.com>.
François wrote:
> Is it possible to send custom parameters to hooks? And if so, does Tortoise
> SVN allow it?

No.  The hook interface is defined in the subversion server code.  You
would need to patch the code and recompile in order to change it.

The TortoiseSVN interface works on the client side.  Hooks are
triggered on the server not the client.  Your TortoiseSVN client like
any other client would cause the server to trigger the hooks.

> My goal is to be able to switch between two different actions in a
> post-commit, depending on the user's input.

There is no way to do what you are asking.  Things are not set up that
way.  Please provide a little more detail.  What are you trying to do?

The post-commit is non-interactive.  It is invoked *after* the
commit.  It is too late to affect the commit at that time.  In the
pre-commit you are not allowed to modify the transaction.  The
template documents what can and cannot be done in pre-commit.

Bob

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