2011/11/10 Robin Sheat <robin@catalyst.net.nz>:
Chris Nighswonger schreef op do 10-11-2011 om 15:39 [-0500]:
So I propose that we use the form: [BZX...X]
Most (many?) people seem to use a variant of 'Bug 1234' somewhere on the first line, why not just use that given it seems to be habit already? It'd be easy enough to regex for it, and you'd have a reasonable amount of backwards compatibility.
Actually this is true for the most part. However, it is the 1% of times when someone uses other weirdness that make it challenging. :-) I'm not stuck on any particular form, just wanting to get everyone doing the same thing.
Also, something that's compatible with the way 'git bz' does things would be very much preferred. It uses this regex: (\b[Ss]ee\s+(?:[^\s:/]+\s+){0,2})? (?:(https?://[^/]+/show_bug.cgi\?id=[^&\s]+) | [Bb]ug\s+\#?(\d+))
so, 'See: <url>' or 'Bug <number>' seem to be what it looks for.
Here's my current regex (its been through several revisions): ([B|b]ug|BZ)?\s?(?<![a-z]|\.)(\d{4})[\s|:|,] This extracts the following "styles" of bug references from git log, each of which is unique. I have a feeling that there are some other styles which I have not yet caught. (I realize that it only catches 4 digit bug numbers, but '+' causes it to pick up on other junk which I've yet to figure out how to avoid.) Bug 6905: Bug 5995 5533: bug 5780 6278 Bug 5630, BZ6268 BZ6074: I'll be posting my tools in a separate repo at git.k-c.org in the next week or so, so anyone will be welcome to submit patches for improvement. Kind Regards, Chris