Patchwork D9222: serve: leverage cmdutil.check_incompatible_arguments()

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2020, 6:03 a.m.
Message ID <differential-rev-PHID-DREV-p2icl7syo26wzysfhvfr-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47480/
State Superseded
Headers show

Comments

phabricator - Oct. 16, 2020, 6:03 a.m.
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

Patch

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"))