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

RE: Noob question on pre-commit windows script

From: Tom Blough <tom.blough_at_truetemper.com>
Date: Thu, 7 Feb 2008 19:55:58 +0800

> Simon Large wrote:
> ...However, the environment for a server side hook script will
> not know anything about the WC location. Until TSVN 1.5 come
> out you will have to run your script manually.
> ...And finally, if you run SubWCRev as a pre-commit hook script,
> it will get revision numbers as they were *before* the commit
> which may not be very useful.
> Ron Wilson wrote:
> What you want would require a client side hook script. This
> is not currently supported in the released TSVN, but, as I
> recall, is planned for the 1.5.0 release, so may be in the
> nightly builds of TSVN.

I understand the above and downloaded TortoiseSVN which appears
to have client side hook scripts. However, I'm still having problems
getting a hook to run. I though maybe spaces in the working path might be
causing problems, so I checked out my project to c:\temp and created a hook
script in TortoiseSVN:

Path: C:\temp
Command line: C:\temp\version.bat
Wait: true
Hide: false

> Simon Large wrote:
> Also, I believe the syntax of your batch file is wrong. Try
> 'if exist' instead of 'if exists'.

Excellent catch. To make sure I was not having any more stupid problems
with paths or anything else, I reduced my batch file in the working
directory to a single line:

Type rtb.mkr > rtb.mkr

This should create a zero length file in whatever directory the bat file is
executed. After the script runs, I should be able to search the disk for
rtb.mkr and discover what was the actual working path. Double-clicking the
bat file does indeed create a rtb.mkr file in the directory containing the
bat file.

> Simon Large wrote:
> The fact that your script does nothing only indicates that
> nothing has changed since you last ran it. SubWCRev
> deliberately does not write to the output file if the content
> would be unchanged.

I changed one of the source files, and committed the project to TortoiseSVN.
The "changes made" window in the Commit dialog lists the modified file and
it is checked for committing. No DOS window remained on screen after
clicking OK, and a search of the disk found no rtb.mkr file.

> Stefan Küng wrote:
> You can't start a bat script alone, you have to specify
> cmd.exe instead and pass your bat file on the command line.

The documentation on client-side hook scripts in has and
example screen print showing a script called
"C:\TortoiseSVN\Hooks\post-commit.bat", and I followed the instructions
exactly on creating a script, but still no joy in Mudville.

Can someone who has gotten client-side hook scripts working comment on what
I am doing wrong?



To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-02-07 12:56:16 CET

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

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