mercurial/patch.py
branchstable
changeset 10501 a27af7229850
parent 10467 16c68fd720ab
child 10518 5fe51d348daf
--- a/mercurial/patch.py	Thu Feb 18 10:32:51 2010 +0100
+++ b/mercurial/patch.py	Thu Feb 18 10:46:01 2010 -0800
@@ -157,8 +157,8 @@
             if line.split(':', 1)[0].lower() in mimeheaders:
                 # let email parser handle this
                 return mimesplit(stream, cur)
-        elif inheader:
-            # No evil headers seen, split by hand
+        elif line.startswith('--- ') and inheader:
+            # No evil headers seen by diff start, split by hand
             return headersplit(stream, cur)
         # Not enough info, keep reading