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

login
register
mail settings
Submitter phabricator
Date March 19, 2019, 6:32 p.m.
Message ID <ec426eebeeafa3965e92d7fa383d088c@localhost.localdomain>
Download mbox | patch
Permalink /patch/39336/
State Not Applicable
Headers show

Comments

phabricator - March 19, 2019, 6:32 p.m.
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




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

Patch

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()