Bug 1072163 - Remove links to TBPL from Try server emails
authorEd Morley <emorley@mozilla.com>
Wed, 24 Dec 2014 23:52:05 +0000 (2014-12-24)
changeset 4025 30f690bd597f65d3e3777ff7c182efcce898451e
parent 4022 23df141cf12dcbfaddcf40c4061c40597b48d8bb
child 4027 8a89f69f652ff6218c4a20c4f19eb1b3bea46601
child 4028 c5fc38e6fc3e03099deeb63a211f5acf88023eb2
push id3330
push useremorley@mozilla.com
push dateWed, 24 Dec 2014 23:52:29 +0000 (2014-12-24)
bugs1072163
Bug 1072163 - Remove links to TBPL from Try server emails
bin/try_mailer.py
status/generators.py
--- a/bin/try_mailer.py
+++ b/bin/try_mailer.py
@@ -62,19 +62,17 @@ def makeTryMessage(build, log_url):
         who = props['who']
     else:
         users = build.getResponsibleUsers()
         if users:
             who = users[0]
         else:
             raise ValueError("I don't know who did this build")
 
-    branch = props['branch']
-    tree = 'try-comm-central' if 'comm' in branch else 'try'
-    tbpl_tree = 'Thunderbird-Try' if 'comm' in branch else 'Try'
+    tree = props['branch']
 
     if 'got_revision' in props:
         revision = props['got_revision'][:12]
     elif 'revision' in props:
         revision = props['revision'][:12]
     else:
         revision = 'unknown'
 
@@ -120,22 +118,22 @@ Your %(tree)s Server %(task)s (%(revisio
             summary = summary.replace('<br>', '')
             summary = re.sub("\n\n*", "\n", summary)
             text += '%s\n\n' % summary
 
     if log_url:
         log_url = log_url.replace('://stage', '://ftp')
         text += "The full log for this %(task)s run is available at <a href=\"%(log_url)s\">%(log_url)s</a>.\n\n" % locals()
 
-    text += "For an overview of all results see <a href=\"https://treeherder.mozilla.org/#/jobs?repo=%(tree)s&revision=%(revision)s\">Treeherder</a>.\n" % locals()
-    text += "Alternatively, view them on <a href=\"https://tbpl.mozilla.org/?tree=%(tbpl_tree)s&rev=%(revision)s\">TBPL</a> (soon to be deprecated).\n" % locals()
+    treeherder_url = "https://treeherder.mozilla.org/#/jobs?repo=%(tree)s&revision=%(revision)s" % locals()
+    text += "For an overview of all results see <a href=\"%(treeherder_url)\">Treeherder</a>.\n" % locals()
     text = re.sub("\n", "<br>\n", text)
 
-    headers = {"In-Reply-To": "<%(branch)s-%(revision)s>" % locals(),
-               "References": "<%(branch)s-%(revision)s>" % locals(),
+    headers = {"In-Reply-To": "<%(tree)s-%(revision)s>" % locals(),
+               "References": "<%(tree)s-%(revision)s>" % locals(),
                }
 
     return dict(
         subject=subject,
         body=text,
         headers=headers,
         author=who,
         type='html',
--- a/status/generators.py
+++ b/status/generators.py
@@ -1,32 +1,27 @@
 import re
 
 
 def buildTryChangeMessage(change, packageDir):
     got_revision = revision = change.revision[:12]
     who = change.who
-    branch = change.branch
-    tree = 'try-comm-central' if 'comm' in branch else 'try'
-    tbpl_tree = 'Thunderbird-Try' if 'comm' in branch else 'Try'
+    tree = change.branch
     packageDir = packageDir % locals()
     msgdict = {"type": "plain"}
     msgdict['subject'] = "%(tree)s submission %(revision)s" % locals()
-    msgdict['headers'] = {"In-Reply-To": "<%(branch)s-%(revision)s>" % locals(),
-                          "References": "<%(branch)s-%(revision)s>" % locals(),
+    msgdict['headers'] = {"In-Reply-To": "<%(tree)s-%(revision)s>" % locals(),
+                          "References": "<%(tree)s-%(revision)s>" % locals(),
                           }
     msgdict["body"] = """\
 Thank you for your try submission. It's the best!
 
 Results will be displayed on Treeherder as they come in:
 https://treeherder.mozilla.org/#/jobs?repo=%(tree)s&revision=%(revision)s
 
-Alternatively, view them on TBPL (soon to be deprecated):
-https://tbpl.mozilla.org/?tree=%(tbpl_tree)s&rev=%(revision)s
-
 Once completed, builds and logs will be available at:
 %(packageDir)s
 """ % locals()
 
     commitTitles = change.properties.getProperty('commit_titles')
     if commitTitles:
         title = getSensibleCommitTitle(commitTitles)
         allTitles = '\n  * '.join(commitTitles)