[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: Wed, 06 Feb 2008 18:21:07 +0100

Simon Large wrote:
> On 06/02/2008, Stefan Küng <tortoisesvn_at_gmail.com> wrote:
>> Tom Blough wrote:
>>> I'm running into trouble trying to automate version info updating. I've
>>> installed TortoiseSVN 1.4.7 using a local file based repository. Using
>>> SubWCRev.exe I've created a batch file in my working directory:
>>>
>>> Version.bat (1 line):
>>> "C:\Program Files\TortoiseSVN\bin\subwcrev.exe" .\ Version.java.wcr
>>> src\net\thebloughs\multitherm\Version.java
>>>
>>> This single line batch file works as expected when run from the command line
>>> in the directory. If I create a pre-commit script to call this batch file:
>>>
>>> pre-commit.bat (2 lines):
>>> if exists version.bat call version.bat
>>> exit 0
>>>
>>> I get the following error - svn: 'pre-commit' hook failed with error output:
>>> version.bat was unexpected at this time. Trying to debug this problem, I
>>> changed the pre-commit script to:
>> You can't start a bat script alone, you have to specify cmd.exe instead
>> and pass your bat file on the command line.
>
> Are you sure about that? You can certainly use a bat file as a hook
> script (I do at work) and I'm note sure why one bat would not be able
> to start another.

I didn't say that you can't use a bat script. I only said that you have
to call cmd.exe, not the bat script directly. Bat files are not
executable, only cmd.exe can execute them.

Stefan

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

Received on 2008-02-06 18:21:25 CET

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