Patchwork tests: silence obsolete warning

login
register
mail settings
Submitter timeless
Date May 6, 2016, 3:53 p.m.
Message ID <4dcc4586ef9015556825.1462549999@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/14941/
State Changes Requested
Headers show

Comments

timeless - May 6, 2016, 3:53 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1462327878 0
#      Wed May 04 02:11:18 2016 +0000
# Node ID 4dcc4586ef9015556825a82819ffbc231e5cf79a
# Parent  fe50341de1fff843ae633d7ad7be908100c09cdc
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 4dcc4586ef90
tests: silence obsolete warning

Matt Harbison and I regularly hit these warnings.

We discussed the problem in mid-April.
Sean Farley - May 6, 2016, 6:11 p.m.
timeless <timeless@fmr.im> writes:

> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1462327878 0
> #      Wed May 04 02:11:18 2016 +0000
> # Node ID 4dcc4586ef9015556825a82819ffbc231e5cf79a
> # Parent  fe50341de1fff843ae633d7ad7be908100c09cdc
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r 4dcc4586ef90
> tests: silence obsolete warning
>
> Matt Harbison and I regularly hit these warnings.
>
> We discussed the problem in mid-April.

I'm not opposed to this patch but I am perplexed as to why it's
happening.
timeless - May 6, 2016, 9:31 p.m.
Debugging it is a pain since it goes away after one or two rounds. The best
guess is that there's a slightly dirty state which results in the warning
and something cleans it which results in future silence.

The default test environment doesn't include the evolve extension and thus
any Mercurial developer repository is likely to have evolution markers and
be eligible to trigger the warning.

I've been annoyed by this for a really long time and as someone else spoke
up recently in sympathy, I'd like it silenced.

If someone wants to investigate it, they should feel free, but not by
punishing people like me who hit it regularly.
On May 6, 2016 2:11 PM, "Sean Farley" <sean@farley.io> wrote:

>
> timeless <timeless@fmr.im> writes:
>
> > # HG changeset patch
> > # User timeless <timeless@mozdev.org>
> > # Date 1462327878 0
> > #      Wed May 04 02:11:18 2016 +0000
> > # Node ID 4dcc4586ef9015556825a82819ffbc231e5cf79a
> > # Parent  fe50341de1fff843ae633d7ad7be908100c09cdc
> > # Available At bb://timeless/mercurial-crew
> > #              hg pull bb://timeless/mercurial-crew -r 4dcc4586ef90
> > tests: silence obsolete warning
> >
> > Matt Harbison and I regularly hit these warnings.
> >
> > We discussed the problem in mid-April.
>
> I'm not opposed to this patch but I am perplexed as to why it's
> happening.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
Pierre-Yves David - May 7, 2016, 1:10 a.m.
As said on the other thread, a large share of evolve is in core since 2012.
One can now turn it on without the extension using experimental config

The piece we care about here can simply be turned on using:

   [experimental]
   evolution=createmarkers

I think it would be a better way forward here.

On 05/06/2016 11:31 PM, timeless wrote:
>
> Debugging it is a pain since it goes away after one or two rounds. The 
> best guess is that there's a slightly dirty state which results in the 
> warning and something cleans it which results in future silence.
>
> The default test environment doesn't include the evolve extension and 
> thus any Mercurial developer repository is likely to have evolution 
> markers and be eligible to trigger the warning.
>
> I've been annoyed by this for a really long time and as someone else 
> spoke up recently in sympathy, I'd like it silenced.
>
> If someone wants to investigate it, they should feel free, but not by 
> punishing people like me who hit it regularly.
>
> On May 6, 2016 2:11 PM, "Sean Farley" <sean@farley.io 
> <mailto:sean@farley.io>> wrote:
>
>
>     timeless <timeless@fmr.im <mailto:timeless@fmr.im>> writes:
>
>     > # HG changeset patch
>     > # User timeless <timeless@mozdev.org <mailto:timeless@mozdev.org>>
>     > # Date 1462327878 0
>     > #      Wed May 04 02:11:18 2016 +0000
>     > # Node ID 4dcc4586ef9015556825a82819ffbc231e5cf79a
>     > # Parent  fe50341de1fff843ae633d7ad7be908100c09cdc
>     > # Available At bb://timeless/mercurial-crew
>     > #              hg pull bb://timeless/mercurial-crew -r 4dcc4586ef90
>     > tests: silence obsolete warning
>     >
>     > Matt Harbison and I regularly hit these warnings.
>     >
>     > We discussed the problem in mid-April.
>
>     I'm not opposed to this patch but I am perplexed as to why it's
>     happening.
>     _______________________________________________
>     Mercurial-devel mailing list
>     Mercurial-devel@mercurial-scm.org
>     <mailto:Mercurial-devel@mercurial-scm.org>
>     https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Matt Harbison - May 7, 2016, 1:39 a.m.
On Fri, 06 May 2016 14:11:02 -0400, Sean Farley <sean@farley.io> wrote:

>
> timeless <timeless@fmr.im> writes:
>
>> # HG changeset patch
>> # User timeless <timeless@mozdev.org>
>> # Date 1462327878 0
>> #      Wed May 04 02:11:18 2016 +0000
>> # Node ID 4dcc4586ef9015556825a82819ffbc231e5cf79a
>> # Parent  fe50341de1fff843ae633d7ad7be908100c09cdc
>> # Available At bb://timeless/mercurial-crew
>> #              hg pull bb://timeless/mercurial-crew -r 4dcc4586ef90
>> tests: silence obsolete warning
>>
>> Matt Harbison and I regularly hit these warnings.
>>
>> We discussed the problem in mid-April.
>
> I'm not opposed to this patch but I am perplexed as to why it's
> happening.

What is happening here is when you enable evolve from ~/.hgrc, the  
HGRCPATH set by the test runner prevents that config from loading, but not  
the .hg/hgrc in the local Mercurial repo.  On the systems where I don't  
see the issue, I have evolve enabled locally, as a legacy item from when I  
was initially trying evolve.  I also see stray output with keyring enabled  
 from the user config for one of the perf tests.  (This may be Windows  
specific.)

I have no idea why timeless is seeing it sporadically- I ran a quick test  
in a loop and it failed every time.  In the interest of somebody else not  
wasting time on this, +1 for Pierre-Yves' idea.  Sending in a few minutes.

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Matt Harbison - May 7, 2016, 3:06 a.m.
On Fri, 06 May 2016 21:39:20 -0400, Matt Harbison <mharbison72@gmail.com>  
wrote:

> On Fri, 06 May 2016 14:11:02 -0400, Sean Farley <sean@farley.io> wrote:
>
>>
>> timeless <timeless@fmr.im> writes:
>>
>>> # HG changeset patch
>>> # User timeless <timeless@mozdev.org>
>>> # Date 1462327878 0
>>> #      Wed May 04 02:11:18 2016 +0000
>>> # Node ID 4dcc4586ef9015556825a82819ffbc231e5cf79a
>>> # Parent  fe50341de1fff843ae633d7ad7be908100c09cdc
>>> # Available At bb://timeless/mercurial-crew
>>> #              hg pull bb://timeless/mercurial-crew -r 4dcc4586ef90
>>> tests: silence obsolete warning
>>>
>>> Matt Harbison and I regularly hit these warnings.
>>>
>>> We discussed the problem in mid-April.
>>
>> I'm not opposed to this patch but I am perplexed as to why it's
>> happening.
>
> What is happening here is when you enable evolve from ~/.hgrc, the  
> HGRCPATH set by the test runner prevents that config from loading, but  
> not the .hg/hgrc in the local Mercurial repo.  On the systems where I  
> don't see the issue, I have evolve enabled locally, as a legacy item  
> from when I was initially trying evolve.  I also see stray output with  
> keyring enabled  from the user config for one of the perf tests.  (This  
> may be Windows specific.)
>
> I have no idea why timeless is seeing it sporadically- I ran a quick  
> test in a loop and it failed every time.  In the interest of somebody  
> else not wasting time on this, +1 for Pierre-Yves' idea.  Sending in a  
> few minutes.

I should have known it wasn't this simple.  I'm not seeing this issue on  
my Linux VM.  I put a print statement in localrepo.obsstore(), and the  
method simply isn't being called in test-check-shbang.t there.

It looks like context._filtersuspectsymlink() bails early when symlinks  
are supported.  But on Windows, it ends up loading obsstore:

+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1632, in  
_buildstatus
+      s.modified[:] = self._filtersuspectsymlink(s.modified)
+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1527, in  
_filtersuspectsymlink
+      if self.flags(f) == 'l':
+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1329, in  
flags
+      return self._flagfunc(path)
+    File "c:\Users\Matt\Projects\hg\mercurial\util.py", line 737, in  
__get__
+      result = self.func(obj)
+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1217, in  
_flagfunc
+      return self._repo.dirstate.flagfunc(self._buildflagfunc)
+    File "c:\Users\Matt\Projects\hg\mercurial\dirstate.py", line 249, in  
flagfunc
+      fallback = buildfallback()
+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1191, in  
_buildflagfunc
+      man = parents[0].manifest()
+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 180, in  
manifest
+      return self._manifest
+    File "c:\Users\Matt\Projects\hg\mercurial\util.py", line 737, in  
__get__
+      result = self.func(obj)
+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 531, in  
_manifest
+      return self._repo.manifest.read(self._changeset.manifest)
+    File "c:\Users\Matt\Projects\hg\mercurial\util.py", line 737, in  
__get__
+      result = self.func(obj)
+    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 527, in  
_changeset
+      return self._repo.changelog.changelogrevision(self.rev())
+    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 319, in  
changelog
+      revs = filterrevs(unfi, self.filtername)
+    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 261, in  
filterrevs
+      repo.filteredrevcache[filtername] = func(repo.unfiltered())
+    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 175, in  
computehidden
+      hideable = hideablerevs(repo)
+    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 33, in  
hideablerevs
+      return obsolete.getrevs(repo, 'obsolete')
+    File "c:\Users\Matt\Projects\hg\mercurial\obsolete.py", line 1094, in  
getrevs
+      if not repo.obsstore:
+    File "c:\Users\Matt\Projects\hg\mercurial\localrepo.py", line 70, in  
__get__
+      return super(repofilecache, self).__get__(repo.unfiltered(), type)
+    File "c:\Users\Matt\Projects\hg\mercurial\scmutil.py", line 1202, in  
__get__
+      entry.obj = self.func(obj)
+    File "c:\Users\Matt\Projects\hg\mercurial\localrepo.py", line 477, in  
obsstore
+      foo.bar
+  NameError: global name 'foo' is not defined
    [1]

I can respin the patch I just submitted with the proper commit message if  
someone can confirm that this behavior is expected/unavoidable.  Timeless,  
I assume you aren't seeing this on Linux?  (Still doesn't explain the  
sporadic bit, unless you run some tests on FAT too.)

>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
timeless - May 8, 2016, 1:54 a.m.
I'm on Linux...
On May 6, 2016 11:07 PM, "Matt Harbison" <mharbison72@gmail.com> wrote:

> On Fri, 06 May 2016 21:39:20 -0400, Matt Harbison <mharbison72@gmail.com>
> wrote:
>
> On Fri, 06 May 2016 14:11:02 -0400, Sean Farley <sean@farley.io> wrote:
>>
>>
>>> timeless <timeless@fmr.im> writes:
>>>
>>> # HG changeset patch
>>>> # User timeless <timeless@mozdev.org>
>>>> # Date 1462327878 0
>>>> #      Wed May 04 02:11:18 2016 +0000
>>>> # Node ID 4dcc4586ef9015556825a82819ffbc231e5cf79a
>>>> # Parent  fe50341de1fff843ae633d7ad7be908100c09cdc
>>>> # Available At bb://timeless/mercurial-crew
>>>> #              hg pull bb://timeless/mercurial-crew -r 4dcc4586ef90
>>>> tests: silence obsolete warning
>>>>
>>>> Matt Harbison and I regularly hit these warnings.
>>>>
>>>> We discussed the problem in mid-April.
>>>>
>>>
>>> I'm not opposed to this patch but I am perplexed as to why it's
>>> happening.
>>>
>>
>> What is happening here is when you enable evolve from ~/.hgrc, the
>> HGRCPATH set by the test runner prevents that config from loading, but not
>> the .hg/hgrc in the local Mercurial repo.  On the systems where I don't see
>> the issue, I have evolve enabled locally, as a legacy item from when I was
>> initially trying evolve.  I also see stray output with keyring enabled
>> from the user config for one of the perf tests.  (This may be Windows
>> specific.)
>>
>> I have no idea why timeless is seeing it sporadically- I ran a quick test
>> in a loop and it failed every time.  In the interest of somebody else not
>> wasting time on this, +1 for Pierre-Yves' idea.  Sending in a few minutes.
>>
>
> I should have known it wasn't this simple.  I'm not seeing this issue on
> my Linux VM.  I put a print statement in localrepo.obsstore(), and the
> method simply isn't being called in test-check-shbang.t there.
>
> It looks like context._filtersuspectsymlink() bails early when symlinks
> are supported.  But on Windows, it ends up loading obsstore:
>
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1632, in
> _buildstatus
> +      s.modified[:] = self._filtersuspectsymlink(s.modified)
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1527, in
> _filtersuspectsymlink
> +      if self.flags(f) == 'l':
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1329, in
> flags
> +      return self._flagfunc(path)
> +    File "c:\Users\Matt\Projects\hg\mercurial\util.py", line 737, in
> __get__
> +      result = self.func(obj)
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1217, in
> _flagfunc
> +      return self._repo.dirstate.flagfunc(self._buildflagfunc)
> +    File "c:\Users\Matt\Projects\hg\mercurial\dirstate.py", line 249, in
> flagfunc
> +      fallback = buildfallback()
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 1191, in
> _buildflagfunc
> +      man = parents[0].manifest()
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 180, in
> manifest
> +      return self._manifest
> +    File "c:\Users\Matt\Projects\hg\mercurial\util.py", line 737, in
> __get__
> +      result = self.func(obj)
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 531, in
> _manifest
> +      return self._repo.manifest.read(self._changeset.manifest)
> +    File "c:\Users\Matt\Projects\hg\mercurial\util.py", line 737, in
> __get__
> +      result = self.func(obj)
> +    File "c:\Users\Matt\Projects\hg\mercurial\context.py", line 527, in
> _changeset
> +      return self._repo.changelog.changelogrevision(self.rev())
> +    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 319, in
> changelog
> +      revs = filterrevs(unfi, self.filtername)
> +    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 261, in
> filterrevs
> +      repo.filteredrevcache[filtername] = func(repo.unfiltered())
> +    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 175, in
> computehidden
> +      hideable = hideablerevs(repo)
> +    File "c:\Users\Matt\Projects\hg\mercurial\repoview.py", line 33, in
> hideablerevs
> +      return obsolete.getrevs(repo, 'obsolete')
> +    File "c:\Users\Matt\Projects\hg\mercurial\obsolete.py", line 1094, in
> getrevs
> +      if not repo.obsstore:
> +    File "c:\Users\Matt\Projects\hg\mercurial\localrepo.py", line 70, in
> __get__
> +      return super(repofilecache, self).__get__(repo.unfiltered(), type)
> +    File "c:\Users\Matt\Projects\hg\mercurial\scmutil.py", line 1202, in
> __get__
> +      entry.obj = self.func(obj)
> +    File "c:\Users\Matt\Projects\hg\mercurial\localrepo.py", line 477, in
> obsstore
> +      foo.bar
> +  NameError: global name 'foo' is not defined
>    [1]
>
> I can respin the patch I just submitted with the proper commit message if
> someone can confirm that this behavior is expected/unavoidable.  Timeless,
> I assume you aren't seeing this on Linux?  (Still doesn't explain the
> sporadic bit, unless you run some tests on FAT too.)
>
> _______________________________________________
>>> Mercurial-devel mailing list
>>> Mercurial-devel@mercurial-scm.org
>>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>>>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>>
>

Patch

diff -r fe50341de1ff -r 4dcc4586ef90 tests/test-check-execute.t
--- a/tests/test-check-execute.t	Tue May 03 16:33:25 2016 -0400
+++ b/tests/test-check-execute.t	Wed May 04 02:11:18 2016 +0000
@@ -5,19 +5,23 @@ 
 look for python scripts without the execute bit
 
   $ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")'
+  obsolete feature not enabled but * markers found! (glob) (?)
   [1]
 
 look for python scripts with execute bit but not shebang
 
   $ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")'
+  obsolete feature not enabled but * markers found! (glob) (?)
   [1]
 
 look for shell scripts with execute bit but not shebang
 
   $ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")'
+  obsolete feature not enabled but * markers found! (glob) (?)
   [1]
 
 look for non scripts with no shebang
 
   $ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
+  obsolete feature not enabled but * markers found! (glob) (?)
   [1]
diff -r fe50341de1ff -r 4dcc4586ef90 tests/test-check-shbang.t
--- a/tests/test-check-shbang.t	Tue May 03 16:33:25 2016 -0400
+++ b/tests/test-check-shbang.t	Wed May 04 02:11:18 2016 +0000
@@ -5,9 +5,11 @@ 
 look for python scripts that do not use /usr/bin/env
 
   $ hg files 'set:grep(r"^#!.*?python") and not grep(r"^#!/usr/bin/env python")'
+  obsolete feature not enabled but * markers found! (glob) (?)
   [1]
 
 look for shell scripts that do not use /bin/sh
 
   $ hg files 'set:grep(r"^#!.*/bin/sh") and not grep(r"^#!/bin/sh")'
+  obsolete feature not enabled but * markers found! (glob) (?)
   [1]