From erik.joelsson at oracle.com Fri Jun 1 21:49:51 2018 From: erik.joelsson at oracle.com (Erik Joelsson) Date: Fri, 1 Jun 2018 14:49:51 -0700 Subject: RFR: CODETOOLS-7902177: Make trees work with Mercurial 4.2 - 4.6 In-Reply-To: References: Message-ID: <958a08a9-fa36-ad59-225c-80af2b664a70@oracle.com> Oh, I was not aware of that mailing list, I just checked here. Mark's version looks like it has more effort put into it. If that gets pushed I can add the missing bits for 4.6. /Erik On 2018-06-01 14:26, Martin Buchholz wrote: > Hej Erik, > > Thanks for fixing but ... > Are you aware of the thread on hg-tools-dev > https://openjdk.markmail.org/thread/hla7tbyg6sg2kgqg > Maybe you could append to that thread instead? > > > On Fri, Jun 1, 2018 at 2:04 PM, Erik Joelsson > > wrote: > > Hello, > > I recently installed Ubuntu 18.04 which comes with HG 4.5.3 and > discovered there were issues with the trees extension again. The > problems start with version 4.2 and up. Here is a patch that makes > it work for all versions 1.1 to 4.6, tested with the internal test > suite. > > There are multiple API changes that needed to be worked around, > but nothing here should be too controversial and I've added > comments explaining the less obvious cases. I also had to update > the URL to the official Mercurial repo which is used as the source > for testing against all Mercurial versions, as well as update the > tests to be compatible with the latest version of the Mercurial > test runner and new output from some mercurial commands. There is > also a test internal extension "verlist" that wasn't compatible > with the 4.5.3 system mercurial on my new system. > > Bug: https://bugs.openjdk.java.net/browse/CODETOOLS-7902177 > > > Webrev: > http://cr.openjdk.java.net/~erikj/CODETOOLS-7902177/webrev.01/ > > > /Erik > > From mark.reinhold at oracle.com Fri Jun 1 21:57:34 2018 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Fri, 01 Jun 2018 14:57:34 -0700 Subject: RFR: CODETOOLS-7902177: Make trees work with Mercurial 4.2 - 4.6 In-Reply-To: <958a08a9-fa36-ad59-225c-80af2b664a70@oracle.com> References: <958a08a9-fa36-ad59-225c-80af2b664a70@oracle.com> Message-ID: <20180601145734.491831136@eggemoggin.niobe.net> 2018/6/1 14:49:51 -0700, erik.joelsson at oracle.com: > Oh, I was not aware of that mailing list, I just checked here. Mark's > version looks like it has more effort put into it. If that gets pushed I > can add the missing bits for 4.6. Thanks for the reminder. I?ll push it shortly. - Mark From mark.reinhold at oracle.com Fri Jun 1 22:04:51 2018 From: mark.reinhold at oracle.com (mark.reinhold at oracle.com) Date: Fri, 01 Jun 2018 22:04:51 +0000 Subject: hg: code-tools/trees: 10 new changesets Message-ID: <201806012204.w51M4pJo009849@aojmv0008.oracle.com> Changeset: c564bbfa43dc Author: mr Date: 2018-03-06 09:18 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/c564bbfa43dc Update hg repo URL ! tests/hgext-test.gmk Changeset: 2fa563ce0499 Author: mr Date: 2018-03-06 09:18 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/2fa563ce0499 Insulate hg invocations from user .hgrc files ! tests/hgext-test.gmk Changeset: eb125f25a40f Author: mr Date: 2018-03-06 09:18 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/eb125f25a40f Explicitly zero default command dates ! tests/hgext-test.gmk Changeset: fa743d5b8698 Author: mr Date: 2018-03-06 09:18 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/fa743d5b8698 Use the @command decorator in verlist.py ! tests/verlist.py Changeset: 15882341bf0f Author: mr Date: 2018-03-06 09:19 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/15882341bf0f Use repo.vfs (hg 4.2) ! trees.py Changeset: 70730f6d01a8 Author: mr Date: 2018-03-06 09:19 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/70730f6d01a8 Use registrar.command when available (hg 4.3) ! trees.py Changeset: aed87627cf7b Author: mr Date: 2018-03-06 11:49 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/aed87627cf7b Register config items (hg 4.4) ! trees.py Changeset: c3cf999f99ee Author: mr Date: 2018-03-06 11:49 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/c3cf999f99ee Adjust tests for 'new changesets' output (hg 4.4) ! tests/test-trees-local.t ! tests/test-trees-remote-x.t ! tests/test-trees-remote.t Changeset: 339764362f72 Author: mr Date: 2018-03-06 11:49 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/339764362f72 Don't test release candidates, or tip ! tests/hgext-test.gmk ! tests/verlist.py Changeset: 558d415ca1cc Author: mr Date: 2018-03-06 13:05 -0800 URL: http://hg.openjdk.java.net/code-tools/trees/rev/558d415ca1cc Update testedwith list ! trees.py From erik.joelsson at oracle.com Mon Jun 4 22:34:51 2018 From: erik.joelsson at oracle.com (Erik Joelsson) Date: Mon, 4 Jun 2018 15:34:51 -0700 Subject: RFR: Make trees work with hg 4.6 Message-ID: Hello, I've rebased my patch for getting trees to work with hg 4.6 on top of Mark's latest commits. This patch also fixes an issue with the internal verlist plugin if the default mercurial on the system running the tests is newer than 3.8. It also widens the filtering of release candidate tags in the hg main repo to catch the 4.6rc1 and 4.6rc2 tags. Webrev: http://cr.openjdk.java.net/~erikj/trees-4.6/webrev.01/ /Erik From martinrb at google.com Thu Jun 7 18:25:22 2018 From: martinrb at google.com (Martin Buchholz) Date: Thu, 7 Jun 2018 11:25:22 -0700 Subject: RFR: Make trees work with hg 4.6 In-Reply-To: References: Message-ID: Hej Erik, You may find my colleague's fixes useful. I've made them available on cr. http://cr.openjdk.java.net/~martin/trees/ (too many Martins?!) --- This change seems unrelated to hg 4.6: It seems too easy to get false positives if you're simply looking for 'rc' Probably gratuitously different string quotes '' vs "" could be fixed. - tags = filter(lambda t: not t.endswith('-rc') and t != "tip", tags) + tags = filter(lambda t: 'rc' not in t and t != "tip", tags) The other changes look good to me but I'm not a python or trees developer. On Mon, Jun 4, 2018 at 3:34 PM, Erik Joelsson wrote: > Hello, > > I've rebased my patch for getting trees to work with hg 4.6 on top of > Mark's latest commits. This patch also fixes an issue with the internal > verlist plugin if the default mercurial on the system running the tests is > newer than 3.8. It also widens the filtering of release candidate tags in > the hg main repo to catch the 4.6rc1 and 4.6rc2 tags. > > Webrev: http://cr.openjdk.java.net/~erikj/trees-4.6/webrev.01/ > > /Erik > > From erik.joelsson at oracle.com Thu Jun 7 18:46:18 2018 From: erik.joelsson at oracle.com (Erik Joelsson) Date: Thu, 7 Jun 2018 11:46:18 -0700 Subject: RFR: Make trees work with hg 4.6 In-Reply-To: References: Message-ID: <635f1675-54c5-8f4b-8ab8-7ce0fba3ae0b@oracle.com> Hello Martin, On 2018-06-07 11:25, Martin Buchholz wrote: > Hej Erik, > > You may find my colleague's fixes useful.? I've made them available on cr. > > http://cr.openjdk.java.net/~martin/trees/ > > Right, you linked this before, but I never got around to look at it in detail. His changes look similar to mine. > (too many Martins?!) > > --- > > This change seems unrelated to hg 4.6: > It seems too easy to get false positives if you're simply looking for 'rc' > Probably gratuitously different string quotes '' vs "" could be fixed. > This is because the last two release candidate tags in the official hg repo are "4.6rc1" and "4.6rc2". They changed the pattern. I don't see "rc" anywhere else in tags that shouldn't be matched. This plugin is only used internally in trees testing. > -? ? tags = filter(lambda t: not t.endswith('-rc') and t != "tip", tags) > +? ? tags = filter(lambda t: 'rc' not in t and t != "tip", tags) > > The other changes look good to me but I'm not a python or trees developer. > Right, that would make sense. I'm certainly no python expert, I've mostly gotten around through pattern patching and googing so far. :) /Erik > > On Mon, Jun 4, 2018 at 3:34 PM, Erik Joelsson > > wrote: > > Hello, > > I've rebased my patch for getting trees to work with hg 4.6 on top > of Mark's latest commits. This patch also fixes an issue with the > internal verlist plugin if the default mercurial on the system > running the tests is newer than 3.8. It also widens the filtering > of release candidate tags in the hg main repo to catch the 4.6rc1 > and 4.6rc2 tags. > > Webrev: http://cr.openjdk.java.net/~erikj/trees-4.6/webrev.01/ > > > /Erik > > From martinrb at google.com Thu Jun 7 18:59:32 2018 From: martinrb at google.com (Martin Buchholz) Date: Thu, 7 Jun 2018 11:59:32 -0700 Subject: RFR: Make trees work with hg 4.6 In-Reply-To: <635f1675-54c5-8f4b-8ab8-7ce0fba3ae0b@oracle.com> References: <635f1675-54c5-8f4b-8ab8-7ce0fba3ae0b@oracle.com> Message-ID: On Thu, Jun 7, 2018 at 11:46 AM, Erik Joelsson wrote: > This is because the last two release candidate tags in the official hg > repo are "4.6rc1" and "4.6rc2". They changed the pattern. I don't see "rc" > anywhere else in tags that shouldn't be matched. This plugin is only used > internally in trees testing. > > - tags = filter(lambda t: not t.endswith('-rc') and t != "tip", tags) > + tags = filter(lambda t: 'rc' not in t and t != "tip", tags) > > The other changes look good to me but I'm not a python or trees developer. > > Ohh.... verlist is being used to get tags for the upstream mercurial repo for mercurial itself? If so, maybe document that? Looking for the substring "rc" seems particularly brittle because it happens to match "mercurial". From magnus.ihse.bursie at oracle.com Fri Jun 8 11:47:13 2018 From: magnus.ihse.bursie at oracle.com (Magnus Ihse Bursie) Date: Fri, 8 Jun 2018 13:47:13 +0200 Subject: RFR: Make trees work with hg 4.6 In-Reply-To: References: Message-ID: <89afef88-b430-3f64-85b3-16ae7f4e8196@oracle.com> On 2018-06-05 00:34, Erik Joelsson wrote: > Hello, > > I've rebased my patch for getting trees to work with hg 4.6 on top of > Mark's latest commits. This patch also fixes an issue with the > internal verlist plugin if the default mercurial on the system running > the tests is newer than 3.8. It also widens the filtering of release > candidate tags in the hg main repo to catch the 4.6rc1 and 4.6rc2 tags. > > Webrev: http://cr.openjdk.java.net/~erikj/trees-4.6/webrev.01/ The fix looks good to me. (But unfortunately, I'm not a Reviewer on this project :-() /Magnus > > /Erik > From erik.joelsson at oracle.com Fri Jun 8 18:46:10 2018 From: erik.joelsson at oracle.com (Erik Joelsson) Date: Fri, 8 Jun 2018 11:46:10 -0700 Subject: RFR: Make trees work with hg 4.6 In-Reply-To: References: <635f1675-54c5-8f4b-8ab8-7ce0fba3ae0b@oracle.com> Message-ID: Hello, On 2018-06-07 11:59, Martin Buchholz wrote: > > > On Thu, Jun 7, 2018 at 11:46 AM, Erik Joelsson > > wrote: > > This is because the last two release candidate tags in the > official hg repo are "4.6rc1" and "4.6rc2". They changed the > pattern. I don't see "rc" anywhere else in tags that shouldn't be > matched. This plugin is only used internally in trees testing. > >> -? ? tags = filter(lambda t: not t.endswith('-rc') and t != >> "tip", tags) >> +? ? tags = filter(lambda t: 'rc' not in t and t != "tip", tags) >> >> The other changes look good to me but I'm not a python or trees >> developer. > > > Ohh.... verlist is being used to get tags for the upstream mercurial > repo for mercurial itself?? If so, maybe document that? > I think the comment at the top basically says this. > Looking for the substring "rc" seems particularly brittle because it > happens to match "mercurial". Well, we can only really make this code good enough to match the current tags in the official mercurial repo. If they change format again, we will need to adapt. I've changed the rc and tip strings to all use single quote on that line. /Erik