Hi list,

I currently can't get the stderr output of the post-commit hook script back to the client.

The goal of this part of this post-commit hook script is to update a specific working copy when someone commit on a particular folder, and the commiter to verify the version of this working copy.

Everything works fine except that the client (Tortoise) doesn't display the version of the working copy.

To display the new version of the working copy, I've done a nasty hack to redirect the stdout to stderr so svn should marshalled back the message to the client as described in the documentation : "If the post-commit hook returns a nonzero exit status, the commit will not be aborted since it has already completed. However, anything that the hook printed to stderr will be marshalled back to the client, making it easier to diagnose hook failures."

This is the interesting part of my script :
"
#!/bin/sh
[...]
/usr/bin/grep revision -f $1/hooks/revision 1>&2
exit 1
"

When I add 2>test before 1>&2, it works, so stdout is correctly redirected to stderr. The exit 1 should correctly send a nonzero exit status.
So, I don't know what's wrong.

If someone can help this will be great. :)


--
Bastien Semene
Administrateur Réseau & Système

ad...@cyanide-studio.com
+33 (0)1 47 86 30 80

Cyanide S.A.
5, Boulevard des Bouvets
92000 Nanterre - FRANCE

Reply via email to