[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn behavior when the 'post-commit' hook fails

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 26 Feb 2009 11:27:56 -0500

Are you printing anything to STDERR? If not, add a few "print STDERR
..." statements to your post-commit trigger. Subversion will only
output STDERR when the hook fails and never outputs STDOUT. When the
hook fails, at least you have some information as to what is going on
with your program.

I put the string "DEBUG:" in front of the stuff where I am simply
printing out debugging information, so developers can tell the
difference between that and the error message I am sending them.

Put at least one line near the beginning of your hook to simply
announce that you are executing the hook script. That way, you know
that the hook script actually executed, and it didn't exit before it
got to a place where it printed something to STDERR.

If you've determined that your hook script isn't even running, you
need to check whether or not you're actually calling it from the
post-commit shell script or post-commit batch file.

On Thu, Feb 26, 2009 at 7:09 AM, Vincent Lefevre <vincent+svn_at_vinc17.org> wrote:
> After a commit (svn client 1.5.x, svn server 1.4.x IIRC), I got:
>
> ------------------------------------------------------------------
> Sending        www/index.html
> Transmitting file data .
> Committed revision 5987.
>
> Warning: 'post-commit' hook failed with error output:
>
> ------------------------------------------------------------------
>
> but no error output (except a blank line, which may have been added
> by svn). I wonder why such a blank line only. A possible reason is
> that the hook process has been killed by the system, but Subversion
> doesn't say anything about that. Could Subversion output the exit
> status in addition to the possible error message (as this would give
> such information)?
>
> Note: the 'post-commit' hook just executes
>
>  /usr/lib/subversion/hook-scripts/commit-email.pl ...
>
> and this is the first time I have such an error.
>
> --
> Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
>
>

-- 
--
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1233696
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-26 17:28:49 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.