diff hgext/mq.py @ 10730:4d6bd7b8b6d8 stable

mq: allow lines starting with '--- ' in patch messages
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 18 Mar 2010 19:26:56 +0100
parents a778a367c20b
children 71cf11f03b3d 32023a0a389b
line wrap: on
line diff
--- a/hgext/mq.py	Thu Mar 18 18:22:34 2010 +0100
+++ b/hgext/mq.py	Thu Mar 18 19:26:56 2010 +0100
@@ -96,13 +96,11 @@
 
         for line in file(pf):
             line = line.rstrip()
-            if line.startswith('diff --git'):
+            if (line.startswith('diff --git')
+                or (diffstart and line.startswith('+++ '))):
                 diffstart = 2
                 break
-            if diffstart:
-                if line.startswith('+++ '):
-                    diffstart = 2
-                break
+            diffstart = 0 # reset
             if line.startswith("--- "):
                 diffstart = 1
                 continue