[Updated] D11283: pyoxidized: add a `pyoxidizer` hghave keyword for line matching

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Aug 18 04:45:48 UTC 2021


Closed by commit rHG94158c541c74: pyoxidized: add a `pyoxidizer` hghave keyword for line matching (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11283?vs=29892&id=29902

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11283/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11283

AFFECTED FILES
  tests/hghave.py
  tests/run-tests.py

CHANGE DETAILS

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -199,6 +199,11 @@
     return 'RHG_INSTALLED_AS_HG' in os.environ
 
 
+ at 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'



To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210818/414ed08d/attachment-0002.html>


More information about the Mercurial-patches mailing list