[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: Andy Levy <andy.levy_at_gmail.com>
Date: Mon, 8 Sep 2008 21:31:14 -0400

On Mon, Sep 8, 2008 at 21:17, Craig McQueen <mcqueen-c_at_edsrd1.yzk.co.jp> wrote:
> Andy Levy wrote:
>
> On Mon, Sep 8, 2008 at 10:32, Jan Hendrik <list.jan.hendrik_at_gmail.com>
> 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?

When you make the association, you're really telling Explorer "when I
double-click a file with this extension, invoke python.exe with this
file as the first argument passed."

As noted elsewhere in this thread (I think), Windows has no execute
bit - it just has a list of file types it can execute. CMD, BAT, COM &
EXE are the ones that come to mind, there might be one I'm forgetting.

To test what you describe above, create a basic "hello world" program
in Python, and another as a batchfile. At a command prompt, just run
"helloworld.bat" and "helloworld.py" - that's pretty much what SVN
will be doing. Note that helloworld.py won't run, but "python
helloworld.py" will.

---------------------------------------------------------------------
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 04:31:06 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.