You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by tom fogal <tf...@alumni.unh.edu> on 2008/01/14 20:19:00 UTC

commit warnings?

(Please cc me on replies -- I am not subscribed.)

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@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)?

  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.

Thanks,

-tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: commit warnings?

Posted by Ryan Schmidt <su...@ryandesign.com>.
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@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: commit warnings?

Posted by Sohail Somani <so...@taggedtype.net>.
On Mon, 14 Jan 2008 15:19:00 -0500, tom fogal wrote:

> (Please cc me on replies -- I am not subscribed.)
> 
> 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:

Just send an email after to the project lead and the person who committed 
the change.

-- 
Sohail Somani
http://uint32t.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org