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

Re: Accessing %VERSION% parameter in update hook batch script

From: Simon Large <simon.tortoisesvn_at_googlemail.com>
Date: Thu, 6 Mar 2008 14:06:28 +0000

On 06/03/2008, Jean-Marc van Leerdam <j.m.van.leerdam_at_gmail.com> wrote:
> Hi Paul,
> Please post the command line you've entered in the settings dialog.
> You are supposed to place the %xxx% placeholders in that command line.
> So if you enter
> pre-update.bat 1 2 3 %PATH%
> Then the fourth parameter in the .bat will contain the path.

Correct. The values to be passed are specified on the command line.
The list in the docs shows the values available, not what is actually

But this brings up a very valid point. The subversion server hooks
always pass the parameters on the command line in fixed positions.
Specifying the params in TSVN settings is perhaps more flexible, but
the difference from Subversion hooks will likely cause a lot of

Also, it places the burden of specifying the parameters on the person
who installs the hook. If you want everyone in the organisation to use
a client-side post-update hook, it is easy to add that hook script to
the repository and tell everyone to make sure it is called. But if
they also have to type in the parameters in the correct order it is a
lot more error prone. In this case, subversion's method wins because
all you have to do is install the script and it is up to the script to
know where the params are.

> By the way: there is no way the pre-commit will know the new revision.
> There is no guarantee that the commit will succeed, so no new revision
> number can be known.

He said pre-update, not pre-commit.


  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-03-06 15:32:45 CET

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