1

I created a post-commit hook which inform the user of some others information. I put in my code:

REPOS="$1"
REV="$2"
TXN_NAME="$3"
SVNSYNC='/opt/collabnet/csvn/bin/svnsync';
echo "my message" >&0;
echo "Your commit has been performed successfully." 1>&2;
exit 1;

Could you please told me why for these messages we can display it only if I put "exit 1"?

Is there any other way to do it?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Hatim
  • 1,116
  • 1
  • 8
  • 14

1 Answers1

2

The Subversion server is designed such that the only user-visible messages that are sent back are error conditions (anything written to STDERR, usually).

A successful commit is communicated back to the client, and the client can then display a nicer message if the developer choses to do so.

Any non-error messages that need to be communicated to the client from the server need to be done via other means; email, RSS feed, a bot talking to IM or an IRC channel, etc.

alroc
  • 27,574
  • 6
  • 51
  • 97
  • Thank you alroc, so finally is not possible to communicate it in the console – Hatim Oct 13 '14 at 13:18
  • Correct. Anything you send back to the client via hook will make the client think the commit failed. – alroc Oct 13 '14 at 13:33