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

Re: Re: Client-side hook doesn

From: Simon Large <simon.tortoisesvn_at_gmail.com>
Date: Thu, 23 Aug 2012 10:15:29 +0100

On 23 August 2012 10:05, Hans <hschleichert_at_munich-metrology.com> wrote:
>> Cmd.exe is not a hook script, it is just the command interpreter. You
>> need to provide the path to the actual script, e.g. start-commit.bat,
>> start-commit.js, start-commit.exe, my-own-hook.cmd, or whatever your
>> hook is called.
> Simon, thanks for the reply. I know that cmd.exe is not a meaningful program in this context, I just wanted to have **something** executed. I had configured the start_commit_script as a *.bat file which only contains the follwing text:
> echo %0 %*
> pause
> ...which only showed the flashing command prompt window, so I tried cmd.exe instead.
> I believe I found the reason for the problem:
> To execute the *.bat hook script, cmd.exe is run, but input and output are redirected (probably, to/from the NUL device), so the pause command, like cmd.exe itself, thinks this is the end of the input, and exits; likewise, the echo command echoes to nowhere, and the command windows remains empty. The command
> pause > con < con
> in contrast, outputs "press any key", and then waits for a keypress!
> I guess this behaviour makes sense for automated scripting, but for testing scripts, it comes as a bit of a surprise...

Well I never knew that. I have also tried using PAUSE while debugging
a hook script before without success. Thanks for the update, I'll add
a note to the docs.


:       ___
:  oo  // \\      "De Chelonian Mobile"
: (_,\/ \_/ \     TortoiseSVN
:   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
:   /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-08-23 11:15:54 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.