You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Michael Schmitt <sc...@TI.Uni-Trier.DE> on 2003/06/05 07:23:48 UTC
What happens after hook "post-commit"
Hello,
I have added a few echo statements in hook "post-commit" that print some
messages on the console. Surprisingly, it takes another 1 to 2 seconds
until svn prints the final "Committed revision XXX.".
What happens in between? (I notice some hard disk activity.) Is svn
lying and "post-commit" is not really the last action of a "commit"?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: What happens after hook "post-commit"
Posted by Ben Collins-Sussman <su...@collab.net>.
Michael Schmitt <sc...@TI.Uni-Trier.DE> writes:
> Ben Collins-Sussman wrote:
>
> >The commit finishes in the repository, creating revision XXX. Then,
> >if a post-commit hook exists, the program is fork()ed and passed the
> >newly created revision number.
> >
> >The new 1-2 second delay you're seeing is probably the time it takes
> >to fork() a child process and wait for the child process to die. If
> >you don't want the parent process to wait for everything in your hook
> >script to return, try backgrounding (&) the commands in the script.
> >
> Actually, the delay can be up to 5 seconds in some cases! Too much for
> a simple fork command check. Moreover, these 5 seconds are counted
> from the last command of the post-commit hook.
So if you completely remove the post-commit hook, do you still see the
delay?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: What happens after hook "post-commit"
Posted by Michael Schmitt <sc...@TI.Uni-Trier.DE>.
Ben Collins-Sussman wrote:
>The commit finishes in the repository, creating revision XXX. Then,
>if a post-commit hook exists, the program is fork()ed and passed the
>newly created revision number.
>
>The new 1-2 second delay you're seeing is probably the time it takes
>to fork() a child process and wait for the child process to die. If
>you don't want the parent process to wait for everything in your hook
>script to return, try backgrounding (&) the commands in the script.
>
Actually, the delay can be up to 5 seconds in some cases! Too much for a
simple fork command check. Moreover, these 5 seconds are counted from
the last command of the post-commit hook.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: What happens after hook "post-commit"
Posted by Ben Collins-Sussman <su...@collab.net>.
Michael Schmitt <sc...@TI.Uni-Trier.DE> writes:
> Hello,
>
> I have added a few echo statements in hook "post-commit" that print
> some messages on the console. Surprisingly, it takes another 1 to 2
> seconds until svn prints the final "Committed revision XXX.".
>
> What happens in between? (I notice some hard disk activity.) Is svn
> lying and "post-commit" is not really the last action of a "commit"?
The commit finishes in the repository, creating revision XXX. Then,
if a post-commit hook exists, the program is fork()ed and passed the
newly created revision number.
The new 1-2 second delay you're seeing is probably the time it takes
to fork() a child process and wait for the child process to die. If
you don't want the parent process to wait for everything in your hook
script to return, try backgrounding (&) the commands in the script.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: What happens after hook "post-commit"
Posted by Robert Pluim <rp...@bigfoot.com>.
Michael Schmitt writes:
> Hello,
>
> I have added a few echo statements in hook "post-commit" that print some
> messages on the console. Surprisingly, it takes another 1 to 2 seconds
> until svn prints the final "Committed revision XXX.".
>
> What happens in between? (I notice some hard disk activity.) Is svn
> lying and "post-commit" is not really the last action of a "commit"?
That's svn fixing up your working copy so that it matches the
repository.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org