serve: leverage cmdutil.check_incompatible_arguments()
Differential Revision: https://phab.mercurial-scm.org/D9222
--- 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"))