Mercurial > hg
comparison tests/run-tests.py @ 47586:a8e33ab50c4f
run-tests: use more explicit signaling for `chg`
Using a dedicated variable is clearer and less fragile. It cannot hurt.
Differential Revision: https://phab.mercurial-scm.org/D11051
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 10 Jul 2021 01:58:34 +0200 |
parents | 5654323832f0 |
children | eb611ecb435c |
comparison
equal
deleted
inserted
replaced
47585:5654323832f0 | 47586:a8e33ab50c4f |
---|---|
3163 real_hg = os.path.join(self._bindir, self._hgcommand) | 3163 real_hg = os.path.join(self._bindir, self._hgcommand) |
3164 osenvironb[b'HGTEST_REAL_HG'] = real_hg | 3164 osenvironb[b'HGTEST_REAL_HG'] = real_hg |
3165 # set CHGHG, then replace "hg" command by "chg" | 3165 # set CHGHG, then replace "hg" command by "chg" |
3166 chgbindir = self._bindir | 3166 chgbindir = self._bindir |
3167 if self.options.chg or self.options.with_chg: | 3167 if self.options.chg or self.options.with_chg: |
3168 osenvironb[b'CHG_INSTALLED_AS_HG'] = b'1' | |
3168 osenvironb[b'CHGHG'] = real_hg | 3169 osenvironb[b'CHGHG'] = real_hg |
3169 else: | 3170 else: |
3170 osenvironb.pop(b'CHGHG', None) # drop flag for hghave | 3171 # drop flag for hghave |
3172 osenvironb.pop(b'CHG_INSTALLED_AS_HG', None) | |
3171 if self.options.chg: | 3173 if self.options.chg: |
3172 self._hgcommand = b'chg' | 3174 self._hgcommand = b'chg' |
3173 elif self.options.with_chg: | 3175 elif self.options.with_chg: |
3174 chgbindir = os.path.dirname(os.path.realpath(self.options.with_chg)) | 3176 chgbindir = os.path.dirname(os.path.realpath(self.options.with_chg)) |
3175 self._hgcommand = os.path.basename(self.options.with_chg) | 3177 self._hgcommand = os.path.basename(self.options.with_chg) |