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

Re: Typo in skript template

From: Simon Large <simon_at_skirridsystems.co.uk>
Date: 2005-12-30 12:14:46 CET

Thomas wrote:
> In the TortoiseSVN helpfile (4.3) the hook skript for a pre-revprop-change in a
> Windows environment is given as a sample like this:
>
> rem Nur Änderungen an Log-Meldungen zulassen.
> if "%4" == "svn:log" exit 0
> echo Eigenschaft '%4' kann nicht geändert werden >&2
> exit 1
>
> The problem is, that obviously the params numbered on the base of zero, so that
> the correct version is:
>
> rem Nur Änderungen an Log-Meldungen zulassen.
> if "%3" == "svn:log" exit 0
> echo Eigenschaft '%3' kann nicht geändert werden >&2
> exit 1

In Windows, as in *nix, the first param is 1. param 0 is the name of the
program itself. Have you tried a test hook script?

@echo off
echo Param 1 = %1 >&2
echo Param 2 = %2 >&2
echo Param 3 = %3 >&2
echo Param 4 = %4 >&2
exit 1

produces this output:

'pre-revprop-change' hook failed with error output:
Param 1 = C:/Subversion/Test/Repos1
Param 2 = 80
Param 3 = slarge
Param 4 = svn:log

Simon

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Dec 30 12:13:47 2005

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

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