[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: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 07 Feb 2008 19:01:52 +0100

Tom Blough wrote:

> I understand the above and downloaded TortoiseSVN 1.4.99.12031 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:
>
> Post_commit_hook
> Path: C:\temp
> Command line: C:\temp\version.bat

Change that to
cmd.exe /c "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.

Small correction:
Type rtb.mkr > rtb.mkr
will not create a zero length file. If 'rtb.mkr' does not exist, the
Type command will throw an error. And if it exists, the new file will
contain the same as the rtb.mkr file.

To create test files, use
echo test > rtb.mkr
instead.

> The documentation on client-side hook scripts in 1.4.99.12031 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?

Yes, sorry. Those screenshots are wrong.
Simon?

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

Received on 2008-02-07 19:02:05 CET

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