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

Re: About pre-revprop-change

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Tue, 9 Sep 2008 01:13:55 -0500

On Sep 8, 2008, at 20:17, Craig McQueen wrote:

> Andy Levy wrote:
>
>> On Mon, Sep 8, 2008 at 10:32, Jan Hendrik wrote:
>>
>>> Concerning Re: About pre-revprop-change Andy Levy wrote on 8 Sep
>>> 2008, 8:33, at least in part:
>>>
>>>> Last I knew, WSH scripts (.js, .vbs and .wsf) were not directly
>>>> callable from the hooks because they require an interpreter,
>>>> they aren't executed directly by the system. At least that was
>>>> the conclusion that was reached when I was discussing with a
>>>> couple of the devs a year or so ago. To use WSH scripts, you
>>>> have to call them from a batch file.
>>>
>>> I can't tell from own experience as I use plain batch here.
>>> However, I guess that limitation would apply to other interpreted
>>> (= script) languages like Perl or Python as well, wouldn't it?
>>
>> On Windows, yes. You have to invoke them from a BAT file.
>
> I've installed Python 2.5, and the installer associates *.py files
> with the Python interpreter. So if you double-click on a *.py file,
> or type its name in a command window, the script runs via the
> Python interpreter. I haven't tried it, but I thought that would
> mean I could write a "pre-revprop-change.py" hook script and it
> could run directly. Has anyone done this?

No, as it says above, Subversion will not attempt to run a *.py hook
script on Windows. It will only look for the standard Windows
executable extensions, such as .exe, .bat, etc. If you want to write
your hooks in Python, that's great, but you will still need to write
wrapper hooks in e.g. batch which pass the parameters on to the
Python hook script and propagate any exit code from the Python script.

---------------------------------------------------------------------
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 08:14:19 CEST

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

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