0

I'm trying to write a post-commit hook for a VisualSVN server on MSWindows, that immediately after the commit updates the server's project. On the server side: when I'm commiting a revision the svn up command cannot be executed in the hook. On the client side I get the message Transmiting file data. and no further messages.

post-commit hook:

call C:\batch\_something_.cmd
call svn up D:\path\to\local\project       <--- it's freezing here

Thank You!

bahrep
  • 29,961
  • 12
  • 103
  • 150
Mihai238
  • 1,087
  • 13
  • 26
  • 1
    Updating a working copy should not be automatized. Consider what should the code do in the case of merge conflicts. Proper way is to send a notification to anyone who is interested in immediate updates, so that they can do the updates when they are ready. – Dialecticus Jan 31 '14 at 13:08
  • @Dialecticus I guess he wants to update a WC with a website or something like this (e.g. for testing). – bahrep Jan 31 '14 at 13:09
  • 1
    @bahrep that's even worse. SVN is not meant to be used as deployment tool. Use a proper deployment tool instead. – Dialecticus Jan 31 '14 at 13:10
  • @Dialecticus I can partially agree, but it still works for testing of small project locally. – bahrep Jan 31 '14 at 13:12

2 Answers2

0

No need to use call here. Remove it!

Use

"C:\batch\_something_.cmd"
"<path-to-svn.exe>" update D:\path\to\local\project
exit 0
bahrep
  • 29,961
  • 12
  • 103
  • 150
0

Goto the visualsvn server -> select the repository -> properties-> Hooks ->Post commit hook

pushd D:\path\to\local\project
svn update --trust-server-cert --non-interactive --username *** --password *** --no-auth-cache

Did you try to execute it manually and check what happened? Sometimes it might be due to the client certificate error.

Sweety Bertilla
  • 972
  • 10
  • 35