diff -r 1679d73c9464 -r 217b7d83afc3 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Jun 15 17:04:06 2011 -0300 +++ b/mercurial/cmdutil.py Wed Jun 08 14:54:52 2011 +0300 @@ -76,7 +76,7 @@ if modified or added or removed or deleted: raise util.Abort(_("outstanding uncommitted changes")) -def logmessage(opts): +def logmessage(ui, opts): """ get the log message according to -m and -l option """ message = opts.get('message') logfile = opts.get('logfile') @@ -87,7 +87,7 @@ if not message and logfile: try: if logfile == '-': - message = sys.stdin.read() + message = ui.fin.read() else: message = '\n'.join(util.readfile(logfile).splitlines()) except IOError, inst: @@ -1163,7 +1163,7 @@ date = opts.get('date') if date: opts['date'] = util.parsedate(date) - message = logmessage(opts) + message = logmessage(ui, opts) # extract addremove carefully -- this function can be called from a command # that doesn't support addremove