Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#76 Slight change to bugzilla bug XXX regex

Next Release
open
nobody
5
2008-09-07
2008-09-07
Jerry Shea
No

Hi Guys,

great project - I've been using it via statsvn and it works really well. Thanks!
A minor gripe, but our svn comments refer to bugs with "Bug: xxxxx" - the regex in bugzilla support (in the class net.sf.statcvs.weblinks.bugs.BugTracker class) doesn't cope with the ":". If the line
protected static final Pattern bugRegex = Pattern.compile("bug\\s*(?:number\\s*)?(?:#\\s*)?(\\d+)", Pattern.CASE_INSENSITIVE);
is changed to add a ":?" i.e. an optional colon after "Bug", as below, then our problem goes away
protected static final Pattern bugRegex = Pattern.compile("bug:?\\s*(?:number\\s*)?(?:#\\s*)?(\\d+)", Pattern.CASE_INSENSITIVE);

A better solution might of course be to parameterise this regex in configuration and I'm happy to submit a patch for this if you guys think it would be worthwhile. In the meantime, I'd really appreciate if someone could make the change above?

Thanks, Jerry

Discussion

  • Jerry Shea
    Jerry Shea
    2009-03-05

    Any feedback?