开发者

TortoiseSvn: Post-Update Hook Script Error

I've tried numerous ways to get a post-update hook script working through TortoiseSVN, without much success. Apparently a lot of people out there have this issue, but I can't find a solution anywhere.

Platform: Windows XP

Tortoise Version Information: TortoiseSVN 1.6.7, Build 18415 - 32 Bit , 2010/01/22 17:55:06 Subversion 1.6.9, apr 1.3.8 apr-utils 1.3.9 neon 0.29.3 OpenSSL 0.9.8k 25 Mar 2009 zlib 开发者_如何学Python1.2.3

I went to Settings -> Hook Scripts -> Add...

  • Hook Type: Post-Update Hook
  • WC Path: C:\proj1
  • 1.Command Line to Execute: C:\FLASH.bat
  • 2.Command Line to Execute: "C:\FLASH.bat"
  • 3.Command Line to Execute: cmd /c "C:\FLASH.bat"

My FLASH.bat file only contains: exit 0

Those are the three different things I tried -- none worked. Every time I try an update, I get the following error message: "the hook script returned an error"


I had similar problems with TortoiseSVN 1.8.11 always giving "the hook script returned an error", "the system cannot find the file specified". The problem was that the local pre-commit hook (tsvn:precommithook) needs to specify the batch file with an absolute path (1.8 doesn't specify a WC Path; sometimes it is called from the root of the project, other times somewhere deeper), with each backslash \ replaced by slash /.

Of the other options, if you want to "Wait for the script to finish" and not "Hide the script while running", note that the script runs with output redirected somewhere else. If you want to see output from a command in the script, you'll need to redirect that command's output to CON, e.g.

pause >>CON
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜