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

Mailing List Archive: Trac: Users

Trac dev and post commit hooks

 

 

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


sam.halliday at gmail

Sep 1, 2012, 4:32 AM

Post #1 of 13 (439 views)
Permalink
Trac dev and post commit hooks

Hi all,

I upgraded from 0.11 to 1.0 (dev) and I noticed that the post-commit hook
for SVN changed quite a bit. I've upgraded my repositories and commits are
communicating with Trac ok.

However, the old script I was using was able to close tickets if I did
things like "fixes #34".

How can I get the "fixes #34" behaviour back again?

Regards, Sam

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/ZZdeAdq_OFIJ.
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.


ryano at physiosonics

Sep 1, 2012, 11:14 AM

Post #2 of 13 (422 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

On Saturday, September 1, 2012 4:32:49 AM UTC-7, Sam Halliday wrote:
>
> Hi all,
>
> I upgraded from 0.11 to 1.0 (dev) and I noticed that the post-commit hook
> for SVN changed quite a bit. I've upgraded my repositories and commits are
> communicating with Trac ok.
>
> However, the old script I was using was able to close tickets if I did
> things like "fixes #34".
>
> How can I get the "fixes #34" behaviour back again?
>
> Regards, Sam
>

Sam, take a look at
http://trac.edgewall.org/wiki/TracRepositoryAdmin#Migration
You'll need to enable: tracopt.ticket.commit_updater.*

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/dCOxchQW6BkJ.
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.


sam.halliday at gmail

Sep 1, 2012, 11:26 AM

Post #3 of 13 (422 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

Thanks RjOllos, I had

tracopt.ticket.commit_updater.committicketupdater = enabled

so maybe that missed the functionality (contrary to the admin plugin docs).

Will respond later when I use this to let you know if it doesn't work.


On Saturday, 1 September 2012 19:14:30 UTC+1, RjOllos wrote:
>
>
> On Saturday, September 1, 2012 4:32:49 AM UTC-7, Sam Halliday wrote:
>>
>> Hi all,
>>
>> I upgraded from 0.11 to 1.0 (dev) and I noticed that the post-commit hook
>> for SVN changed quite a bit. I've upgraded my repositories and commits are
>> communicating with Trac ok.
>>
>> However, the old script I was using was able to close tickets if I did
>> things like "fixes #34".
>>
>> How can I get the "fixes #34" behaviour back again?
>>
>> Regards, Sam
>>
>
> Sam, take a look at
> http://trac.edgewall.org/wiki/TracRepositoryAdmin#Migration
> You'll need to enable: tracopt.ticket.commit_updater.*
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/k8mjMt7_ozEJ.
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.


sam.halliday at gmail

Sep 1, 2012, 12:30 PM

Post #4 of 13 (423 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

Just tried this with a comment "fixes #11" and although it showed up (as a clickable link) in the Trac History, the issue was still OPEN. I had to manually close it.

I have today's pull of Trac dev with post-commit-hook and "tracopt.ticket.commit_updater.* = enabled"

Any other ideas before I - perhaps incorrectly - file this as a bug?

--
Sam

On 1 Sep 2012, at 19:26, Sam Halliday <sam.halliday [at] gmail> wrote:

>
> Thanks RjOllos, I had
>
> tracopt.ticket.commit_updater.committicketupdater = enabled
>
> so maybe that missed the functionality (contrary to the admin plugin docs).
>
> Will respond later when I use this to let you know if it doesn't work.
>
>
> On Saturday, 1 September 2012 19:14:30 UTC+1, RjOllos wrote:
>
> On Saturday, September 1, 2012 4:32:49 AM UTC-7, Sam Halliday wrote:
> Hi all,
>
> I upgraded from 0.11 to 1.0 (dev) and I noticed that the post-commit hook for SVN changed quite a bit. I've upgraded my repositories and commits are communicating with Trac ok.
>
> However, the old script I was using was able to close tickets if I did things like "fixes #34".
>
> How can I get the "fixes #34" behaviour back again?
>
> Regards, Sam
>
> Sam, take a look at http://trac.edgewall.org/wiki/TracRepositoryAdmin#Migration
> You'll need to enable: tracopt.ticket.commit_updater.*
>
> --
> You received this message because you are subscribed to the Google Groups "Trac Users" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/k8mjMt7_ozEJ.
> 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.
Attachments: smime.p7s (4.78 KB)


ryano at physiosonics

Sep 1, 2012, 8:31 PM

Post #5 of 13 (420 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

On Saturday, September 1, 2012 12:31:01 PM UTC-7, Sam Halliday wrote:
>
> Just tried this with a comment "fixes #11" and although it showed up (as a
> clickable link) in the Trac History, the issue was still OPEN. I had to
> manually close it.
>
> I have today's pull of Trac dev with post-commit-hook and
> "tracopt.ticket.commit_updater.* = enabled"
>
> Any other ideas before I - perhaps incorrectly - file this as a bug?
>

It seems like this issue has been reported a number of times on the mailing
list, but I can't recall any specific resolutions at the moment. I'm not
sure how this could matter, but one user said that changing the
configuration fixed the issue:
[components]
tracopt.ticket.commit_updater.* = enabled

->

[components]
tracopt.ticket.commit_updater.committicketreferencemacro = enabled
tracopt.ticket.commit_updater.committicketupdater = enabled

Are you using trac-svn-hook, and have you configured it?:
http://trac.edgewall.org/browser/trunk/contrib/trac-svn-hook?marks=52-54#L48


What are your settings for?:
[ticket]
commit_ticket_update_check_perms
commit_ticket_update_commands.close
commit_ticket_update_commands.refs

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/8n9LX6Sc7vcJ.
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.


sam.halliday at gmail

Sep 2, 2012, 3:10 AM

Post #6 of 13 (416 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

On 2 Sep 2012, at 04:31, RjOllos wrote:
> [components]
> tracopt.ticket.commit_updater.committicketreferencemacro = enabled
> tracopt.ticket.commit_updater.committicketupdater = enabled


OK, done this.


> Are you using trac-svn-hook, and have you configured it?:
> http://trac.edgewall.org/browser/trunk/contrib/trac-svn-hook?marks=52-54#L48

Yeah, it's all linked up. When I push a commit, it is showing up in the "Timeline".


> What are your settings for?:
> [ticket]
> commit_ticket_update_check_perms
> commit_ticket_update_commands.close
> commit_ticket_update_commands.refs

I don't have those settings so I presume I'm falling back to the defaults from http://trac.edgewall.org/wiki/CommitTicketUpdater
Attachments: smime.p7s (4.78 KB)


mark.cooke at siemens

Sep 3, 2012, 12:01 AM

Post #7 of 13 (418 views)
Permalink
RE: Trac dev and post commit hooks [In reply to]

> -----Original Message-----
> From: trac-users [at] googlegroups On Behalf Of Samuel Halliday
> Sent: 02 September 2012 11:11
> To: trac-users [at] googlegroups
> Subject: Re: [Trac] Trac dev and post commit hooks
>
> On 2 Sep 2012, at 04:31, RjOllos wrote:
> > [components]
> > tracopt.ticket.commit_updater.committicketreferencemacro = enabled
> > tracopt.ticket.commit_updater.committicketupdater = enabled
>
>
> OK, done this.
>
>
> > Are you using trac-svn-hook, and have you configured it?:
> >
> http://trac.edgewall.org/browser/trunk/contrib/trac-svn-hook?marks=52-54#L48
>
> Yeah, it's all linked up. When I push a commit, it is showing
> up in the "Timeline".
>
>
> > What are your settings for?:
> > [ticket]
> > commit_ticket_update_check_perms
> > commit_ticket_update_commands.close
> > commit_ticket_update_commands.refs
>
> I don't have those settings so I presume I'm falling back to
> the defaults from http://trac.edgewall.org/wiki/CommitTicketUpdater

Looking at that page appears to confirm my suspicion that you need to set the `envelope` option. Try doing a commit using the log message `[fixes #34]` (using the apparently default `[]` envelope. If that works, just define the envelope option to be empty and you should be back where you want to be...

~ mark c

--
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.


sam.halliday at gmail

Sep 3, 2012, 12:36 PM

Post #8 of 13 (409 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

I added the envelope setting, and tried a "[refs #30]" commit message (also without the square brackets). Again, shows up as a clickable link in timeline but no mention in the ticket itself.

On 3 Sep 2012, at 08:01, "Cooke, Mark" wrote:
>> the defaults from http://trac.edgewall.org/wiki/CommitTicketUpdater
>
> Looking at that page appears to confirm my suspicion that you need to set the `envelope` option. Try doing a commit using the log message `[fixes #34]` (using the apparently default `[]` envelope. If that works, just define the envelope option to be empty and you should be back where you want to be...
Attachments: smime.p7s (4.78 KB)


mark.cooke at siemens

Sep 4, 2012, 12:09 AM

Post #9 of 13 (409 views)
Permalink
RE: Trac dev and post commit hooks [In reply to]

> On 3 Sep 2012, at 08:01, "Cooke, Mark" wrote:
> >> the defaults from http://trac.edgewall.org/wiki/CommitTicketUpdater
> >
> > Looking at that page appears to confirm my suspicion that
> you need to set the `envelope` option. Try doing a commit
> using the log message `[fixes #34]` (using the apparently
> default `[]` envelope. If that works, just define the
> envelope option to be empty and you should be back where you
> want to be...
>
> -----Original Message-----
> From: trac-users [at] googlegroups On Behalf Of Samuel Halliday
> Sent: 03 September 2012 20:37
> To: trac-users [at] googlegroups
> Subject: Re: [Trac] Trac dev and post commit hooks
>
> I added the envelope setting, and tried a "[refs #30]" commit
> message (also without the square brackets). Again, shows up
> as a clickable link in timeline but no mention in the ticket itself.
>
...you removed most of the historical context to this email? I use email and don't store old messages, so I don't have the old info on your config so far.

I think I would suggest that you (a) set _all_ the options referenced in the www help page (link above) rather than rely on the defaults, (b) restart your server to make sure they're used, (c) try it again and (d) if it still doesn't work, show us the config and commit message you used and say what did and didn't happen.

For your ref, here are my settings (but note that I don't use `close` from commit as we have a separate testing phase in our workflow):-

[components]
tracopt.ticket.commit_updater.* = enabled

[ticket]
commit_ticket_update_envelope =
#commit_ticket_update_commands.close =
commit_ticket_update_commands.refs = <ALL>
commit_ticket_update_check_perms = true
commit_ticket_update_notify = true

....this should add a ref for any `#<number>` bit of text to ticket <number>, checking that the commiter has rights to update the ticket (do your svn and trac usernames match?).

~ mark c

--
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.


sam.halliday at gmail

Sep 5, 2012, 12:21 PM

Post #10 of 13 (387 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

Added all settings, still not updating the ticket :-(

--
Sam

On 4 Sep 2012, at 08:09, "Cooke, Mark" <mark.cooke [at] siemens> wrote:

>> On 3 Sep 2012, at 08:01, "Cooke, Mark" wrote:
>>>> the defaults from http://trac.edgewall.org/wiki/CommitTicketUpdater
>>>
>>> Looking at that page appears to confirm my suspicion that
>> you need to set the `envelope` option. Try doing a commit
>> using the log message `[fixes #34]` (using the apparently
>> default `[]` envelope. If that works, just define the
>> envelope option to be empty and you should be back where you
>> want to be...
>>
>> -----Original Message-----
>> From: trac-users [at] googlegroups On Behalf Of Samuel Halliday
>> Sent: 03 September 2012 20:37
>> To: trac-users [at] googlegroups
>> Subject: Re: [Trac] Trac dev and post commit hooks
>>
>> I added the envelope setting, and tried a "[refs #30]" commit
>> message (also without the square brackets). Again, shows up
>> as a clickable link in timeline but no mention in the ticket itself.
>>
> ...you removed most of the historical context to this email? I use email and don't store old messages, so I don't have the old info on your config so far.
>
> I think I would suggest that you (a) set _all_ the options referenced in the www help page (link above) rather than rely on the defaults, (b) restart your server to make sure they're used, (c) try it again and (d) if it still doesn't work, show us the config and commit message you used and say what did and didn't happen.
>
> For your ref, here are my settings (but note that I don't use `close` from commit as we have a separate testing phase in our workflow):-
>
> [components]
> tracopt.ticket.commit_updater.* = enabled
>
> [ticket]
> commit_ticket_update_envelope =
> #commit_ticket_update_commands.close =
> commit_ticket_update_commands.refs = <ALL>
> commit_ticket_update_check_perms = true
> commit_ticket_update_notify = true
>
> ....this should add a ref for any `#<number>` bit of text to ticket <number>, checking that the commiter has rights to update the ticket (do your svn and trac usernames match?).
>
> ~ mark c
>
> --
> 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.
>
Attachments: smime.p7s (4.78 KB)


mark.cooke at siemens

Sep 6, 2012, 12:18 AM

Post #11 of 13 (383 views)
Permalink
RE: Trac dev and post commit hooks [In reply to]

[Note: please post in-line or at the bottom...]

> On 4 Sep 2012, at 08:09, "Cooke, Mark" <mark.cooke [at] siemens> wrote:
>
> >> On 3 Sep 2012, at 08:01, "Cooke, Mark" wrote:
> >>>> the defaults from
> http://trac.edgewall.org/wiki/CommitTicketUpdater
> >>>
> >>> Looking at that page appears to confirm my suspicion that
> >> you need to set the `envelope` option. Try doing a commit
> >> using the log message `[fixes #34]` (using the apparently
> >> default `[]` envelope. If that works, just define the
> >> envelope option to be empty and you should be back where you
> >> want to be...
> >>
> >> -----Original Message-----
> >> From: trac-users [at] googlegroups On Behalf Of Samuel Halliday
> >> Sent: 03 September 2012 20:37
> >> To: trac-users [at] googlegroups
> >> Subject: Re: [Trac] Trac dev and post commit hooks
> >>
> >> I added the envelope setting, and tried a "[refs #30]" commit
> >> message (also without the square brackets). Again, shows up
> >> as a clickable link in timeline but no mention in the
> ticket itself.
> >>
> > ...you removed most of the historical context to this
> email? I use email and don't store old messages, so I don't
> have the old info on your config so far.
> >
> > I think I would suggest that you (a) set _all_ the options
> referenced in the www help page (link above) rather than rely
> on the defaults, (b) restart your server to make sure they're
> used, (c) try it again and (d) if it still doesn't work, show
> us the config and commit message you used and say what did
> and didn't happen.
> >
> > For your ref, here are my settings (but note that I don't
> use `close` from commit as we have a separate testing phase
> in our workflow):-
> >
> > [components]
> > tracopt.ticket.commit_updater.* = enabled
> >
> > [ticket]
> > commit_ticket_update_envelope =
> > #commit_ticket_update_commands.close =
> > commit_ticket_update_commands.refs = <ALL>
> > commit_ticket_update_check_perms = true
> > commit_ticket_update_notify = true
> >
> > ....this should add a ref for any `#<number>` bit of text
> to ticket <number>, checking that the commiter has rights to
> update the ticket (do your svn and trac usernames match?).
> >
> > ~ mark c
>
> -----Original Message-----
> From: trac-users [at] googlegroups
> [mailto:trac-users [at] googlegroups] On Behalf Of Samuel Halliday
> Sent: 05 September 2012 20:22
> To: trac-users [at] googlegroups
> Subject: Re: [Trac] Trac dev and post commit hooks
>
> Added all settings, still not updating the ticket :-(
>
> --
> Sam

Do you have TRAC_ADMIN permission for your trac? If so, go to the `About Trac` link (under the search button) and make sure that the settings displayed there match what you are expecting them to be (especially the [components], [ticket] and [trac] repository_ settings). Paste them in a reply if you can, along with the exact log message(s) you have tried that did not work.

If you are not TRAC_ADMIN and you have `commit_ticket_update_check_perms = true` are you sure you can edit the ticket comments OK?

Are your trac and svn usernames identical?

Please also post your svn post-commit hook script ~ how have you tested that it works for whichever user the apache daemon runs as? The svn commit still succeedes even if the post-commit hook fails (as it runs by definition after the commit completes) so that might explain why svn works but the trac bit doesn't. On *nix this is usually a permissions issue, can also be on Windows depending on how you are setup (it helps if you tell us what platform you are on and exactly which versions ~ if you did earlier you removed that info from the text).

In your trac instance, set the Admin > Logging configuration to DEBUG level then try again and see if any errors are reported.

~ mark c

--
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.


sam.halliday at gmail

Sep 6, 2012, 7:37 AM

Post #12 of 13 (384 views)
Permalink
Re: Trac dev and post commit hooks [In reply to]

(content appears at bottom)

On 6 Sep 2012, at 08:18, "Cooke, Mark" <mark.cooke [at] siemens> wrote:

> [Note: please post in-line or at the bottom...]
>
>> On 4 Sep 2012, at 08:09, "Cooke, Mark" <mark.cooke [at] siemens> wrote:
>>
>>>> On 3 Sep 2012, at 08:01, "Cooke, Mark" wrote:
>>>>>> the defaults from
>> http://trac.edgewall.org/wiki/CommitTicketUpdater
>>>>>
>>>>> Looking at that page appears to confirm my suspicion that
>>>> you need to set the `envelope` option. Try doing a commit
>>>> using the log message `[fixes #34]` (using the apparently
>>>> default `[]` envelope. If that works, just define the
>>>> envelope option to be empty and you should be back where you
>>>> want to be...
>>>>
>>>> -----Original Message-----
>>>> From: trac-users [at] googlegroups On Behalf Of Samuel Halliday
>>>> Sent: 03 September 2012 20:37
>>>> To: trac-users [at] googlegroups
>>>> Subject: Re: [Trac] Trac dev and post commit hooks
>>>>
>>>> I added the envelope setting, and tried a "[refs #30]" commit
>>>> message (also without the square brackets). Again, shows up
>>>> as a clickable link in timeline but no mention in the
>> ticket itself.
>>>>
>>> ...you removed most of the historical context to this
>> email? I use email and don't store old messages, so I don't
>> have the old info on your config so far.
>>>
>>> I think I would suggest that you (a) set _all_ the options
>> referenced in the www help page (link above) rather than rely
>> on the defaults, (b) restart your server to make sure they're
>> used, (c) try it again and (d) if it still doesn't work, show
>> us the config and commit message you used and say what did
>> and didn't happen.
>>>
>>> For your ref, here are my settings (but note that I don't
>> use `close` from commit as we have a separate testing phase
>> in our workflow):-
>>>
>>> [components]
>>> tracopt.ticket.commit_updater.* = enabled
>>>
>>> [ticket]
>>> commit_ticket_update_envelope =
>>> #commit_ticket_update_commands.close =
>>> commit_ticket_update_commands.refs = <ALL>
>>> commit_ticket_update_check_perms = true
>>> commit_ticket_update_notify = true
>>>
>>> ....this should add a ref for any `#<number>` bit of text
>> to ticket <number>, checking that the commiter has rights to
>> update the ticket (do your svn and trac usernames match?).
>>>
>>> ~ mark c
>>
>> -----Original Message-----
>> From: trac-users [at] googlegroups
>> [mailto:trac-users [at] googlegroups] On Behalf Of Samuel Halliday
>> Sent: 05 September 2012 20:22
>> To: trac-users [at] googlegroups
>> Subject: Re: [Trac] Trac dev and post commit hooks
>>
>> Added all settings, still not updating the ticket :-(
>>
>> --
>> Sam
>
> Do you have TRAC_ADMIN permission for your trac? If so, go to the `About Trac` link (under the search button) and make sure that the settings displayed there match what you are expecting them to be (especially the [components], [ticket] and [trac] repository_ settings). Paste them in a reply if you can, along with the exact log message(s) you have tried that did not work.
>
> If you are not TRAC_ADMIN and you have `commit_ticket_update_check_perms = true` are you sure you can edit the ticket comments OK?
>
> Are your trac and svn usernames identical?
>
> Please also post your svn post-commit hook script ~ how have you tested that it works for whichever user the apache daemon runs as? The svn commit still succeedes even if the post-commit hook fails (as it runs by definition after the commit completes) so that might explain why svn works but the trac bit doesn't. On *nix this is usually a permissions issue, can also be on Windows depending on how you are setup (it helps if you tell us what platform you are on and exactly which versions ~ if you did earlier you removed that info from the text).
>
> In your trac instance, set the Admin > Logging configuration to DEBUG level then try again and see if any errors are reported.



Thanks Mark! It was a permission problem, I had forgotten to change the owner of the post-commit hook.

Now all works fine. The thing that was confusing me the most was that the history was showing up, so I have now learnt that the timeline doesn't depend on the hook running successfully.
Attachments: smime.p7s (4.78 KB)


mark.cooke at siemens

Sep 6, 2012, 8:17 AM

Post #13 of 13 (391 views)
Permalink
RE: Trac dev and post commit hooks [In reply to]

> -----Original Message-----
> From: trac-users [at] googlegroups On Behalf Of Samuel Halliday
> Sent: 06 September 2012 15:37
> To: trac-users [at] googlegroups
> Subject: Re: [Trac] Trac dev and post commit hooks
>
> (content appears at bottom)

Thanks!

> On 6 Sep 2012, at 08:18, "Cooke, Mark" <mark.cooke [at] siemens> wrote:
>
> > [Note: please post in-line or at the bottom...]
> >
> >> On 4 Sep 2012, at 08:09, "Cooke, Mark"
> <mark.cooke [at] siemens> wrote:
> >>
> >>>> On 3 Sep 2012, at 08:01, "Cooke, Mark" wrote:
> >>>>>> the defaults from
> >> http://trac.edgewall.org/wiki/CommitTicketUpdater
> >>>>>
> >>>>> Looking at that page appears to confirm my suspicion that
> >>>> you need to set the `envelope` option. Try doing a commit
> >>>> using the log message `[fixes #34]` (using the apparently
> >>>> default `[]` envelope. If that works, just define the
> >>>> envelope option to be empty and you should be back where you
> >>>> want to be...
> >>>>
> >>>> -----Original Message-----
> >>>> From: trac-users [at] googlegroups On Behalf Of Samuel Halliday
> >>>> Sent: 03 September 2012 20:37
> >>>> To: trac-users [at] googlegroups
> >>>> Subject: Re: [Trac] Trac dev and post commit hooks
> >>>>
> >>>> I added the envelope setting, and tried a "[refs #30]" commit
> >>>> message (also without the square brackets). Again, shows up
> >>>> as a clickable link in timeline but no mention in the
> >> ticket itself.
> >>>>
> >>> ...you removed most of the historical context to this
> >> email? I use email and don't store old messages, so I don't
> >> have the old info on your config so far.
> >>>
> >>> I think I would suggest that you (a) set _all_ the options
> >> referenced in the www help page (link above) rather than rely
> >> on the defaults, (b) restart your server to make sure they're
> >> used, (c) try it again and (d) if it still doesn't work, show
> >> us the config and commit message you used and say what did
> >> and didn't happen.
> >>>
> >>> For your ref, here are my settings (but note that I don't
> >> use `close` from commit as we have a separate testing phase
> >> in our workflow):-
> >>>
> >>> [components]
> >>> tracopt.ticket.commit_updater.* = enabled
> >>>
> >>> [ticket]
> >>> commit_ticket_update_envelope =
> >>> #commit_ticket_update_commands.close =
> >>> commit_ticket_update_commands.refs = <ALL>
> >>> commit_ticket_update_check_perms = true
> >>> commit_ticket_update_notify = true
> >>>
> >>> ....this should add a ref for any `#<number>` bit of text
> >> to ticket <number>, checking that the commiter has rights to
> >> update the ticket (do your svn and trac usernames match?).
> >>>
> >>> ~ mark c
> >>
> >> -----Original Message-----
> >> From: trac-users [at] googlegroups
> >> [mailto:trac-users [at] googlegroups] On Behalf Of Samuel Halliday
> >> Sent: 05 September 2012 20:22
> >> To: trac-users [at] googlegroups
> >> Subject: Re: [Trac] Trac dev and post commit hooks
> >>
> >> Added all settings, still not updating the ticket :-(
> >>
> >> --
> >> Sam
> >
> > Do you have TRAC_ADMIN permission for your trac? If so, go
> to the `About Trac` link (under the search button) and make
> sure that the settings displayed there match what you are
> expecting them to be (especially the [components], [ticket]
> and [trac] repository_ settings). Paste them in a reply if
> you can, along with the exact log message(s) you have tried
> that did not work.
> >
> > If you are not TRAC_ADMIN and you have
> `commit_ticket_update_check_perms = true` are you sure you
> can edit the ticket comments OK?
> >
> > Are your trac and svn usernames identical?
> >
> > Please also post your svn post-commit hook script ~ how
> have you tested that it works for whichever user the apache
> daemon runs as? The svn commit still succeedes even if the
> post-commit hook fails (as it runs by definition after the
> commit completes) so that might explain why svn works but the
> trac bit doesn't. On *nix this is usually a permissions
> issue, can also be on Windows depending on how you are setup
> (it helps if you tell us what platform you are on and exactly
> which versions ~ if you did earlier you removed that info
> from the text).
> >
> > In your trac instance, set the Admin > Logging
> configuration to DEBUG level then try again and see if any
> errors are reported.
>
>
>
> Thanks Mark! It was a permission problem, I had forgotten to
> change the owner of the post-commit hook.

Glad to have got you sorted.

> Now all works fine. The thing that was confusing me the most
> was that the history was showing up, so I have now learnt
> that the timeline doesn't depend on the hook running successfully.

Well, that may depend if you are using the "old" or "new" repo synchronisation mechanism:-

http://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync

...as that page states, if the old per-request sync is used (as I suspect yours is): "Note that in this case, the changeset listener extension point is not called, and therefore plugins using it will not work correctly."

As you are using the post-commit hook, you want to set `repository_sync_per_request` to False.

~ mark c

--
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.