On Fri, Jan 15, 2010 at 12:08 PM, Jon Foster <jon.fos...@cabot.co.uk> wrote: > Hi, > > Ryan Schmidt wrote: >> But Subversion blocks the commit until the post-commit is done. > > That particular SVN client will be blocked. But if you have > two users committing at the same time, or if a user runs "svn" > twice in parallel, then the post-commit hook will be run in > parallel. > > Here's how I tested this. I created a new repository with > a post-commit hook that takes 30 seconds to run. I then > checked that it works, and that a normal commit took 30 > seconds. I then did two commits in parallel, and that took > 30 seconds. This shows that the post-commit hook is > running in parallel - if it had been run in series, then > it would have taken 60 seconds for 2 commits. (I also > checked the output of "ps" and observed the two > "post-commit" processes running).
Also, I'm pretty sure that, while the post-commit hook is running for a particular commit, the commit itself is already visible to other users. So, as you would expect from the name "*post*-commit hook", the commit itself is already finalized before the post-commit hook starts running. Otherwise, people wouldn't be able to do things like automatically updating a working copy on the server, from within their post-commit hook. The only thing that has to wait on the post-commit hook is that particular svn client that's running the commit (as Jon pointed out). Regards, Johan