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

Re: post-commit hook does not show message at client

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 2 Apr 2009 14:21:32 -0400

Hooks don't display STDOUT. They display STDERR, but only if the hook
itself fails.

Remember that the hook executes on the server side and not the client
side, so there is no way to show the output to the client unless the
hook script is able to directly talk to the client side.

Almost all of the server-side hook executing CM systems I know don't
send anything back to the client until after the hook script has
executed, and then only upon failure. So, Subversion isn't unusual in
this effort.

Since this is a post-commit hook, you could purposely fail the hook
(the commit has already taken place anyway), and that will get the
message back to the client.

Another is to use IM, SMS, or Twitter to notify the client which is
becoming more and more popular with many software companies.

On Thu, Apr 2, 2009 at 1:25 PM, Timo Einsiedler-Burger <solomac_at_gmx.de> wrote:
> Hello,
>
> please can someone help me out on this one! I have spent hours of searching but did not turn up with anything useful, so far.
>
> My hook code:
> #!/bin/sh
>
> REPOS="$1"
> REV="$2"
>
> /usr/bin/svnlook changed -r $REV $REPOS 2>&1 | tee -a /tmp/svntest.log
> echo "POST_COMMIT_HOOK - path: $REPOS, revision: $REV" 2>&1 | tee -a /tmp/svntest.log
>
> Everything works fine ... hook gets executed and log file written. When i call it directly on the server i do get the log output on my prompt. However i do not get the log output displayed on my client from which i execute the commit. This is a problem, because i want to notify the user! I know i could use email for that as well, but i want direct notification upon committing.
>
> My clients use commandline (from linux box) and connect via svn+ssh (could this be a problem???).
> As far as i understand the output should get displayed at the client.
>
> Thanks and take care!!!
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1521513
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
>

-- 
David Weintraub
qazwart_at_gmail.com
All attachments have been scanned for viruses and have been found to
be virus free. So,  just go ahead and open them. Go ahead... Just
click on it... Trust me.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1522326
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-02 20:22:43 CEST

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.