# HG changeset patch # User Pierre-Yves David # Date 1629226114 -7200 # Node ID 94158c541c7447318988f442b0a849385c86097a # Parent 981cef5188c390bbac7c9508d5d8bc2781b63f64 pyoxidized: add a `pyoxidizer` hghave keyword for line matching Some output line can be affected by pyoxidizer, for example the source file path are replaced by the module name. We introduce a new condition keyword to cope with this. Differential Revision: https://phab.mercurial-scm.org/D11283 diff -r 981cef5188c3 -r 94158c541c74 tests/hghave.py --- a/tests/hghave.py Tue Aug 17 14:38:25 2021 +0200 +++ b/tests/hghave.py Tue Aug 17 20:48:34 2021 +0200 @@ -199,6 +199,11 @@ return 'RHG_INSTALLED_AS_HG' in os.environ +@check("pyoxidizer", "running with pyoxidizer build as 'hg'") +def has_rhg(): + return 'PYOXIDIZED_INSTALLED_AS_HG' in os.environ + + @check("cvs", "cvs client/server") def has_cvs(): re = br'Concurrent Versions System.*?server' diff -r 981cef5188c3 -r 94158c541c74 tests/run-tests.py --- a/tests/run-tests.py Tue Aug 17 14:38:25 2021 +0200 +++ b/tests/run-tests.py Tue Aug 17 20:48:34 2021 +0200 @@ -3241,6 +3241,10 @@ ) full_path = os.path.join(reporootdir, bin_path) self._hgcommand = full_path + # Affects hghave.py + osenvironb[b'PYOXIDIZED_INSTALLED_AS_HG'] = b'1' + else: + osenvironb.pop(b'PYOXIDIZED_INSTALLED_AS_HG', None) osenvironb[b"BINDIR"] = self._bindir osenvironb[b"PYTHON"] = PYTHON