[Updated] D11043: run-tests: explicitly track that `pythondir` was inferred
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Mon Jul 12 02:48:09 UTC 2021
Closed by commit rHG2b2f5cf979c3: run-tests: explicitly track that `pythondir` was inferred (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/D11043?vs=29131&id=29189
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11043/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11043
AFFECTED FILES
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
@@ -3023,6 +3023,8 @@
self._bindir = None
self._tmpbindir = None
self._pythondir = None
+ # True if we had to infer the pythondir from --with-hg
+ self._pythondir_inferred = False
self._coveragefile = None
self._createdfiles = []
self._hgcommand = None
@@ -3139,6 +3141,7 @@
# Fall back to the legacy behavior.
else:
self._pythondir = self._bindir
+ self._pythondir_inferred = True
else:
self._installdir = os.path.join(self._hgtmp, b"install")
@@ -3740,9 +3743,7 @@
def _checkhglib(self, verb):
"""Ensure that the 'mercurial' package imported by python is
the one we expect it to be. If not, print a warning to stderr."""
- if (self._bindir == self._pythondir) and (
- self._bindir != self._tmpbindir
- ):
+ if self._pythondir_inferred:
# The pythondir has been inferred from --with-hg flag.
# We cannot expect anything sensible here.
return
To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210712/285856d5/attachment-0002.html>
More information about the Mercurial-patches
mailing list