changeset 37575 | 230eb9594150 |
parent 37574 | a1bcc7ff0eac |
child 37802 | 090c89a8db32 |
--- a/mercurial/diffhelpers.py Mon Apr 09 21:08:52 2018 +0900 +++ b/mercurial/diffhelpers.py Sat Apr 07 01:37:25 2018 +0900 @@ -33,10 +33,10 @@ if s == "\\ No newline at end of file\n": fixnewline(hunk, a, b) continue - if s == "\n": + if s == '\n' or s == '\r\n': # Some patches may be missing the control char # on empty lines. Supply a leading space. - s = " \n" + s = ' ' + s hunk.append(s) if s.startswith('+'): b.append(s[1:])