1

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!

bahrep
  • 29,961
  • 12
  • 103
  • 150
user1682793
  • 33
  • 1
  • 4

1 Answers1

1

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
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110