comparison mercurial/cmdutil.py @ 7667:bd5c37d792e6

cmdutil.logmessage: options should be optional
author Alexander Solovyov <piranha@piranha.org.ua>
date Mon, 19 Jan 2009 12:38:54 +0200
parents 9a1ea6587557
children fece056bf240
comparison
equal deleted inserted replaced
7666:2ad81e9b075b 7667:bd5c37d792e6
66 if modified or added or removed or deleted: 66 if modified or added or removed or deleted:
67 raise util.Abort(_("outstanding uncommitted changes")) 67 raise util.Abort(_("outstanding uncommitted changes"))
68 68
69 def logmessage(opts): 69 def logmessage(opts):
70 """ get the log message according to -m and -l option """ 70 """ get the log message according to -m and -l option """
71 message = opts['message'] 71 message = opts.get('message')
72 logfile = opts['logfile'] 72 logfile = opts.get('logfile')
73 73
74 if message and logfile: 74 if message and logfile:
75 raise util.Abort(_('options --message and --logfile are mutually ' 75 raise util.Abort(_('options --message and --logfile are mutually '
76 'exclusive')) 76 'exclusive'))
77 if not message and logfile: 77 if not message and logfile: