[PATCH] tests: more completely restore the environment in syshgenv

Adam Simpkins simpkins at fb.com
Thu Jun 29 15:53:51 EDT 2017


On Jun 29, Yuya Nishihara wrote:
> On Wed, 28 Jun 2017 12:34:56 -0700, Adam Simpkins wrote:
> > # HG changeset patch
> > # User Adam Simpkins <simpkins at fb.com>
> > # Date 1498677802 25200
> > #      Wed Jun 28 12:23:22 2017 -0700
> > # Node ID 236c593941ab8034c500039c54bee0b3a19a0cef
> > # Parent  649cb52c8cd94ab98068004e40bf9947de62a0ce
> > tests: more completely restore the environment in syshgenv
> 
...

> +  *** failed to import extension evolve: No module named evolve
> +  *** failed to import extension textful: No module named textful
> +  *** failed to import extension textful.encoding: No module named textful.encoding
> +  obsolete feature not enabled but 135142 markers found!
> 
> I haven't investigated the problem yet.
> 
> Honestly I don't understand why using the system hg is more reliable. IMHO,
> depending externals introduces more possible instabilities. And with more
> heuristics, more painful debugging required.

The goal of this change is to ensure that, when they are trying to
examine your local repository, the tests invoke "hg" with the same set
of extensions and configs that are used when you run "hg" by hand.

Without this the tests may fail to interact with the repository at
all if they do not have the correct set of extensions.  For instance,
without this patch set I get this error:

    $ ./run-tests.py -l test-check-commit.t 

    --- /data/users/simpkins/facebook-hg-rpms/hg-crew/tests/test-check-commit.t
    +++ /data/users/simpkins/facebook-hg-rpms/hg-crew/tests/test-check-commit.t.err
    @@ -17,5 +17,7 @@
       >        echo
       >   fi
       > done
    +  abort: repository requires features unknown to this Mercurial: lz4revlog!
    +  (see https://mercurial-scm.org/wiki/MissingRequirement for more information)

On my system, the lz4revlog extension is enabled by configs in
/etc/mercurial/hgrc.d/
     
It's interesting that in your case the tests were able to find the
evolve extension before, but not afterwards.  I would be interested to
help track down why this is.  Previously the tests ran hg without the
normal system configs, but the new syshg should ideally be running
with the exact same configs and environment that is used when you run
hg by hand.

-- 
Adam Simpkins
simpkins at fb.com


More information about the Mercurial-devel mailing list