[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Bug Report: Crash with bugtraq properties

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-07-10 17:49:51 CEST

Adam Cabler wrote:
> I am trying to get clickable links for issue tracking in my commit messages. I
> have set the bugtraq properties as follows:
> logregex [Ii]ssue AA-?(\d+)(,? ?AA-(\d+))*
> number true
> url http://jira:8080/browse/AA-%BUGID%
> When I enter a message that satisfies the regex, tortoise consistently crashes
> on the first character that causes a match.

Your regex is wrong. As the docs clearly state here:

"If only one expression is set, then the bare bug ID's must be matched
in the groups of the regex string. Example: [Ii]ssue(?:s)? #?(\d+)"

In your case, you have three groups, not just two. And two of the groups
are repeated indefinitely.

You have to use a two-line regex.

" If two expressions are set, then the first expression is used to find
a string which relates to the bug ID but may contain more than just the
bug ID (e.g. "Issue #123" or "resolves issue 123"). The second
expression is then used to extract the bare bug ID from the string
extracted with the first expression. An example:

If you want to catch every pattern "issue #XXX" and "issue #890, #789"
inside a log message you could use the following regex strings: [Ii]ssue
#?(\d+)(,? ?#(\d+))* and the second expression as (\d+) "

btw: in regex mode, the 'bugtraq:number' is ignored - you have to create
the regex so that it only accepts numbers yourself.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Jul 10 17:49:24 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.