mercurial/commands.py
changeset 43900 3b50de911200
parent 43895 287556e71f85
child 43901 5cde16489b42
--- a/mercurial/commands.py	Thu Dec 12 15:55:33 2019 -0800
+++ b/mercurial/commands.py	Thu Dec 12 23:31:17 2019 -0800
@@ -1226,13 +1226,9 @@
     rev = opts.get(b'rev')
     inactive = opts.get(b'inactive')  # meaning add/rename to inactive bookmark
 
-    selactions = [k for k in [b'delete', b'rename', b'list'] if opts.get(k)]
-    if len(selactions) > 1:
-        raise error.Abort(
-            _(b'--%s and --%s are incompatible') % tuple(selactions[:2])
-        )
-    if selactions:
-        action = selactions[0]
+    action = cmdutil.check_at_most_one_arg(opts, b'delete', b'rename', b'list')
+    if action:
+        pass
     elif names or rev:
         action = b'add'
     elif inactive: