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

Re: Subversion - .wsf hook scripts on Windows

From: Andy Levy <andy.levy_at_gmail.com>
Date: 2007-01-17 04:28:59 CET

On 1/16/07, Daniel Rall <dlr@collab.net> wrote:
> On Tue, 16 Jan 2007, Andy Levy wrote:
>
> > On 1/8/07, Lieven Govaerts <svnlgo@mobsol.be> wrote:
> > >Andy Levy wrote:
> > >>
> > >> It may take me a couple days to get a build environment set up at home
> > >> (Subversion isn't my primary responsibility at work, so I need to
> > >> approach this as more of a personal project). If I can contribute
> > >> something useful back to Subversion, it'd be a great feeling.
> >
> > >If you can send me a simple .wsf pre-commit hook script which you think
> > >should work I'll test here.
> >
> > Sorry about the delay. I was unsuccessful in getting Subversion built
> > on my home system and I've had no time over the last couple weeks to
> > figure out how to get it working.
> >
> > Attached is a WSF script which iterates through all unnamed arguments
> > passed in and appends them to a textfile c:\hook.txt. It then iterates
> > through named arguments and does the same. It's not particularly
> > "clean" or elegant, but it gets the job done.
> Lieven, can you verify this? If it's a problem, and can't be
> addressed by way of Windows system configuration, we have the options
> of:
>
> o Removing the wsf extension from the supported hook file extension list

If this is the approach taken, the intermidiate pre-commit.bat step
(where one calls cscript.exe with the wsf filename and %1 %2 etc.)
should be documented somewhere easy to find (maybe a FAQ entry along
the lines of "how can I write hook scripts using windows script
host"?).

> o Special-case wsf files on Windows to run them using cscript.exe

(warning: slippery slope & scope creep ahead!)

If this is the chosen solution, would it be reasonable to use WSH's
named arguments for passing the arguments into the script? Instead of
addressing each parameter by the order in which they're specified on
the command line, one could address the parameters by name.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jan 17 04:29:07 2007

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.