diff mercurial/patch.py @ 14832:d60e4f227d75 stable

patch: fix parsing patch files containing CRs not followed by LFs Since 1e64e1e12195 , patch lines containing a CR not followed by a LF would be incorrectly splitten, causing a failure to apply the patch.
author Wagner Bruna <wbruna@softwareexpress.com.br>
date Mon, 04 Jul 2011 19:53:39 -0300
parents a7d5816087a9
children 0588fb0e2e8d db0646afb725
line wrap: on
line diff
--- a/mercurial/patch.py	Tue Jul 05 11:53:32 2011 +0100
+++ b/mercurial/patch.py	Mon Jul 04 19:53:39 2011 -0300
@@ -593,7 +593,7 @@
                 self.exists = backend.exists(self.fname)
             self.missing = False
             if data:
-                self.lines = data.splitlines(True)
+                self.lines = mdiff.splitnewlines(data)
             if self.mode is None:
                 self.mode = mode
             if self.lines: