From patchwork Fri Oct 16 06:03:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9222: serve: leverage cmdutil.check_incompatible_arguments() From: phabricator X-Patchwork-Id: 47480 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 16 Oct 2020 06:03:33 +0000 martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9222 AFFECTED FILES mercurial/commands.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -6316,9 +6316,8 @@ Returns 0 on success. """ + cmdutil.check_incompatible_arguments(opts, 'stdio', ['cmdserver']) opts = pycompat.byteskwargs(opts) - if opts[b"stdio"] and opts[b"cmdserver"]: - raise error.Abort(_(b"cannot use --stdio with --cmdserver")) if opts[b"print_url"] and ui.verbose: raise error.Abort(_(b"cannot use --print-url with --verbose"))