Allow ':' in the subject of imported messages
authorCatalin Marinas <catalin.marinas@gmail.com>
Thu, 28 Jul 2005 16:30:10 +0000 (17:30 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 28 Jul 2005 16:30:10 +0000 (17:30 +0100)
Initially, the 'import' command used to remove the 'word:' expression
from the subject line of an e-mail. This might actually be useful
for a big system with sub-systems.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/imprt.py

index 5e3eddd..de735c4 100644 (file)
@@ -81,10 +81,9 @@ def __parse_mail(filename = None):
             # end of headers
             break
 
-    # remove extra '[*PATCH]', 'name:' in the subject
+    # remove the '[*PATCH*]' expression in the subject
     if descr:
-        descr = re.findall('^(\[[^\s]*PATCH.*?\])?\s*([^\s]*:)?\s*(.*)$',
-                           descr)[0][2]
+        descr = re.findall('^(\[[^\s]*PATCH.*?\])?\s*(.*)$', descr)[0][1]
         descr += '\n\n'
     else:
         raise CmdException, 'Subject: line not found'