From omajid at redhat.com Thu Apr 4 11:39:06 2013 From: omajid at redhat.com (Omair Majid) Date: Thu, 04 Apr 2013 14:39:06 -0400 Subject: [PATCH] jcheck: allow bug id line to be ignored In-Reply-To: <514B5A6C.9050708@redhat.com> References: <514B5A6C.9050708@redhat.com> Message-ID: <515DC8CA.1020703@redhat.com> On 03/21/2013 03:07 PM, Omair Majid wrote: > Hi, > > The following webrev adds a new configure option "ignore" for bugids. If > it is set, then jcheck does not validate the bug summary line at all. > > http://cr.openjdk.java.net/~omajid/webrevs/jcheck-ignore-bug-line/00/ > > This is needed over at the JDK6 project so we can push commits with > Oracle's bug ids (backports from 7 and 8) as well as bugs with > "OPENJDK6-XXXX" bug ids. The thread with the suggestion is available at: > > http://mail.openjdk.java.net/pipermail/jdk6-dev/2013-March/002922.html > Ping. Anyone? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Mon Apr 8 12:31:52 2013 From: omajid at redhat.com (Omair Majid) Date: Mon, 08 Apr 2013 15:31:52 -0400 Subject: Process for enabling/disabling jcheck Message-ID: <51631B28.9090502@redhat.com> Hi, The jcheck project page [1] lists that a number of openjdk projects use jcheck. Is there a document that describes how a new project can start using jcheck or how an existing project can stop using jcheck? Thanks, Omair [1] http://openjdk.java.net/projects/code-tools/jcheck/ -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From mark.reinhold at oracle.com Mon Apr 8 15:19:13 2013 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Mon, 08 Apr 2013 15:19:13 -0700 Subject: [PATCH] jcheck: allow bug id line to be ignored In-Reply-To: <514B5A6C.9050708@redhat.com> References: <514B5A6C.9050708@redhat.com> Message-ID: <20130408151913.75918@eggemoggin.niobe.net> 2013/3/21 5:07 -0700, omajid at redhat.com: > The following webrev adds a new configure option "ignore" for bugids. If > it is set, then jcheck does not validate the bug summary line at all. > > http://cr.openjdk.java.net/~omajid/webrevs/jcheck-ignore-bug-line/00/ > > This is needed over at the JDK6 project so we can push commits with > Oracle's bug ids (backports from 7 and 8) as well as bugs with > "OPENJDK6-XXXX" bug ids. ... 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? Please add a case or two to the unit tests to cover this new option. The tests for configuration options are at the end of runtests.sh. - Mark From omajid at redhat.com Mon Apr 8 15:36:16 2013 From: omajid at redhat.com (Omair Majid) Date: Mon, 08 Apr 2013 18:36:16 -0400 Subject: [PATCH] jcheck: allow bug id line to be ignored In-Reply-To: <20130408151913.75918@eggemoggin.niobe.net> References: <514B5A6C.9050708@redhat.com> <20130408151913.75918@eggemoggin.niobe.net> Message-ID: <51634660.6010809@redhat.com> Hi Mark, On 04/08/2013 06:19 PM, mark.reinhold at oracle.com wrote: > 2013/3/21 5:07 -0700, omajid at redhat.com: >> The following webrev adds a new configure option "ignore" for bugids. If >> it is set, then jcheck does not validate the bug summary line at all. >> >> http://cr.openjdk.java.net/~omajid/webrevs/jcheck-ignore-bug-line/00/ >> >> This is needed over at the JDK6 project so we can push commits with >> Oracle's bug ids (backports from 7 and 8) as well as bugs with >> "OPENJDK6-XXXX" bug ids. ... > > 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'. I can avoid this by delaying the invocation of repo_bugids until necessary, but I went with minimal changes for this patch. > Please add a case or two to the unit tests to cover this new option. > The tests for configuration options are at the end of runtests.sh. Thank you for the pointers; I will post an updated webrev that includes tests. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From mark.reinhold at oracle.com Mon Apr 8 15:53:42 2013 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Mon, 08 Apr 2013 15:53:42 -0700 Subject: [PATCH] jcheck: allow bug id line to be ignored In-Reply-To: <51634660.6010809@redhat.com> References: <514B5A6C.9050708@redhat.com>, <20130408151913.75918@eggemoggin.niobe.net>, <51634660.6010809@redhat.com> Message-ID: <20130408155342.3301@eggemoggin.niobe.net> 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. - Mark From omajid at redhat.com Fri Apr 12 15:12:06 2013 From: omajid at redhat.com (Omair Majid) Date: Fri, 12 Apr 2013 18:12:06 -0400 Subject: [PATCH] jcheck: allow bug id line to be ignored In-Reply-To: <20130408151913.75918@eggemoggin.niobe.net> References: <514B5A6C.9050708@redhat.com> <20130408151913.75918@eggemoggin.niobe.net> Message-ID: <516886B6.5040304@redhat.com> Hi Mark, On 04/08/2013 06:19 PM, mark.reinhold at oracle.com wrote: > Please add a case or two to the unit tests to cover this new option. > The tests for configuration options are at the end of runtests.sh. Thanks for pointing me to the right place to add tests. I had two questions about tests in jcheck that I couldn't find answers to: 1. What's the difference between 'make test' and 'make tests'? Should I be running both all the time or prefer one over the other? 2. Looking at runtests.sh, some tests set up jcheck: 259 hg add -R z z/.jcheck/conf 260 cat >z/.hg/hgrc <<___ 261 [extensions] 262 jcheck = $(pwd)/jcheck.py 263 [hooks] 264 pretxncommit.jcheck=python:jcheck.hook 265 ___ While others dont: 208 # Lax bugids 209 echo "-- $r lax bug ids" 210 rm -rf z 211 hg init z 212 mkdir z/.jcheck 213 cat >z/.jcheck/conf <<___ 214 project=jdk7 215 comments=lax 216 bugids=lax 217 ___ 218 hg add -R z z/.jcheck/conf 219 220 if HGUSER=$setup_author hg ci -R z -m '1234: Silly bugid'; then true; else fail; fi 221 r=$(expr $r + 1) Is it expected that jcheck will be hooked into the global ~/.hgrc file? (Is that a good expectation for unit tests?) Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From mark.reinhold at oracle.com Tue Apr 23 10:22:31 2013 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Tue, 23 Apr 2013 17:22:31 +0000 Subject: hg: code-tools/jcheck: Fix broken tags=lax test Message-ID: <20130423172231.4F3DB48528@hg.openjdk.java.net> Changeset: 8ca0fb80367b Author: mr Date: 2013-04-23 10:21 -0700 URL: http://hg.openjdk.java.net/code-tools/jcheck/rev/8ca0fb80367b Fix broken tags=lax test ! runtests.sh From omajid at redhat.com Tue Apr 30 13:43:35 2013 From: omajid at redhat.com (Omair Majid) Date: Tue, 30 Apr 2013 16:43:35 -0400 Subject: [PATCH] jcheck: allow bug id line to be ignored In-Reply-To: <20130408155342.3301@eggemoggin.niobe.net> References: <514B5A6C.9050708@redhat.com>, <20130408151913.75918@eggemoggin.niobe.net>, <51634660.6010809@redhat.com> <20130408155342.3301@eggemoggin.niobe.net> Message-ID: <51802CF7.7010809@redhat.com> 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