mercurial/cmdutil.py
changeset 43894 774cee0e95c6
parent 43893 2e672ccc2220
child 43898 023ad45e2fd2
--- a/mercurial/cmdutil.py	Thu Dec 12 14:54:38 2019 -0800
+++ b/mercurial/cmdutil.py	Thu Dec 12 15:10:44 2019 -0800
@@ -1056,13 +1056,12 @@
 
 def logmessage(ui, opts):
     """ get the log message according to -m and -l option """
+
+    check_at_most_one_arg(opts, b'message', b'logfile')
+
     message = opts.get(b'message')
     logfile = opts.get(b'logfile')
 
-    if message and logfile:
-        raise error.Abort(
-            _(b'options --message and --logfile are mutually exclusive')
-        )
     if not message and logfile:
         try:
             if isstdiofilename(logfile):