The lack of a newline means that some "editors" that are useful in
tests, such as echo "+new line" >> "$1" don't work. It's obviously
easy to work around it, but newline at EOF seems like a good practice
anyway.
Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG95e4ae86329f: patch: include newline at EOF in help text for interactive patch
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Amended the following in flight:
diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1117,7 +1117,8 @@ the hunk is left unchanged. f = util.nativeeolwriter(os.fdopen(patchfd, r'wb')) chunk.header.write(f) chunk.write(f) - f.write(''.join(['# ' + i + '\n' 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()