Erik Andersson wrote:
> Hi
>
> I've added support to add time spent dev/test in the svn commit 
> message with syntax:
> #<ticket number>:<time spent dev>:<time spent test>
>
> Unfortunately that broke the ticket parsing in Trac.
>
> #1234:-1:0 gives me a valid Trac link to ticket 1234
> #1234:1:0 highlights #1234:1 but there is no link.
>
> Since I already pushed some entries into the database and the 
> difference was minimal I thought it would be nice to tweak the regexp.
>
> Osimons pointed me 
> to 
> http://trac.edgewall.org/browser/branches/0.11-stable/trac/ticket/api.py#L360
>
> Today I asked coderanger if he knew what I could possibly break if I 
> modified the regexp. He took a quick look and found something he 
> wanted me post here. 
>
> [23:13:52 <http://pacopablo.com/irclogs#UTC2009-06-23T06:13:52>] 
> <coderanger_>         hmm, not sure why the regex uses the Ranges string
> [23:13:57 <http://pacopablo.com/irclogs#UTC2009-06-23T06:13:57>] 
> <coderanger_>         that doesn't seem right
> [23:15:07 <http://pacopablo.com/irclogs#UTC2009-06-23T06:15:07>] 
> <coderanger_>         I would ask on tracdev
> [23:15:36 <http://pacopablo.com/irclogs#UTC2009-06-23T06:15:36>] 
> <coderanger_>         someone probably planned to do something with that and 
> never did
>
>
> Anyone knows anything about this?
>
> The regexp used seems to be: "\d+(?:[-:]\d+)?(?:,\d+(?:[-:]\d+)?)*"
>

This is a new feature of Trac 0.11:

http://trac.edgewall.org/wiki/TracLinks#ticket:links

For some reason though the #500:600 syntax doesn't seem to work - the 
documented #500-600 one does.

For your new specific feature, I'd advise you to *start* with something 
specific to the time tracking, then mention the resource which is 
tracked, a bit similar to the attachment: and comment: syntax.
E.g.
 tracking:<time spent dev>:<time spent test>:#<ticket number>,
 TT:<time spent dev>:<time spent test>:#<ticket number>
 or anything more fancy like: $<time spent dev>$<time spent 
test>$#<ticket number>

-- Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" 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-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to