On 09.11.2011 17:09, MarK Kidd wrote:
> Hi,
>
> I'm using TortoiseSVN 1.6.16 and I have tried to create a start
> commit and post commit hook scripts to create a patch file then
> rename it with the post-commit REVISION param
>
> my batch files are follows
>
>
>
> startcommit.bat
>
> REM START COMMIT SCRIPT svn diff<drive:>[path_to_working_copy>
> <drive:>[\file_name.patch]
>
>
>
> postcommit.bat
>
> REM POST COMMIT SCRIPT
>
> mv<drive:>[\file_name.patch] drive:>[\file_name%1.patch]
>
>
>
> :No1 ECHO no revision
>
>
> :End
>
>
>
> my hooks are set up as follows
>
>
>
> Hook type: Start Commit Hook
>
>
>
> Working Copy Path:
>
> <drive:>[\path_to_working_copy]
>
>
>
> Command Line to execute:
>
> "<drive:>\startcommit.bat"
>
>
>
>
>
> Hook type: Post-Commit Hook
>
>
>
> Working Copy Path:
>
> <drive:>[\path_to_working_copy]
>
>
>
> Command Line to execute:
>
> "<drive:>\postcommit.bat"
>
>
>
> Start works find but I can't get the parameters from hook.
>
>
>
> Where am I going wrong
>
>
>
> I have tried
>
> Command Line to execute:
>
> "<drive:>\postcommit.bat" REVISION
>
>
>
> Command Line to execute:
>
> "<drive:>\postcommit.bat" "%REVISION%"
As you can see in the docs:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks
the parameters are passed unconditionally in a fixed order.
for the post commit hook, the REVISION is the fourth parameter passed to
your script. Which means you have to refer to it as '%4' in your script,
not %1.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2876658
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-11-09 20:02:43 CET