[PATCH] jcheck: allow bug id line to be ignored

Omair Majid omajid at redhat.com
Tue May 7 16:58:27 PDT 2013


Hi Mark,

On 05/07/2013 04:33 PM, mark.reinhold at oracle.com wrote:
> 2013/4/30 6:43 -0700, omajid at redhat.com:
>> On 04/08/2013 06:53 PM, mark.reinhold at oracle.com wrote:
>>> I think it'd be cleaner just to load the bugids lazily.  As a side
>>> benefit that will save a bit of time too.
>>
>> Done. Updated webrev (including tests) is here:
>> http://cr.openjdk.java.net/~omajid/webrevs/jcheck-ignore-bug-line/01/
> 
> As much as I'm a fan of higher-order programming, passing a lambda
> into checker.__init__ for populate_repo_bugids() seems like overkill.
> The __init__ method can just call repo_bugids(ui, repo) directly when
> self.bugids_ignore turns out to be false.

Fair enough. I figured that the code was placed outside the class for a
reason, but calling repo_bugids in the __init__ method definitely looks
cleaner.

> On line 143, I'd make the regex a bit more precise, something like:
> 
>   bug_ident = re.compile("(([A-Z][A-Z0-9]+-)?[0-9]+):")

I went with your suggestion, but do you know of any others who might be
interested in (or affected by) this regex change?

> The new unit tests look fine.

Thanks for the comments.

New webrev:
http://cr.openjdk.java.net/~omajid/webrevs/jcheck-ignore-bug-line/02/

Thanks,
Omair

-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the hg-tools-dev mailing list