diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1117,7 +1117,7 @@ f = util.nativeeolwriter(os.fdopen(patchfd, r'wb')) chunk.header.write(f) chunk.write(f) - f.write('\n'.join(['# ' + i for i in phelp.splitlines()])) + f.write(''.join(['# ' + i + '\n' for i in phelp.splitlines()])) f.close() # Start the editor and wait for it to complete editor = ui.geteditor()