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

Re: Custom message for svn on success full commit

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 3 Aug 2012 16:07:16 +0200

On Fri, Aug 03, 2012 at 07:25:00PM +0530, yerra babji wrote:
> Hi,
>
> I would like to show some custom message which I get from svn pre-commit
> hook to users on successful check in.
>
> I am able to show custom message when pre-commit gets failed. But unable to
> redirect the message when pre-commit succeeded
>
> Could you please suggest me the way to display my custom message
> on successful pre-commit hook return
>
> Thanks,
> Babji

There is no nice way to do this, sorry. Any output from the pre-commit
hook is discarded if no error occurs.

Usually notifications are sent from the post-commit hook not to the
SVN client but to some other channel, such as a mailing list, a website,
a feed, etc. For that purpose you might want to take a look at
svnpubsub, see http://www.apache.org/dev/cms.html#svnpubsub and
http://svn.apache.org/repos/asf/subversion/trunk/tools/server-side/svnpubsub/

If you really want the SVN client to display a custom message after every
commit, as a crude workaround you could print the desired output to stderr
from the post-commit hook and always exit 1 from the post-commit hook.
But to the user this will always look like an error at first sight.
Received on 2012-08-03 16:07:54 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.