mercurial/patch.py
branchstable
changeset 10729 7a5931c5f2dc
parent 10524 3212afb33116
child 10731 71cf11f03b3d
child 10736 a528a1046dba
--- 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')