# HG changeset patch # User Mads Kiilerich # Date 2009-09-09 23:56:25 # Node ID f01a22096f1f2e70a527abebfb6be4437304bd2d # Parent d1b135f2f4153e815e777690605fac18aed9863d transplant: Add trailing LF in tmp file for filtering Transplant filtering used a tmp file ending with the (stripped) commit message and thus no final LF. Text files not ending with LF is usually not used on Unix and is thus wrong ;-) The missing LF had bad consequences because Solaris sed chokes on unterminated input lines, so echo -n foo|sed 's,o,0,g' doesn't output anything, and the filter used in tests/test-transplant thus stripped the last (and only) line in the message away on solaris. diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -182,7 +182,7 @@ class transplanter(object): fp.write("# HG changeset patch\n") fp.write("# User %s\n" % user) fp.write("# Date %d %d\n" % date) - fp.write(changelog[4]) + fp.write(msg + '\n') fp.close() try: