Pre/Post commit hooks do not write to STDERR

6 views
Skip to first unread message

Lior K

unread,
Dec 13, 2009, 4:24:18 AM12/13/09
to Agilo for Scrum
Hello,
We recently installed Agilo for Scrum on our Gentoo server. We set up
the pre and post commit hooks for svn, but when we try to perform
commit operations from Eclipse, we only the exit code and not the
error message.
It seems that the script 'swallows' the stderr stream when run from
within the commit hook.
we tried echoing text to stderr (echo 'text' 1>&2), and running the
python script from the shell, and they both work.
The problem only occurs when calling the agilo script from within the
svn hook.
As I mentioned, we use Eclipse to perform our commits.

This is the snippet of pre-commit hook that we use:

------- pre-commit hook snippet ----

# call AGILO commit hook
PYTHON_EGG_CACHE=/var/cache/python
TRAC_ENV=/var/trac/env/mySvn
LOG=`$SVNLOOK log -t "$TXN" "$REPOS"`
/usr/bin/agilo_svn_hook_commit.py -s pre -e "$TRAC_ENV" -l "$LOG" &&
exit 1

----- end of snippet --------

Andrea Tomasini

unread,
Dec 13, 2009, 3:55:55 PM12/13/09
to ag...@googlegroups.com
On 13 Dec, 2009, at 10:24 , Lior K wrote:

> Hello,
Hi Lior,

> We recently installed Agilo for Scrum on our Gentoo server. We set up
> the pre and post commit hooks for svn, but when we try to perform
> commit operations from Eclipse, we only the exit code and not the
> error message.
> It seems that the script 'swallows' the stderr stream when run from
> within the commit hook.
> we tried echoing text to stderr (echo 'text' 1>&2), and running the
> python script from the shell, and they both work.
> The problem only occurs when calling the agilo script from within the
> svn hook.
> As I mentioned, we use Eclipse to perform our commits.
It might well be a Gentoo thing, as with Debian works fine. I guess you might check that the SVN user has the right to use STDERR and STDOUT, you could try running the Script with sudo -u <svn_user> -H (that would set the same Home env as when running from SVN) it always help me to debug this issues.

HTH
ANdreaT
Reply all
Reply to author
Forward
0 new messages