cmdutil: normalize log message eols when reading from file
This will be necessary once util.readfile() operates in binary mode. While
changelog.add() already normalizes the message, doing so in logmessage() is
required as ui.edit() or others expect messages with LF only.
--- a/mercurial/cmdutil.py Sat May 07 21:12:30 2011 +0200
+++ b/mercurial/cmdutil.py Sat May 07 21:12:33 2011 +0200
@@ -91,7 +91,7 @@
if logfile == '-':
message = sys.stdin.read()
else:
- message = util.readfile(logfile)
+ message = '\n'.join(util.readfile(logfile).splitlines())
except IOError, inst:
raise util.Abort(_("can't read commit message '%s': %s") %
(logfile, inst.strerror))