mercurial/cmdutil.py
changeset 43904 023ad45e2fd2
parent 43900 774cee0e95c6
child 43905 fff21278554b
--- a/mercurial/cmdutil.py	Thu Dec 12 15:51:09 2019 -0800
+++ b/mercurial/cmdutil.py	Thu Dec 12 22:30:59 2019 -0800
@@ -272,6 +272,16 @@
             previous = x
 
 
+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.
+    """
+    for other in others:
+        check_at_most_one_arg(opts, first, other)
+
+
 def resolvecommitoptions(ui, opts):
     """modify commit options dict to handle related options