diff -r 4a70178f9bde -r 7a5931c5f2dc mercurial/patch.py --- a/mercurial/patch.py Thu Mar 18 16:38:07 2010 +0100 +++ b/mercurial/patch.py Thu Mar 18 18:22:34 2010 +0100 @@ -178,7 +178,8 @@ # (this heuristic is borrowed from quilt) diffre = re.compile(r'^(?:Index:[ \t]|diff[ \t]|RCS file: |' r'retrieving revision [0-9]+(\.[0-9]+)*$|' - r'(---|\*\*\*)[ \t])', re.MULTILINE) + r'(---|\*\*\*)[ \t].*?' + r'^(\+\+\+|\*\*\*)[ \t])', re.MULTILINE|re.DOTALL) fd, tmpname = tempfile.mkstemp(prefix='hg-patch-') tmpfp = os.fdopen(fd, 'w')