mercurial/cmdutil.py
changeset 43894 774cee0e95c6
parent 43893 2e672ccc2220
child 43898 023ad45e2fd2
equal deleted inserted replaced
43893:2e672ccc2220 43894:774cee0e95c6
  1054         ctx.sub(s).bailifchanged(hint=hint)
  1054         ctx.sub(s).bailifchanged(hint=hint)
  1055 
  1055 
  1056 
  1056 
  1057 def logmessage(ui, opts):
  1057 def logmessage(ui, opts):
  1058     """ get the log message according to -m and -l option """
  1058     """ get the log message according to -m and -l option """
       
  1059 
       
  1060     check_at_most_one_arg(opts, b'message', b'logfile')
       
  1061 
  1059     message = opts.get(b'message')
  1062     message = opts.get(b'message')
  1060     logfile = opts.get(b'logfile')
  1063     logfile = opts.get(b'logfile')
  1061 
  1064 
  1062     if message and logfile:
       
  1063         raise error.Abort(
       
  1064             _(b'options --message and --logfile are mutually exclusive')
       
  1065         )
       
  1066     if not message and logfile:
  1065     if not message and logfile:
  1067         try:
  1066         try:
  1068             if isstdiofilename(logfile):
  1067             if isstdiofilename(logfile):
  1069                 message = ui.fin.read()
  1068                 message = ui.fin.read()
  1070             else:
  1069             else: