> -----Ursprüngliche Nachricht-----
> Von: Hunkel, Manfred [mailto:M.Hunkel@t-systems.com]
> Gesendet: Mittwoch, 12. Juli 2006 11:13
> An: Annick.Collet@eumetsat.int
> Cc: users@subversion.tigris.org
> Betreff: Re: AW: echo in post-commit hook
>
>
>
> | -----Ursprüngliche Nachricht-----
> | Von: Greg Thomas [mailto:thomasgd@omc.bt.co.uk]
> | Gesendet: Mittwoch, 12. Juli 2006 10:31
> | An: Annick Collet
> | Cc: Felix Gilcher; users@subversion.tigris.org
> | Betreff: Re: AW: echo in post-commit hook
> |
> |
> | On Wed, 12 Jul 2006 10:17:13 +0200, "Annick Collet"
> | <Annick.Collet@eumetsat.int> wrote:
> |
> | >> -----Ursprüngliche Nachricht-----
> | >> Von: Annick Collet [mailto:Annick.Collet@eumetsat.int]
> | >> Gesendet: Mittwoch, 12. Juli 2006 09:58
> | >> An: users@subversion.tigris.org
> | >> Betreff: echo in post-commit hook
> | >>
> | >> I would like a msg to be sent to users under certain condition.
> | >> In post-commit hook:
> | ...
> | >> echo 1>&2 'message'
> | >> Unfortunately the msg is not displayed . Any idea why ?
> | >
> | >That's pretty dead simple: Because by design, post commit
> | hooks can't output
> | >anything to the user.
> | ...
> | >this is strange because in the pre-commit I manage to check
> | the pattern of some /tags folder
> | > and if pattern is wring ( with egrep) then I send an error
> | to the users on the screen using echo 1>&2 !
> | >
> | >so what is different
> |
> | What is different is that pre-commit hooks are designed to output
> | error messages to the user. post-commit hooks (which can finish long
> | after the control has been returned to the user by the
> client) are not
> | designed to output error messages to the user.
> |
>
> To add my 2 cents worth: I have a post-commit hook which does return
> a message to the user in case it fails. I think this has
> been discussed.
> The way I understand this is: When the hook script writes to
> stderr, this
> message will only be picked up and displayed by the client if
> the script
> exits with a non-zero return code, i.e. it fails. If it
> doesn't fail (that's how
> I understand Annick's question) and you still want to send a
> message by
> writing to stderr, this message will be silently discarded by
> the client.
>
well, the important this is that *pre*-commit hooks are designed to return an error message in case it fails. *post*-commit hooks are designed in a way that does currently not allow to send any messages to the client, neither in success nor in the failure case. The only way out is choosing a different communication channel such as mail.
> Hope this helps.
>
> ;-) -Manfred
>
> ---------------------------------------
>
> Ooooops.... Sorry, folks! The above is partly rubbish. I do this in
> a pre-commit hook. Still, my remarks regarding return codes and
> writing to stderr apply!
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
felix
--
Felix Gilcher
Head of IT Development
Exozet Berlin GmbH
Rotherstraße 20
10245 Berlin
eMail: gilcher@exozet.com
URL: www.exozet.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jul 12 11:52:13 2006