From patchwork Fri Aug 23 21:06:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6759: run-tests: error out on `--local --with-[c]hg` From: phabricator X-Patchwork-Id: 41392 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 23 Aug 2019 21:06:07 +0000 martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY I don't see much reason to allow these combinations. You could use --local and override only one of --with-hg or --with-chg, but I don't see much practical use for that. It would be easy to work around anyway by passing both --with-hg and --with-chg. By erroring out, it makes the code a bit easier to reason about to allow the next few patches. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6759 AFFECTED FILES tests/run-tests.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -493,6 +493,8 @@ 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') testdir = os.path.dirname(_bytespath(canonpath(sys.argv[0]))) reporootdir = os.path.dirname(testdir) pathandattrs = [(b'hg', 'with_hg')]