hgext/mq.py
changeset 4403 15289406f89c
parent 4343 077aafddd35f
child 4409 28b7d949ef6a
--- a/hgext/mq.py	Tue May 01 14:42:54 2007 -0500
+++ b/hgext/mq.py	Tue May 01 13:23:32 2007 -0700
@@ -985,8 +985,11 @@
             if comments:
                 # Remove existing message.
                 ci = 0
+                subj = None
                 for mi in xrange(len(message)):
-                    while message[mi] != comments[ci]:
+                    if comments[ci].lower().startswith('subject: '):
+                        subj = comments[ci][9:]
+                    while message[mi] != comments[ci] and message[mi] != subj:
                         ci += 1
                     del comments[ci]
             comments.append(msg)