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

Re: Commit script to check what OS and/or version the svn client was running??

From: Ryan Schmidt <subversion-2009a_at_ryandesign.com>
Date: Sat, 18 Apr 2009 03:21:43 -0500

On Apr 17, 2009, at 01:28, ACHANDRA wrote:

> prakash tiwary wrote:
>
>> You can do using pre-commit hooks. You can warn or reject the
>> commit easily. This will be independent of any OS.
>
> How do I use pre-commit hooks to warn with user prompt? Even
> without interactive prompt, I noticed that you can’t warn unless
> the script dies out completely.

As has been said, you can't prompt the user for anything, and you can
only show the user a message if you print it to stderr (not stdout)
and exit from the hook with a non-zero exit code. If you do this in
the pre-commit hook it will abort the commit. However it has been
recently pointed out on the list that you *can* do this in a post-
commit hook, since there is no consequence at all for failing from
the post-commit hook. The user will see your message, and the commit
will have succeeded. So you could consider alerting the user about
their missing bugtraq properties in the post-commit hook.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1786808

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-04-18 12:22:38 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.