Mercurial > public > mercurial-scm > hg-stable
changeset 52540:7fd3a9309d0e
run-test: keep track of the "real hg" binary before we replace it with a proxy
When using `--rhg` or `--chg`, the `_hgcommand` attribute get replaced because
we actually install them. This make it hard to refer to the installed hg in
_installhg. So we keep track of it in a new attribute that we will use in the
next few patches.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 13 Dec 2024 09:43:42 +0000 |
parents | c2ee1ad78414 |
children | 824877fd613b |
files | tests/run-tests.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Thu Dec 12 15:00:44 2024 +0000 +++ b/tests/run-tests.py Fri Dec 13 09:43:42 2024 +0000 @@ -3388,13 +3388,13 @@ ): self._hgcommand += b'.exe' - real_hg = os.path.join(self._bindir, self._hgcommand) - osenvironb[b'HGTEST_REAL_HG'] = real_hg + self._real_hg = os.path.join(self._bindir, self._hgcommand) + osenvironb[b'HGTEST_REAL_HG'] = self._real_hg # set CHGHG, then replace "hg" command by "chg" chgbindir = self._bindir if self.options.chg or self.options.with_chg: osenvironb[b'CHG_INSTALLED_AS_HG'] = b'1' - osenvironb[b'CHGHG'] = real_hg + osenvironb[b'CHGHG'] = self._real_hg else: # drop flag for hghave osenvironb.pop(b'CHG_INSTALLED_AS_HG', None) @@ -3414,7 +3414,7 @@ # `--config` but that disrupts tests that print command lines and check expected # output. osenvironb[b'RHG_ON_UNSUPPORTED'] = b'fallback' - osenvironb[b'RHG_FALLBACK_EXECUTABLE'] = real_hg + osenvironb[b'RHG_FALLBACK_EXECUTABLE'] = self._real_hg else: # drop flag for hghave osenvironb.pop(b'RHG_INSTALLED_AS_HG', None)