equal
deleted
inserted
replaced
3021 self._hgtmp = None |
3021 self._hgtmp = None |
3022 self._installdir = None |
3022 self._installdir = None |
3023 self._bindir = None |
3023 self._bindir = None |
3024 self._tmpbindir = None |
3024 self._tmpbindir = None |
3025 self._pythondir = None |
3025 self._pythondir = None |
|
3026 # True if we had to infer the pythondir from --with-hg |
|
3027 self._pythondir_inferred = False |
3026 self._coveragefile = None |
3028 self._coveragefile = None |
3027 self._createdfiles = [] |
3029 self._createdfiles = [] |
3028 self._hgcommand = None |
3030 self._hgcommand = None |
3029 self._hgpath = None |
3031 self._hgpath = None |
3030 self._portoffset = 0 |
3032 self._portoffset = 0 |
3137 elif re.search(b'/rust/target/[^/]+/hg', normbin): |
3139 elif re.search(b'/rust/target/[^/]+/hg', normbin): |
3138 self._pythondir = os.path.dirname(self._testdir) |
3140 self._pythondir = os.path.dirname(self._testdir) |
3139 # Fall back to the legacy behavior. |
3141 # Fall back to the legacy behavior. |
3140 else: |
3142 else: |
3141 self._pythondir = self._bindir |
3143 self._pythondir = self._bindir |
|
3144 self._pythondir_inferred = True |
3142 |
3145 |
3143 else: |
3146 else: |
3144 self._installdir = os.path.join(self._hgtmp, b"install") |
3147 self._installdir = os.path.join(self._hgtmp, b"install") |
3145 self._bindir = os.path.join(self._installdir, b"bin") |
3148 self._bindir = os.path.join(self._installdir, b"bin") |
3146 self._hgcommand = b'hg' |
3149 self._hgcommand = b'hg' |
3738 osenvironb[b'COVERAGE_DIR'] = covdir |
3741 osenvironb[b'COVERAGE_DIR'] = covdir |
3739 |
3742 |
3740 def _checkhglib(self, verb): |
3743 def _checkhglib(self, verb): |
3741 """Ensure that the 'mercurial' package imported by python is |
3744 """Ensure that the 'mercurial' package imported by python is |
3742 the one we expect it to be. If not, print a warning to stderr.""" |
3745 the one we expect it to be. If not, print a warning to stderr.""" |
3743 if (self._bindir == self._pythondir) and ( |
3746 if self._pythondir_inferred: |
3744 self._bindir != self._tmpbindir |
|
3745 ): |
|
3746 # The pythondir has been inferred from --with-hg flag. |
3747 # The pythondir has been inferred from --with-hg flag. |
3747 # We cannot expect anything sensible here. |
3748 # We cannot expect anything sensible here. |
3748 return |
3749 return |
3749 expecthg = os.path.join(self._pythondir, b'mercurial') |
3750 expecthg = os.path.join(self._pythondir, b'mercurial') |
3750 actualhg = self._gethgpath() |
3751 actualhg = self._gethgpath() |