D6760: run-tests: handle --local before --with-hg
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Aug 27 17:00:13 EDT 2019
Closed by commit rHG69506e1b3214: run-tests: handle --local before --with-hg (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6760?vs=16303&id=16325
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D6760/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D6760
AFFECTED FILES
tests/run-tests.py
CHANGE DETAILS
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -484,14 +484,6 @@
if 'java' in sys.platform or '__pypy__' in sys.modules:
options.pure = True
- if options.with_hg:
- options.with_hg = canonpath(_bytespath(options.with_hg))
- if not (os.path.isfile(options.with_hg) and
- os.access(options.with_hg, os.X_OK)):
- parser.error('--with-hg must specify an executable hg script')
- if os.path.basename(options.with_hg) not in [b'hg', b'hg.exe']:
- sys.stderr.write('warning: --with-hg should specify an hg script\n')
- sys.stderr.flush()
if options.local:
if options.with_hg or options.with_chg:
parser.error('--local cannot be used with --with-hg or --with-chg')
@@ -505,7 +497,16 @@
if os.name != 'nt' and not os.access(binpath, os.X_OK):
parser.error('--local specified, but %r not found or '
'not executable' % binpath)
- setattr(options, attr, binpath)
+ setattr(options, attr, _strpath(binpath))
+
+ if options.with_hg:
+ options.with_hg = canonpath(_bytespath(options.with_hg))
+ if not (os.path.isfile(options.with_hg) and
+ os.access(options.with_hg, os.X_OK)):
+ parser.error('--with-hg must specify an executable hg script')
+ if os.path.basename(options.with_hg) not in [b'hg', b'hg.exe']:
+ sys.stderr.write('warning: --with-hg should specify an hg script\n')
+ sys.stderr.flush()
if (options.chg or options.with_chg) and os.name == 'nt':
parser.error('chg does not work on %s' % os.name)
To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list