I coopied the script to the hooks folder:

/home/svn/myproject/hooks/svn_hooks.py

pre-commit:
#!/bin/sh
REPOS="$1"
TXN="$2"
# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
PYTHON_EGG_CACHE=/var/cache/python
TRAC_ENV="/home/trac/travelstart"
LOG=`$SVNLOOK log -t "$TXN" "$REPOS"`
PYTHONPATH=$PYTHONPATH:/home/svn/travelstart/hooks
/usr/share/subversion/hook-scripts/agilo_svn_hook_commit.py -s pre -e
"$TRAC_ENV" "$LOG" || exit 1

My post-commit:
REPOS="$1"
REV="$2"
TRAC_ENV="/home/trac"
PYTHONPATH=$PYTHONPATH:/home/svn/travelstart/hooks
/usr/share/subversion/hook-scripts/agilo_svn_hook_commit.py -s post -e
"$TRAC_ENV" -r "$REV" || exit 1

Permissions:
-rwxr-xr-x 1 root root 2747 2009-09-04 12:00 /usr/share/subversion/
hook-scripts/agilo_svn_hook_commit.py

-rwxr-xr-x 1 svn svn 269 2009-09-10 14:41 /home/svn/myproject/hooks/
post-commit
-rwxr-xr-x 1 svn svn 367 2009-09-10 14:41 /home/svn/myproject/hooks/
pre-commit

-rwxr-xr-x 1 root root 12348 2009-09-10 14:40 /home/svn/myproject/
hooks/svn_hooks.py

But still:

  File "/usr/share/subversion/hook-scripts/agilo_svn_hook_commit.py",
line 21, in ?
    from agilo.utils.svn_hooks import AgiloSVNPreCommit,
AgiloSVNPostCommit
ImportError: No module named agilo.utils.svn_hooks

On Sep 9, 3:20 pm, Andrea Tomasini <[email protected]>
wrote:
> On 9 Sep, 2009, at 9:52 , mattias berge wrote:
>
> Hi Mattias,
>
>
>
> > I have the egg in my project, but I only have the svn_hooks.py in
> > roots homedir where I originally downloaded agilo
>
> > # ls /home/trac/myproject/.egg-cache/agilo-0.7.4.1_r1624_20090611-
> > py2.4.egg-tmp/agilo/
> > htdocs     templates
>
> > # locate svn_hooks.py
> > /root/agilo-0.7.4.1_r1624_20090611-py2.4.egg/agilo/utils/svn_hooks.py
> > /root/agilo-0.7.4.1_r1624_20090611-py2.4.egg/agilo/utils/svn_hooks.pyc
> > /root/agilo/utils/svn_hooks.py
> > /root/agilo/utils/svn_hooks.pyc
>
> > Setting PYTHONPATH to either of "/root/agilo-0.7.4.1_r1624_20090611-
> > py2.4.egg" "/root/agilo-0.7.4.1_r1624_20090611-py2.4.egg/agilo" didnt
> > work.
>
> Where did you put that PYTHONPATH? It has to be in the hook script,  
> that you will put in the hooks folder of the SVN repository. It must  
> be readable from the user that will activate the hook, so if you have  
> SVN running from Apache, that the apache user has to be able to see  
> that, as well as seeing Agilo. You normally have to make sure that the  
> script is found, so what I do, I usually copy it in the hooks  
> directory, or the new installation through the Pro, should put it in  
> the path (/usr/local/bin). The script you need should be in the  
> scripts folder... you can find it 
> here:http://www.agile42.com/cms/download/agilo_svn_hook_commit.py
>
> > Agilo is fully working in every aspect apart from the svn_hooks. Am I
> > missing something obvious?
>
> HTH
> Best
> ANdreaT
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Agilo for Scrum" group. This group is moderated by agile42 GmbH 
http://www.agile42.com and is focused in supporting Agilo for Scrum users.
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/agilo?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to