Include branch name in email notification subject

Include branch name in email notification subject, and shorten the subject.
Fixes bug 859620.

Change-Id: I9eea5e051f71918eb417e620749b55eb73c9fc40
This commit is contained in:
Thierry Carrez 2011-10-19 15:02:57 +02:00
parent b47dbcdef0
commit 43153110e6

View File

@ -129,7 +129,8 @@ Branch: %s
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
msg = MIMEMultipart(_subtype='signed',protocol='application/pgp-signature')
msg['Subject'] = 'A change has been merged to %s' % project
short_project = project.split("/")[-1]
msg['Subject'] = 'Fix merged to %s (%s)' % (short_project, branch)
msg['From'] = FROM_ADDRESS
msg['To'] = to_address