Mercurial > hg
comparison tests/run-tests.py @ 48863:c76255cde807
tests: unconditionalize _bytes2sys()
As part of requiring Python 3.
Differential Revision: https://phab.mercurial-scm.org/D12241
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Feb 2022 13:24:25 -0700 |
parents | 2336e79a119c |
children | a2f0af520ae5 |
comparison
equal
deleted
inserted
replaced
48862:2336e79a119c | 48863:c76255cde807 |
---|---|
3788 the current Python interpreter.""" | 3788 the current Python interpreter.""" |
3789 if self._hgpath is not None: | 3789 if self._hgpath is not None: |
3790 return self._hgpath | 3790 return self._hgpath |
3791 | 3791 |
3792 cmd = b'"%s" -c "import mercurial; print (mercurial.__path__[0])"' | 3792 cmd = b'"%s" -c "import mercurial; print (mercurial.__path__[0])"' |
3793 cmd = cmd % PYTHON | 3793 cmd = _bytes2sys(cmd % PYTHON) |
3794 if PYTHON3: | |
3795 cmd = _bytes2sys(cmd) | |
3796 | 3794 |
3797 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) | 3795 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) |
3798 out, err = p.communicate() | 3796 out, err = p.communicate() |
3799 | 3797 |
3800 self._hgpath = out.strip() | 3798 self._hgpath = out.strip() |