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

Re: commit warnings?

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: Mon, 14 Jan 2008 19:10:06 -0600

On Jan 14, 2008, at 14:19, tom fogal wrote:

> Hi all, on a project I'm working on we'd like to have the ability to
> `warn on commit'. For example, something like this:
>
> tfogal_at_taku:~/tmp/mycheckout$ svn commit -m "log message\!"
> Adding blah.c
> Sending blah.h
> Transmitting file data ..
> svn: 'pre-commit' hook warns with the following output:
> Warning: the <X> project considers it dangerous to modify 'blah.h'
> in a release branch! I'm letting this through, but please be sure
> you verify this commit against previous releases in the series.
> Committed revision 3.
>
> The use case is that upon branching (say) 1.9.2, changes in a great
> many header files can break compatibility with 1.9.0 or 1.9.1. That
> said, we don't want to error out because it is only a red flag, not a
> hard implication of a problem.
>
> I tried the `expected'/braindead obvious approach, of simply
> echo "some warning" 1>&2
> in a /bin/sh pre-commit hook, but this output goes to the bit-bucket
> unless the script exits with a non-zero error code. This is as
> documented in the subversion red book.
>
> So my questions are:
> Is there another way to achieve the `conditional warn on commit'
> behavior we desire (e.g. we're not married to hook scripts)?

No, sorry, there is no way to do that. stderr output is only seen by
the client if the exit code is nonzero, which will also prevent the
commit.

> Is there a proposal out there to support echoing back hook script
> output to the client, even on success? Can this be considered
> such a
> request if not? <g>
>
>
> Finally, to devs -- thanks for all your work! I'm especially excited
> to see that merge tracking is planned for 1.5.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-15 02:11:18 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.