Hi,
today I faced a problem with TracTicketChangeLogPlugin:
After analyzing the code and adding some debug outputs I can say the following:
1. Ticket number is #39
2. The db-query gives 46 revisions where LIKE '%#39%' matches (which is much more than really necessary, since revisions referencing tickets e.g. #391 are returned too)
3. The reg-ex matching hangs when there is a long commit message (sorry I cannot post it here since it contains confidential information)
a. The message contains Unicode chars, but changing the encoding of the message to match to ‘ascii’ with ‘ignore’ option does not help
b.
The message has 41 lines (it’s a message of a tag commit in subversion, where we list all tickets solved in this version, the format is:
Version vX.Y
----
* #n1 Fixed this
* #n2 Fixed that
… and so on
c. The whole message has a count of 3073 chars
The log pattern is configured to:
[ticketlog]
log_pattern = (\n|.)*#%s($|\D(\n|.)*)
Which gives very good results. In general. Since I’m not a python developer, help is appreciated.
Regards
Torge
Hi,
today I faced a problem with TracTicketChangeLogPlugin:
After analyzing the code and adding some debug outputs I can say the following:
1. Ticket number is #39
2. The db-query gives 46 revisions where LIKE '%#39%' matches (which is much more than really necessary, since revisions referencing tickets e.g. #391 are returned too)
3. The reg-ex matching hangs when there is a long commit message (sorry I cannot post it here since it contains confidential information)
a. The message contains Unicode chars, but changing the encoding of the message to match to ‘ascii’ with ‘ignore’ option does not help
b. The message has 41 lines (it’s a message of a tag commit in subversion, where we list all tickets solved in this version, the format is:
Version vX.Y
----
* #n1 Fixed this
* #n2 Fixed that
… and so onc. The whole message has a count of 3073 chars
The log pattern is configured to:
[ticketlog]
log_pattern = (\n|.)*#%s($|\D(\n|.)*)
Which gives very good results. In general. Since I’m not a python developer, help is appreciated.
Regards
Torge
> To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com <mailto:trac-users+unsub...@googlegroups.com>.
> To post to this group, send email to trac-...@googlegroups.com <mailto:trac-users@googlegroups.com>.
> Visit this group at https://groups.google.com/group/trac-users.
> For more options, visit https://groups.google.com/d/optout.
Hi Ryan,
well my issue is not really due to the number of log messages. There is a pre-selection of the log messages by a SELECT-query using a "LIKE" on the message. I added debug prints in the plug-in, activated the log to the file in the trac instance and called "tail -f trac.log" to see what happens when visiting the ticket page. And I see that the long message (it is the 11th of 46 log messages to check) is passed to the re.match()-method and then nothing more is logged. Apache is no more responding to other requests.
Maybe this is a bug in python regex code? Can you help me to check this? I'm not a python developer so I need help. Everything more complex than adding debug prints is out of my possibilities! ;-) I think of a small python script where I can pass the ticket id ("python test.py 39") executed in the directory where the trac.db is located. This script is running the code snippet of the plug-in with log of debug prints. So I can check whether this is a python issue and maybe it's possible for me to reduce it to non-confidential data and open an issue.
Thanks
Torge
> > To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com <mailto:trac-users%2Bunsu...@googlegroups.com> <mailto:trac-users+unsub...@googlegroups.com <mailto:trac-users%2Bunsu...@googlegroups.com>>.
> > To post to this group, send email to trac-...@googlegroups.com <mailto:trac-users@googlegroups.com> <mailto:trac-users@googlegroups.com <mailto:trac-users@googlegroups.com>>.
> > Visit this group at https://groups.google.com/group/trac-users <https://groups.google.com/group/trac-users>.
> > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
> Hi Ryan,
>
> well my issue is not really due to the number of log messages. There is a pre-selection of the log messages by a SELECT-query using a "LIKE" on the message. I added debug prints in the plug-in, activated the log to the file in the trac instance and called "tail -f trac.log" to see what happens when visiting the ticket page. And I see that the long message (it is the 11th of 46 log messages to check) is passed to the re.match()-method and then nothing more is logged. Apache is no more responding to other requests.
> Maybe this is a bug in python regex code? Can you help me to check this? I'm not a python developer so I need help. Everything more complex than adding debug prints is out of my possibilities! ;-) I think of a small python script where I can pass the ticket id ("python test.py 39") executed in the directory where the trac.db is located. This script is running the code snippet of the plug-in with log of debug prints. So I can check whether this is a python issue and maybe it's possible for me to reduce it to non-confidential data and open an issue.
>
> Thanks
> Torge
>
>
> #11821 also proposes to improve the regex. I think we should only extract tokens like "Refs #1", rather than just "#1", like CommitTicketUpdater does. Approximately how many tickets are referenced in the log message?
>
> - Ryan
>
>
> Are your ticket references of the form #\d+, or do you prefix the ticket ID references in your log messages #\d+ with a CommitTicketUpdater command?
> http://trac.edgewall.org/wiki/CommitTicketUpdater#Configure
>
> - Ryan
Well, it's a tag commit where we always list all fixed issues. The message has 41 lines, two lines for version and horizontal delimiter -> 39 ticket references. Our format is always like this:
Version vX.Y
----
* #n1 Fixed this
* #n2 Fixed that
...
Where "..." stands for more list points. We do not use CommitTicketUpdater.
Again: It looks to me, that regex engine of python is hanging when trying to find a match for (\n|.)*#39($|\D(\n|.)*) in the long message. I like to verify this using a small python script, but I'm not a python developer.
Improving the regex is only one solution and - in my case - not suitable if the reference format changes. This would skip all existing commits ins svn, where the new format is not used.
BTW: Merry christmas!
Regards
Torge
Hi Ryan,
after reading through all related stuff I’ve seen this comment https://trac-hacks.org/ticket/7884#comment:5 where someone replied to my comment:4 and tells about hanging server. After using the regexp proposed in comment:5 this is fixed.
Sorry, that I didn’t see that earlier.
I added this pattern on page https://trac-hacks.org/wiki/TracTicketChangelogPlugin with revision 23 so others can find this faster.
Regards
Torge
> > To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com <mailto:trac-users%2Bunsu...@googlegroups.com> <mailto:trac-users+...@googlegroups.com <mailto:trac-users%2Bunsu...@googlegroups.com>>.
> > To post to this group, send email to trac-...@googlegroups.com <mailto:trac-...@googlegroups.com> <mailto:trac-...@googlegroups.com <mailto:trac-...@googlegroups.com>>.
--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
trac-users+...@googlegroups.com.
To post to this group, send email to
trac-...@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.
Hi Ryan,
after reading through all related stuff I’ve seen this comment https://trac-hacks.org/ticket/7884#comment:5 where someone replied to my comment:4 and tells about hanging server. After using the regexp proposed in comment:5 this is fixed.
Sorry, that I didn’t see that earlier.
I added this pattern on page https://trac-hacks.org/wiki/TracTicketChangelogPlugin with revision 23 so others can find this faster.
Regards
Torge