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

Re: 1.6.10 post-commit client hook fails when only deleting folder

From: <chroyer_at_comcast.net>
Date: Fri, 15 Oct 2010 21:35:25 +0000 (UTC)

----- "Stefan Küng" <tortoisesvn_at_gmail.com> wrote:

Can you give an exact recipe on how to reproduce this? Because I tried
folder deletions and the script worked just fine for me.

I created a cmd file to reproduce the issue. Here is what I have, with some instructions in the comments.
I basically create a repo, add 2 folders, commit with tsvn, delete a folder, then commit again with tsvn. The post commit hook is called twice (after commiting the add, then the delete - but only the first time is successful) .
--------------------------------------------------
REM make sure you have a post-commit hook script setup to run on c:\tsvntestWC
REM my hook script is called c:\hook1.cmd and has the following content: (without
REM the REM of couse...)
REM @ECHO OFF
REM SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
REM ECHO hello > c:\foo.txt
REM EXIT 0

REM now for the scenario...

REM create the repository
svnadmin create --fs-type fsfs c:\tsvntestRepo

REM checkout a WC
svn checkout file:///c:/tsvntestRepo c:\tsvntestWC

REM in the WC, create a folder and a subfolder
cd c:\tsvntestWC
md f1
md f1\f2

REM add and commit the folders
svn add f1
TortoiseProc.exe /command:commit /path:"c:\tsvntestWC" /logmsg:"adding f1 and f1\f2"

REM at this point, check the output of the hook script (in my case, I do
REM have "hello" in c:\foo.txt, so I know the script itself works.

REM delete f2
svn delete c:\tsvntestWC\f1\f2

REM (before this last commit, make sure that the output of the post-commit
REM hook has been deleted - in my case, c:\foo.txt)
REM then we can commit
tsvn commit -m "deleted f2"

TortoiseProc.exe /command:commit /path:"c:\tsvntestWC" /logmsg:"deleted f2"

pause
-----------------------------------------------------
Thanks,
Christophe

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2672436

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-10-15 23:35:38 CEST

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

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