Patchwork tests: enable obsolete markers when invoking system hg to avoid warnings

login
register
mail settings
Submitter Matt Harbison
Date June 30, 2017, 2:54 a.m.
Message ID <op.y2mk1hx79lwrgf@envy>
Download mbox | patch
Permalink /patch/21847/
State Accepted
Headers show

Comments

Matt Harbison - June 30, 2017, 2:54 a.m.
On Thu, 29 Jun 2017 15:58:50 -0400, Adam Simpkins <simpkins@fb.com> wrote:

> On Jun 29, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1498708353 14400
>> #      Wed Jun 28 23:52:33 2017 -0400
>> # Node ID fea411e4e1f3c098dc8928e08bc2ce57091ffb05
>> # Parent  b9ea297237606ab49ea81aa80b44ede8f49ecc5b
>> tests: enable obsolete markers when invoking system hg to avoid warnings
>>
>> A couple of tests started spitting out 'obsolete feature not  
>> enabled...' after
>> 6c113a7dec52.  I only noticed because I have evolve enabled globally-  
>> enabling
>> it in the local repo also avoids the warning.
>>
>> diff --git a/tests/helpers-testrepo.sh b/tests/helpers-testrepo.sh
>> --- a/tests/helpers-testrepo.sh
>> +++ b/tests/helpers-testrepo.sh
>> @@ -11,7 +11,7 @@
>>  syshg () {
>>      (
>>          syshgenv
>> -        exec hg "$@"
>> +        hg "$@" --config experimental.evolution=createmarkers
>>      )
>>  }
>
> I think there's something else going wrong here that I don't
> understand yet.  This doesn't seem like the right fix to me, and I'd
> like to help track down what's actually going wrong.
>
> The goal of syshg is to run "hg" with the exact same settings used
> when you manually run "hg" by hand from your shell.  We shouldn't need
> to pass in "--config experimental.evolution=createmarkers" unless you
> always manually pass in that flag when interacting with your
> repository.

I don't.  I've got 'evolve=' in my %USERPROFILE%/mercurial.ini.

> It seems like for some reason syshgenv isn't completely restoring the
> configuration as desired.
>
> Can you try running "hg config --debug | grep createmarkers" from your
> shell and report the output, to try and help identify where this
> setting normally comes from for you?
>

It reports nothing.  The breakage actually bisected to:

changeset:   36927:acfce52518c4
user:        Jun Wu <quark@fb.com>
date:        Wed Jun 28 13:45:51 2017 -0700
summary:     tests: do not use system hg if it does not have "files"  
command

but prior to that, I got:

This is the last commit that runs clean, and the next dropped the custom  
HGRCPATH that enabled markers.

changeset:   36922:fa9a90d5ad89
user:        Adam Simpkins <simpkins@fb.com>
date:        Tue Jun 27 17:24:31 2017 -0700
summary:     tests: save the original PATH and PYTHONPATH variables


Here's the output from within the test itself:

    $ syshg showconfig --debug
+  read config from:  
C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc
+  repo: bundle.mainreporoot=c:\Users\Matt\projects\hg
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:8:  
devel.all-warnings=true
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:9:  
devel.default-date=0 0
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:11:  
largefiles.usercache=$TESTTMP\.cache/largefiles
+  c:\Users\Matt\projects\hg\.hg\hgrc:2:  
paths.default=https://www.mercurial-scm.org/repo/hg
+  c:\Users\Matt\projects\hg\.hg\hgrc:3:  
paths.committed=https://www.mercurial-scm.org/repo/hg-committed
+  c:\Users\Matt\projects\hg\.hg\hgrc:4: paths.old=https://selenic.com/hg
+  c:\Users\Matt\projects\hg\.hg\hgrc:5:  
paths.crew=http://hg.intevation.org/mercurial/crew
+  c:\Users\Matt\projects\hg\.hg\hgrc:6:  
paths.clowncopter=http://hg.netv6.net/clowncopter/
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:2:  
ui.slash=True
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:3:  
ui.interactive=False
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:4:  
ui.mergemarkers=detailed
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:5:  
ui.promptecho=True
+  c:\Users\Matt\projects\hg\.hg\hgrc:9: ui.username=Matt Harbison  
<matt_harbison@yahoo.com>
+  c:\Users\Matt\projects\hg\.hg\hgrc:10: ui.ignore=localignore.txt
+  --verbose: ui.verbose=False
+  --debug: ui.debug=True
+  --quiet: ui.quiet=False
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:13:  
web.address=localhost
+  C:\Users\Matt\AppData\Local\Temp\hgtests.vx_csu\child1\.hgrc:14:  
web.ipv6=False

So both c:\Program Files\Mercurial\hgrc.d and the user level *.ini are  
missing.

Patch

--- c:/Users/Matt/projects/hg/tests/test-check-commit.t
+++ c:/Users/Matt/projects/hg/tests/test-check-commit.t.err
@@ -17,5 +17,6 @@ 
    >        echo
    >   fi
    > done
+  c:\Users\Matt\projects\hg\tests/helpers-testrepo.sh: line 14: exec: hg:  
not found