D6124: patch: include newline at EOF in help text for interactive patch

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Mar 19 14:32:15 EDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG95e4ae86329f: patch: include newline at EOF in help text for interactive patch (authored by martinvonz, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D6124?vs=14479&id=14562#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6124?vs=14479&id=14562

REVISION DETAIL
  https://phab.mercurial-scm.org/D6124

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -1117,7 +1117,8 @@
                     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()



To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list