1
votes

I try to add a post-commit hook to my VisualSVN Server. After a commit i need to checkout the whole project.

I do the following in the commit-hook:

"%VISUALSVN_SERVER%bin\svn.exe" checkout http://Server.local.myServer:82/svn/Project/ D:/Projects/xampp/htdocs/Data/Project/Data --non-interactive --force --username Administrator --password xxx

If i write this in my CMD, it work's very well. But if I commit my project in my client program, I get always the same error:

Warning: post-commit hook failed (exit code 1) with output: svn: E720005: Error resolving case of 'D:\Projects\xampp\htdocs\Data\Project\Data'

What can i do :( ? Thanks for your help!

1
Thanks .. but now another error appears: Warning: post-commit hook failed (exit code 1) with output: svn: E720005: Can't make directory 'C:\Program Files (x86)\VisualSVN Server\Projekt': Zugriff verweigert Now i use: file:///d:/.... - user1682793
Anybody a solution ? :( - user1682793

1 Answers

1
votes

Unconditional checkout in post-commit hook is, in common, Bad Idea:

  • Commit happens for than once
  • Checkout is 1) one-time operation 2) for empty target and will fail (AFAICR) for existing Working Copy as target for checkout

In order to do not overload post-commit hook with logic (but you can implement it "if folder is WC - update, in not - checkout") I'll suggest:

  • Checkout WC by hand
  • in hook perform svn up for WC only