[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: D.J. Heap <dj_at_shadyvale.net>
Date: 2003-08-12 03:00:01 CEST

Branko Čibej wrote:
> 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]

Yes, I remembered you mentioning this a while ago and I did try using
APR_SHELLCMD, but got the same results -- This is on the call to
apr_procattr_cmdtype_set in io.c's svn_io_run_cmd function, right? I
just hardcoded APR_SHELLCMD for testing here...is something else needed?

>
>
>>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.
>

Ah, thanks! I can now get the stderr output in the middle of the
invalid handle messages...so it seems to be working fine, it just gets
all the invalid handle message garbage.

DJ

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 12 03:00:55 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.