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).

~$ mkdir svnscratch
~$ cd svnscratch/
~/svnscratch$ svn --version | head -n1
svn, version 1.6.8 (dev build)
~/svnscratch$ svnadmin create repo
~/svnscratch$ cat >repo/hooks/post-commit
#! /bin/bash
sleep 30 
~/svnscratch$ chmod a+x repo/hooks/post-commit
~/svnscratch$ time repo/hooks/post-commit

real    0m30.004s
user    0m0.000s
sys     0m0.008s
~/svnscratch$ time svn mkdir -m "Test" file://`pwd`/repo/trunk

Committed revision 1.

real    0m30.030s
user    0m0.008s
sys     0m0.008s
~/svnscratch$ time ( svn mkdir -m "Test" file://`pwd`/repo/branches &
svn mkdir -m "Test" file://`pwd`/repo/tags )

Committed revision 2.
Committed revision 3.

real    0m30.069s
user    0m0.004s
sys     0m0.020s
~/svnscratch$ 


Kind regards,

Jon


**********************************************************************
This email and its attachments may be confidential and are intended solely for 
the use of the individual to whom it is addressed. Any views or opinions 
expressed are solely those of the author and do not necessarily represent those 
of Cabot Communications Ltd.

If you are not the intended recipient of this email and its attachments, you 
must take no action based upon them, nor must you copy or show them to anyone.

Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232

Co. Registered in England number 02817269

Please contact the sender if you believe you have received this email in error.

**********************************************************************


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

Reply via email to