Andy Levy wrote:
> On Tue, Sep 9, 2008 at 06:49, Jan Hendrik <list.jan.hendrik_at_gmail.com> wrote:
>> So this is a Subversion limition, is it? For running helloworld.py
>> from the CMD prompt just like that works quite fine, no need to call
>> python.exe in front.
>
> I'll have to try again when I get to work; I've never been able to get
> a Perl script to run without calling perl.exe.
No, it is really a *Windows* limitation. The file association magic in Windows
is a feature of the CMD shell and Windows Explorer; it causes an interpreter to
be called to handle the associated file types.
The Subversion hook process is not executing in a shell and can only exec the
list of files that Windows itself (i.e. without an interpreter) can handle:
subversion/libsvn_repos/hooks.c:
...
#ifdef WIN32
/* For WIN32, we need to check with file name extension(s) added.
As Windows Scripting Host (.wsf) files can accomodate (at least)
JavaScript (.js) and VB Script (.vbs) code, extensions for the
corresponding file types need not be enumerated explicitly. */
".exe", ".cmd", ".bat", ".wsf", /* ### Any other extensions? */
...
If you want to write hooks for Windows, you have to wrap them in a .cmd, .bat,
or .wsf file. NOTE: If you are using ActiveState's Perl, they include a small
utility <runperl.bat> which will call your Perl script from a batch file
automatically:
http://aspn.activestate.com/ASPN/docs/ActivePerl/5.10/bin/runperl.html
HTH
John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-09 13:35:03 CEST