I'm not sure that I have understand your mail correctly.
I can'tt find the error in your explanation, but here is the short
description how i did it on my server, and it works fine.
3 small steps:
1. create file $SVN/hooks/post-commit. Here is the example:
{{{
bessara...@server:/var/svn/test/hooks$ cat post-commit
#!/bin/sh
REPOS="$1"
REV="$2"
TRAC_ENV="/var/trac/test"
/usr/bin/python /usr/local/src/trac/contrib/trac-post-commit-hook \
-p "$TRAC_ENV" -r "$REV"
}}}
2. setting up the correct rights on $SVN/hooks/post-commit :
{{{
$ sudo chmod 755 /var/svn/test/hooks/post-commit
}}}
3. getting the script:
{{{
bessara...@server:/usr/local/src/trac/contrib$ sudo wget
http://trac.edgewall.org/export/7864/trunk/contrib/trac-post-commit-hook
}}}
After that "svn commit -m 'test für post commit, refs #110'" should work fine.
Hope my message will help you.
PS I'm using this 2 commands mostly:
* svn commit -m "Started working with ticket. See #110."
* svn commit -m "Creted the acess system. Closes #110."
2009/7/24 sunny063 <[email protected]>:
>
> Hi all,
>
> I tried to setup a psot-commit hook, so I used the trac-post-commit-
> hook.py (which I found here:
> http://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hook?rev=8369)
> and moved it to "/trac/project/contrib".
>
> Furthermore I integrated this hook in the svn repository:
>>>
> export LD_LIBRARY_PATH=/usr/lib
> export PYTHONPATH=/usr/lib/python2.4
> SVNLOOK=/usr/bin/svnlook
>
> REPOS="$1"
> REV="$2"
> LOG=`$SVNLOOK log -r "$REV" "$REPOS"`
> AUTHOR=`$SVNLOOK author -r "$REV" "$REPOS"`
> TRAC_ENV='/trac/project'
>
> /trac/project/contrib/trac-post-commit-hook.py \
> -p "$TRAC_ENV" \
> -r "$REV" \
> -u "$AUTHOR" \
> -m "$LOG"
> <<
>
> If I try to commit something an refer a ticket, like:
> svn commit -m 'test für post commit, refs #110'
> I end up with a warning:
> 'post-commit' hook failed with error output:
>
> The output is actually empty. The delivered trac-post-commit-hook.py
> is set being executable, so I do not what's wrong with that...
>
> Any help would be appreciated. Thanks!
>
>
>
> >
>
--
bessarabov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---