changeset 38329 | f47608575c10 |
parent 38165 | 2ce60954b1b7 |
child 38332 | 7b12a2d2eedc |
--- a/mercurial/patch.py Sat Jun 16 17:36:44 2018 +0900 +++ b/mercurial/patch.py Sat Jun 16 17:53:51 2018 +0900 @@ -707,7 +707,7 @@ if self.eolmode != 'strict' and eol and eol != '\n': rawlines = [] for l in lines: - if l and l[-1] == '\n': + if l and l.endswith('\n'): l = l[:-1] + eol rawlines.append(l) lines = rawlines