Simplifying Message-Id and In-Reply-To of root message
This commit is contained in:
parent
ac777d5d8c
commit
e7305810d2
1 changed files with 8 additions and 7 deletions
15
master.cfg
15
master.cfg
|
@ -141,6 +141,9 @@ import smtplib
|
|||
import socket
|
||||
from email.mime.text import MIMEText
|
||||
|
||||
def make_try_build_lockfile_name (rev):
|
||||
return "/tmp/gdb-buildbot-%s-try.lock" % rev
|
||||
|
||||
def SendRootMessageGDBTesters (branch, change, rev,
|
||||
istrysched = False,
|
||||
try_to = None,
|
||||
|
@ -148,7 +151,7 @@ def SendRootMessageGDBTesters (branch, change, rev,
|
|||
global GDB_MAIL_TO, GDB_MAIL_FROM
|
||||
|
||||
if istrysched:
|
||||
f = "/tmp/gdb-buildbot-%s-try-%s.lock" % (rev, try_count)
|
||||
f = make_try_build_lockfile_name (rev)
|
||||
else:
|
||||
f = "/tmp/gdb-buildbot-%s.lock" % rev
|
||||
|
||||
|
@ -174,17 +177,15 @@ def SendRootMessageGDBTesters (branch, change, rev,
|
|||
text = text.encode ('ascii', 'ignore').decode ('ascii')
|
||||
else:
|
||||
text = ""
|
||||
text += "*** TEST RESULTS FOR TRY BUILD #%s ***\n\n" % try_count
|
||||
text += "*** TEST RESULTS FOR TRY BUILD ***\n\n"
|
||||
|
||||
text += "Branch: %s\n" % branch
|
||||
text += "Commit tested against: %s\n\n" % rev
|
||||
|
||||
text += "There have been %s tries before this one.\n\n" % try_count
|
||||
|
||||
text += "Patch tested:\n\n"
|
||||
text += change
|
||||
|
||||
chg_title = "Try Build #%s against commit %s" % (try_count, rev)
|
||||
chg_title = "Try Build against commit %s" % rev
|
||||
text = text.encode ('ascii', 'ignore').decode ('ascii')
|
||||
|
||||
mail = MIMEText (text)
|
||||
|
@ -202,7 +203,7 @@ def SendRootMessageGDBTesters (branch, change, rev,
|
|||
else:
|
||||
mail['To'] = try_to
|
||||
mailto = try_to
|
||||
mail['Message-Id'] = "<%s-try-%s@gdb-build>" % (rev, try_count)
|
||||
mail['Message-Id'] = "<%s-try@gdb-build>" % rev
|
||||
|
||||
s = smtplib.SMTP ('localhost')
|
||||
s.sendmail (GDB_MAIL_FROM, [ mailto ], mail.as_string ())
|
||||
|
@ -604,7 +605,7 @@ mn_try = MyMailNotifier(fromaddr = GDB_MAIL_FROM,
|
|||
lookup = LookupEmailTryBuild (),
|
||||
tags = [ "MAIL", "TRY" ],
|
||||
extraHeaders = { 'X-GDB-Buildbot' : '1',
|
||||
'In-Reply-To' : util.Interpolate ("<%(prop:got_revision)s-try-$(prop:try_count)s@gdb-build>")})
|
||||
'In-Reply-To' : util.Interpolate ("<%(prop:got_revision)s-try@gdb-build>")})
|
||||
|
||||
c['status'].append (mn)
|
||||
c['status'].append (mn_try)
|
||||
|
|
Loading…
Reference in a new issue