diff -r e96597c8d0ea -r a27af7229850 mercurial/patch.py --- 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