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

Re: Hooks on Windows

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-08-12 00:23:09 CEST

D.J. Heap wrote:

> Hooks on Windows generally seem to work fine. And as far as I can
> tell, normal program hooks (.exe's) work fine all the time. However,
> when using .cmd or .bat scripts, the stderr output is not captured
> correctly.

This is most probably due to the fact that we don't run batch scripts
correctly on Windows. We should be using the APR_SHELLCMD to start the
hook if it's a batch file (see libsvn_repos/hooks.c:run_hook_cmd) --
this means passing another flag to svn_io_run_cmd. It works just fine on
Unix because shell scripts are treated the same as executables by the
kernel. Not so on Windows.... Patches would be welcome. My guess is that
a flag alongside the file extension in check_hook_cmd could do the trick.

[snip]

> I am not a commandline expert, but as I was investigating this I could
> not figure out how to get a script to write to stderr (echo can't seem
> to do it)

Heh. Echo can do it, so can anything else. Redirection to stderr is done
the same way as on Unix: 1>&2. Windows Help is your friend.

Anyway, fixing the hook execution logic would do the trick, I expect.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 12 00:23:52 2003

This is an archived mail posted to the Subversion Dev mailing list.

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