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

mark.reinhold at oracle.com mark.reinhold at oracle.com
Tue May 7 13:33:15 PDT 2013


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.

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]+):")

The new unit tests look fine.

- Mark


More information about the hg-tools-dev mailing list