[PATCH] tests: silence obsolete warning
Matt Harbison
mharbison72 at gmail.com
Fri May 6 23:06:56 EDT 2016
On Fri, 06 May 2016 21:39:20 -0400, Matt Harbison <mharbison72 at gmail.com>
wrote:
> On Fri, 06 May 2016 14:11:02 -0400, Sean Farley <sean at farley.io> wrote:
>
>>
>> timeless <timeless at fmr.im> writes:
>>
>>> # HG changeset patch
>>> # User timeless <timeless at 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 at mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list