[PATCH 2 of 2] tests: use the system hg for examining the local repository

Adam Simpkins simpkins at fb.com
Wed Jun 28 18:13:03 UTC 2017


On Jun 28, Yuya Nishihara wrote:
> On Tue, 27 Jun 2017 17:37:19 -0700, Adam Simpkins wrote:
> > +# Revert the environment so that running "hg" runs the system hg
> > +# rather than the test hg installation.
> > +function syshgenv {
> > +    PATH="$ORIG_PATH"
> > +    PYTHONPATH="$ORIG_PYTHONPATH"
> > +    JYTHONPATH="$ORIG_JYTHONPATH"
> > +    unset HGRCPATH
> > +    HGPLAIN=1
> > +    export HGPLAIN
> > +}
> 
> Can this be an optional feature? It doesn't work if the system hg is a shell
> script referring environment variables overridden by the test runner, notably
> HOME.

I'll try to come up with a more robust solution that fully restores
the original environment.

-- 
Adam Simpkins
simpkins at fb.com



More information about the Mercurial-devel mailing list