|
|
@@ -17,13 +17,16 @@ import sys
|
|
|
# Retrieve the issues email from MetaComm, trying a few times in case
|
|
|
# something wonky is happening.
|
|
|
# Returns the list of failing libraries
|
|
|
-def get_issues_email():
|
|
|
+def get_issues_email(branch):
|
|
|
got_issues = False
|
|
|
print 'Retrieving issues email...'
|
|
|
for x in range(30):
|
|
|
if not ('--no-get' in sys.argv):
|
|
|
# Update issues-email.txt
|
|
|
- os.system('curl -O http://engineering.meta-comm.com/boost-regression/CVS-HEAD/developer/issues-email.txt')
|
|
|
+ url = "http://engineering.meta-comm.com/boost-regression/CVS-"
|
|
|
+ url += branch
|
|
|
+ url += "/developer/issues-email.txt"
|
|
|
+ os.system('curl -O ' + url)
|
|
|
|
|
|
# Determine the set of libraries that have unresolved failures
|
|
|
failing_libraries = {}
|
|
|
@@ -68,7 +71,7 @@ def get_library_maintainers():
|
|
|
# Send a message to "person" (a maintainer of a library that is
|
|
|
# failing).
|
|
|
# maintainers is the result of get_library_maintainers()
|
|
|
-def send_individualized_message (person, maintainers):
|
|
|
+def send_individualized_message (branch, person, maintainers):
|
|
|
|
|
|
print ('Message for ' + person[0] + ' <' + person[1] + '>' + ' contains:')
|
|
|
|
|
|
@@ -79,7 +82,7 @@ To: """
|
|
|
message += """
|
|
|
Reply-To: boost@lists.boost.org
|
|
|
Subject: Regressions in your Boost libraries as of """
|
|
|
- message += str(datetime.date.today())
|
|
|
+ message += str(datetime.date.today()) + " [" + branch + "]"
|
|
|
message += """
|
|
|
|
|
|
You are receiving this report because one or more of the libraries you
|
|
|
@@ -106,7 +109,7 @@ Detailed report:
|
|
|
if lfm:
|
|
|
# Pass the line through if the current person is a
|
|
|
# maintainer of this library
|
|
|
- if person in maintainers[lfm.group(1)]:
|
|
|
+ if lfm.group(1) in maintainers and person in maintainers[lfm.group(1)]:
|
|
|
message += line
|
|
|
print line,
|
|
|
|
|
|
@@ -120,7 +123,7 @@ Detailed report:
|
|
|
if state == 0:
|
|
|
message += '\n'
|
|
|
|
|
|
- if person in maintainers[lib_start.group(1)]:
|
|
|
+ if lib_start.group(1) in maintainers and person in maintainers[lib_start.group(1)]:
|
|
|
message += line
|
|
|
state = 2
|
|
|
else:
|
|
|
@@ -147,7 +150,7 @@ Detailed report:
|
|
|
|
|
|
|
|
|
# Send a message to the developer's list
|
|
|
-def send_boost_developers_message(maintainers, failing_libraries):
|
|
|
+def send_boost_developers_message(branch, maintainers, failing_libraries):
|
|
|
to_line = 'boost@lists.boost.org'
|
|
|
from_line = 'Douglas Gregor <dgregor@cs.indiana.edu>'
|
|
|
|
|
|
@@ -156,7 +159,7 @@ To: boost@lists.boost.org
|
|
|
Reply-To: boost@lists.boost.org
|
|
|
Subject: Boost regression notification ("""
|
|
|
|
|
|
- message += str(datetime.date.today())
|
|
|
+ message += str(datetime.date.today()) + " [" + branch + "]"
|
|
|
message += ")"
|
|
|
|
|
|
message += """
|
|
|
@@ -169,7 +172,7 @@ Subject: Boost regression notification ("""
|
|
|
if line.startswith('Detailed report:'):
|
|
|
missing_maintainers = False
|
|
|
for lib in failing_libraries:
|
|
|
- if maintainers[lib] == list():
|
|
|
+ if not(lib in maintainers) or maintainers[lib] == list():
|
|
|
missing_maintainers = True
|
|
|
|
|
|
if missing_maintainers:
|
|
|
@@ -179,7 +182,7 @@ entry to libs/maintainers.txt to eliminate this message.
|
|
|
"""
|
|
|
|
|
|
for lib in failing_libraries:
|
|
|
- if maintainers[lib] == list():
|
|
|
+ if not(lib in maintainers) or maintainers[lib] == list():
|
|
|
message += ' ' + lib + '\n'
|
|
|
message += '\n'
|
|
|
|
|
|
@@ -200,19 +203,27 @@ entry to libs/maintainers.txt to eliminate this message.
|
|
|
###############################################################################
|
|
|
|
|
|
maintainers = get_library_maintainers()
|
|
|
-failing_libraries = get_issues_email()
|
|
|
+
|
|
|
+# Parse command-line options
|
|
|
+branch = "HEAD"
|
|
|
+for arg in sys.argv:
|
|
|
+ if arg.startswith("--branch="):
|
|
|
+ branch = arg[len("--branch="):]
|
|
|
+
|
|
|
+failing_libraries = get_issues_email(branch)
|
|
|
|
|
|
# Compute the set of maintainers that should receive notification
|
|
|
cc_list = {}
|
|
|
for lib in failing_libraries:
|
|
|
- for maintainer in maintainers[lib]:
|
|
|
- cc_list[maintainer] = {}
|
|
|
+ if lib in maintainers:
|
|
|
+ for maintainer in maintainers[lib]:
|
|
|
+ cc_list[maintainer] = {}
|
|
|
|
|
|
# Send out individualized e-mail for each maintainer
|
|
|
for maintainer in cc_list:
|
|
|
- send_individualized_message(maintainer, maintainers)
|
|
|
+ send_individualized_message(branch, maintainer, maintainers)
|
|
|
|
|
|
-send_boost_developers_message(maintainers, failing_libraries)
|
|
|
+send_boost_developers_message(branch, maintainers, failing_libraries)
|
|
|
|
|
|
if not ('--send' in sys.argv):
|
|
|
print 'Chickening out and not sending any e-mail.'
|