Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

SVN post-commit hook on mac

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


mail_4brad at yahoo

Sep 8, 2009, 10:09 PM

Post #1 of 4 (381 views)
Permalink
SVN post-commit hook on mac

Hi all

I've seen this problem mentioned a number of places, but nothing I've
tried has managed to get it running yet. Once I work it out I'd like to
add it to the OS X install page for trac on the main wiki.

After changing permissions and path to python in the script, plus
ensuring I have the latest trac-post-commit-hook script, it still
doesn't work when I commit.

'env - ./post-commit /svn/test 7' doesn't give any error messages.
Should I expect any other outcome from running this?

I'm running 11.5

Thanks
Brad


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


mail_4brad at yahoo

Sep 15, 2009, 2:33 PM

Post #2 of 4 (331 views)
Permalink
Re: SVN post-commit hook on mac [In reply to]

Here is my post-commit-hook:

{{{
#!/bin/bash

REPOS="$1"
REV="$2"
TRAC_ENV="/usr/local/trac/AirportBill"

/usr/bin/sudo -u brad /sw/bin/python2.5
/usr/local/bin/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV"
}}}

and I have the latest trac-post-commit-hook for version 11.

I forgot to mention that the current failure is *silent* - I get no
error messages (since fixing paths and perms) - just that my tickets are
never updated :(




Brad Milne wrote:
> Hi all
>
> I've seen this problem mentioned a number of places, but nothing I've
> tried has managed to get it running yet. Once I work it out I'd like to
> add it to the OS X install page for trac on the main wiki.
>
> After changing permissions and path to python in the script, plus
> ensuring I have the latest trac-post-commit-hook script, it still
> doesn't work when I commit.
>
> 'env - ./post-commit /svn/test 7' doesn't give any error messages.
> Should I expect any other outcome from running this?
>
> I'm running 11.5
>
> Thanks
> Brad
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


yoheeb at gmail

Sep 15, 2009, 3:02 PM

Post #3 of 4 (326 views)
Permalink
Re: SVN post-commit hook on mac [In reply to]

On Sep 15, 4:33 pm, Brad Milne <mail_4b...@yahoo.co.uk> wrote:
> Here is my post-commit-hook:
>
> {{{
> #!/bin/bash
>
> REPOS="$1"
> REV="$2"
> TRAC_ENV="/usr/local/trac/AirportBill"
>
> /usr/bin/sudo -u brad /sw/bin/python2.5
> /usr/local/bin/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV"
>
> }}}
>
> and I have the latest trac-post-commit-hook for version 11.
>
> I forgot to mention that the current failure is *silent* - I get no
> error messages (since fixing paths and perms) - just that my tickets are
> never updated :(
>
> Brad Milne wrote:
> > Hi all
>
> > I've seen this problem mentioned a number of places, but nothing I've
> > tried has managed to get it running yet. Once I work it out I'd like to
> > add it to the OS X install page for trac on the main wiki.
>
> > After changing permissions and path to python in the script, plus
> > ensuring I have the latest trac-post-commit-hook script, it still
> > doesn't work when I commit.
>
> > 'env - ./post-commit /svn/test 7' doesn't give any error messages.
> > Should I expect any other outcome from running this?
>
> > I'm running 11.5
>
> > Thanks
> > Brad

Just out of curiosity....


shouldn't the part or the shell call that reads "/usr/local/bin/trac-
post-commit-hook"
read "/usr/local/bin/trac-post-commit-hook.py" ?

While technically not required, unless you explicitly changed the file
name to exclude the extension in download or copy.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


mail_4brad at yahoo

Sep 15, 2009, 6:31 PM

Post #4 of 4 (328 views)
Permalink
Re: SVN post-commit hook on mac [In reply to]

Doh! Fixed it myself thanks. Turns out I was running the 'env -...' command as the privileged user as not as the correct svn user (www). Once I ran it as www (prefixing sudo -u www) I got error messages about permissions and could quickly fix the problem. I made a minor update to the TracFAQ.

Cheers anyway



On 16/9/09 9:33 AM, Brad Milne wrote:
Here is my post-commit-hook: {{{ #!/bin/bash REPOS="$1" REV="$2" TRAC_ENV="/usr/local/trac/AirportBill" /usr/bin/sudo -u brad /sw/bin/python2.5 /usr/local/bin/trac-post-commit-hook -p "$TRAC_ENV" -r "$REV" }}} and I have the latest trac-post-commit-hook for version 11. I forgot to mention that the current failure is *silent* - I get no error messages (since fixing paths and perms) - just that my tickets are never updated :( Brad Milne wrote:
Hi all I've seen this problem mentioned a number of places, but nothing I've tried has managed to get it running yet. Once I work it out I'd like to add it to the OS X install page for trac on the main wiki. After changing permissions and path to python in the script, plus ensuring I have the latest trac-post-commit-hook script, it still doesn't work when I commit. 'env - ./post-commit /svn/test 7' doesn't give any error messages. Should I expect any other outcome from running this? I'm running 11.5 Thanks Brad

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.