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

Re: Using VBScript for hooks? pre-revprop-change.vbs?

From: fj <fj_at_effjay.com>
Date: 2007-08-15 19:44:24 CEST

Tom Malia wrote:
> Iím trying to write a pre-revprop-change hook using VBScript (Trying
> to implement svnsync)
> The problem Iím having is, Subversion doesnít appear to be finding the
> file.
> If I name the file: pre-revprop-change.vbs
> And I run svnsync initialize it acts as if the hook script is not there.
> If I name the file: pre-revprop-change.wsf
> And I run svnsync initialize it tells me that it ďfailed to startĒ the
> script file.
> I assume the issue with wsf is that I donít have the Microsoft
> component that actually runs wsf files properly installed/registered.
> Iím hoping that is irrelevant though because Iíd rather be able to
> just use VBS files.
> Why does it seem like Subversion is not looking for the: VBS version
> of the file?
> Thanks in advance,
> Tom Malia
> p.s. It would be really nice if the standard hooks directory contained
> a complete set of VBScript template files for us non-UNIX folks along
> with the template Bash scripts.
Unfortunately, I cannot give you **the** answer to your
vbscript-hookscript dilema, but I hope this info will be of use to you
as you wrestle with life at the ms-dos command line:

1. bash on windows? there's no "bash"-ing on windows unless you replace
the native/default command interpreter, or run another on top of it,
such as cygwin. (note -- "bashing on windows" != "bash"-ing on
windows... both of which I've done at one time or another ;-)

2. puns aside, you may find these two resources helpful in writing any
sort of scripts to run in the native environments provided by MS Windows:

Rob van der Woude's script / batch file info at:

for when you really do need to write batch files for cmd.exe, or
command.com, or if you need to do other MS-related scripting (e.g.


The GnuWin32 project at http://gnuwin32.sourceforge.net/packages.html

The group behind this effort has ported a large portion of the unix
utilities over to run natively in MS Windows -- directly on top of
cmd.exe or command.com. No cygwin or other similar "layer" required.

3. I haven't yet done much with hook scripts in any environment, but I
have been in situations where I simply had to write batch programs, and
both these resources were very helpful to me. My largest and most
complicated ms-dos effort was writing a utility to export a large source
tree from (old) starteam and to load it into a new SVN server. We were
trying to keep the target SVN box as pristine as possible(wintel type),
so I couldn't count on much being there; certainly not cygwin, perl, any
visual studio or other heavy-weight programming tools, so I wrote it
entirely in "ms-dos". yech. it was painful, but sometimes you just have
to suck it up.

The result was nearly "pure" dos batch file (for w2k NT) -- there were a
few things that just would have been exceedingly painful to try to
implement with ms-dos' utilities. If I remember correctly, I used 3
gnuwin32 utilities, and they reduced the redness and irritation
considerably<grin>. So, if you're stuck having to write batch files,
there's no reason you cannot enrich the utilities you can call from
those batch files, i.e. by installing gnuwin32 utilities where they make

4. There's actually "reasonable" (for microsoft, anyway) documentation
on the command line utilities also, but it's not especially obvious to
find. Just in case you don't know where to get to it in windows, I found
these pages particularly useful when writing batch files:

Start => Help and Support.
search on these strings WITH the quotes, and bookmark in your Help &
Support options the pages I've noted from the search results:

string: 'Cmd', bookmark page having that title
string: 'Command shell overview', bookmark page having same title
string: 'Command-line reference A-Z', bookmark page having same title
string: 'Automating command-line tasks', bookmark results page "Using
command-based scripting tools"

5. And as I cited above, Rob's web site was extremely helpful to me,
often providing expanded (and more useful, less trivial) examples of the
(often) arcane ways that microsoft's command interpreters do things we
would find trivial in, say, bash.

Best of luck.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 15 19:42:37 2007

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.