[PATCH] jcheck: allow bug id line to be ignored
Omair Majid
omajid at redhat.com
Tue Apr 30 13:43:35 PDT 2013
On 04/08/2013 06:53 PM, mark.reinhold at oracle.com wrote:
> 2013/4/8 8:36 -0700, omajid at redhat.com:
>> On 04/08/2013 06:19 PM, mark.reinhold at oracle.com wrote:
>>> This is a fine change in principle. I don't understand, though, why
>>> you need your first patch (embedded in this patch) to store bugids as
>>> strings rather than numbers. You're not going to validate bugids that
>>> aren't pure numbers, so why bother with that change?
>>
>> Even thought the bug ids are never used, repo_bugids is called when the
>> checker object is created:
>> 544 ch = checker(ui, repo, repo_bugids(ui, repo), strict, lax)
>>
>> And repo_bugids method ends up doing:
>> 209 b = int(m.group(1))
>>
>> To find the bug 'number'.
>
> Ah, got it.
>
>> I can avoid this by delaying the invocation of repo_bugids until
>> necessary, but I went with minimal changes for this patch.
>
> 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/
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