When I print out some data from trac-post-commit-hook, I found out the
rev number and error msg are always the same:

<trac.versioncontrol.cache.CachedChangeset object at 0x02F222D0>
line 160 changeset is  <trac.versioncontrol.cache.CachedChangeset
object at 0x02F222D0>
line 168 self.rev is  3
line 170 self.msg is  (In [3]) scriptmanager error is fixed due to to
ajax dependency

My commit revision is 150, and msg is "fixed #5: test post commit
hook"

The self.msg=  (In [3]) scriptmanager error is fixed due to to ajax
dependency
which is not my in my repository. It seems trac project message. Maybe
the trac point to itself  not to my repository?  When I use trac/
browser to look my repository, It shows the correct trunck repository
information, however, the other folders like hooks diretcory, there is
no change at all. I accessed the repository, add trac-post-commit-
hook.cmd, post-commit.bat and trac-post-commit-hook files, they are
not shown through trac's browse source. Can this be the problem? How
do I fix it? I guess the trac project and repository environment have
problems.
Thanks
Lynda

On Jan 8, 1:33 pm, lynda <[email protected]> wrote:
> Some things I tried, I added this to the last line on trac-post-commit-
> hook:
> import traceback
>         traceback.print_exc(file=sys.stderr)
>         print 'last line'
> On my log page I only get "last line". Where and what can I insert to
> print out any needed information in trac-post-commit-hook script?
> Just want you know I don't know python much, you ahve to give me
> exactly syntex for me to implement it. Sorry about that.
> Best regards
> Lynda
>
> On Jan 8, 11:48 am, Olemis Lang <[email protected]> wrote:
>
>
>
> > On Fri, Jan 8, 2010 at 2:18 PM, lynda <[email protected]> wrote:
> > > When I commented out these 2 lines related with email notification in
> > > trac-post-commit-hook script:
> > > line 107: # from trac.ticket.notification import TicketNotifyEmail
> > > line 186: #tn = TicketNotifyEmail(self.env)
> > >  The script still does not update my trac ticket and no error out yet.
> > > Is commenting out email function a right way to identify if the
> > > notification caused the not updating tickets?
>
> > AFAICR ... the script performs all processing (ticket updates and so
> > on ...) before sending e-mails ... so that should not be the problem
> > (CMIIW)
>
> > > Can anyone suggest other
> > > ways to find the problem?
> > > What can i do to debug this issue?
> > > I have download SVN:Notify module from cpan,
>
> > Is it a Perl module ?
>
> > > and so far my SVN"Notify
> > > has not been sending email out yet when I test it from window command
> > > line using my gmail account.
>
> > Notification e-mails are sent by Trac . That's one thing, whereas
> > commit hook not working is another thing. If you want to debug
> > notifications I suggest you to configure Trac notifications in
> > trac.ini and use tickets (create and modify some just to test ;o). If
> > that does not work then you have another problem (... that could be
> > solved in a separate thread ;o)
>
> > OTOH the post-commit hook needs to be added to the repos hook script
> > file (first check point) and has to run successfully from the command
> > line (second check point ;o) . You could try to redirect stderr to a
> > file inside the script . Something like
>
> > {{{
> > mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
>
> > }}}
>
> > becomes
>
> > {{{
> > mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf           2> 
> > C:\error.log
>
> > }}}
>
> > --
> > Regards,
>
> > Olemis.
>
> > Blog ES:http://simelo-es.blogspot.com/
> > Blog EN:http://simelo-en.blogspot.com/
>
> > Featured article:- Hide quoted text -
>
> - Show quoted text -
-- 
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.


Reply via email to