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.
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.
Also, I believe the syntax of your batch file is wrong. Try 'if exist'
instead of 'if exists'.
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.
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
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
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-06 18:33:07 CET