diff mercurial/cmdutil.py @ 44194:d4c1501225c4

cmdutil: change check_incompatible_arguments() *arg to single iterable This makes it clearer on the call-sites that the first argument is special. Thanks to Yuya for the suggestion. Differential Revision: https://phab.mercurial-scm.org/D8018
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 27 Jan 2020 09:14:19 -0800
parents 19533e4c3450
children c791ed6a2154
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon Jan 27 12:38:59 2020 -0800
+++ b/mercurial/cmdutil.py	Mon Jan 27 09:14:19 2020 -0800
@@ -281,11 +281,11 @@
     return previous
 
 
-def check_incompatible_arguments(opts, first, *others):
+def check_incompatible_arguments(opts, first, others):
     """abort if the first argument is given along with any of the others
 
     Unlike check_at_most_one_arg(), `others` are not mutually exclusive
-    among themselves.
+    among themselves, and they're passed as a single collection.
     """
     for other in others:
         check_at_most_one_arg(opts, first, other)