Make [PATCH] removal slightly more robust
authorBrendan Cully <brendan@kublai.com>
Tue, 13 Mar 2007 21:54:34 -0700
changeset 4208 bd9b84b9a84b
parent 4207 b7e66db28571
child 4209 dbc3846c09a1
Make [PATCH] removal slightly more robust
mercurial/patch.py
--- a/mercurial/patch.py	Tue Mar 13 21:50:42 2007 -0700
+++ b/mercurial/patch.py	Tue Mar 13 21:54:34 2007 -0700
@@ -60,8 +60,8 @@
         if message:
             if message.startswith('[PATCH'):
                 pend = message.find(']')
-                if pend:
-                    message = message[pend+2:]
+                if pend >= 0:
+                    message = message[pend+1:].lstrip()
             message = message.replace('\n\t', ' ')
             ui.debug('Subject: %s\n' % message)
         if user: