changeset 45744:4df5d3965a3e

serve: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9222
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Oct 2020 22:36:17 -0700
parents 3b23cec4953f
children 94f681b84c70
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Oct 15 22:36:08 2020 -0700
+++ b/mercurial/commands.py	Thu Oct 15 22:36:17 2020 -0700
@@ -6317,9 +6317,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"))