Show More
@@ -285,11 +285,12 b' def parseargs(args, parser):' | |||||
285 | options.pure = True |
|
285 | options.pure = True | |
286 |
|
286 | |||
287 | if options.with_hg: |
|
287 | if options.with_hg: | |
288 |
options.with_hg = os.path.realpath( |
|
288 | options.with_hg = os.path.realpath( | |
|
289 | os.path.expanduser(_bytespath(options.with_hg))) | |||
289 | if not (os.path.isfile(options.with_hg) and |
|
290 | if not (os.path.isfile(options.with_hg) and | |
290 | os.access(options.with_hg, os.X_OK)): |
|
291 | os.access(options.with_hg, os.X_OK)): | |
291 | parser.error('--with-hg must specify an executable hg script') |
|
292 | parser.error('--with-hg must specify an executable hg script') | |
292 | if not os.path.basename(options.with_hg) == 'hg': |
|
293 | if not os.path.basename(options.with_hg) == b'hg': | |
293 | sys.stderr.write('warning: --with-hg should specify an hg script\n') |
|
294 | sys.stderr.write('warning: --with-hg should specify an hg script\n') | |
294 | if options.local: |
|
295 | if options.local: | |
295 | testdir = os.path.dirname(_bytespath(os.path.realpath(sys.argv[0]))) |
|
296 | testdir = os.path.dirname(_bytespath(os.path.realpath(sys.argv[0]))) | |
@@ -1922,12 +1923,6 b' class TestRunner(object):' | |||||
1922 | if self.options.with_hg: |
|
1923 | if self.options.with_hg: | |
1923 | self._installdir = None |
|
1924 | self._installdir = None | |
1924 | whg = self.options.with_hg |
|
1925 | whg = self.options.with_hg | |
1925 | # If --with-hg is not specified, we have bytes already, |
|
|||
1926 | # but if it was specified in python3 we get a str, so we |
|
|||
1927 | # have to encode it back into a bytes. |
|
|||
1928 | if PYTHON3: |
|
|||
1929 | if not isinstance(whg, bytes): |
|
|||
1930 | whg = _bytespath(whg) |
|
|||
1931 | self._bindir = os.path.dirname(os.path.realpath(whg)) |
|
1926 | self._bindir = os.path.dirname(os.path.realpath(whg)) | |
1932 | assert isinstance(self._bindir, bytes) |
|
1927 | assert isinstance(self._bindir, bytes) | |
1933 | self._tmpbindir = os.path.join(self._hgtmp, b'install', b'bin') |
|
1928 | self._tmpbindir = os.path.join(self._hgtmp, b'install', b'bin') |
General Comments 0
You need to be logged in to leave comments.
Login now