Bug 629847 - treeclosure hook fetches 2MB of HTML to get at a few hundred bytes that are in TreeName/status.html; comm-central part. r=Standard8
authorJustin Wood <bugspam.Callek@gmail.com>
Wed, 02 Feb 2011 11:20:52 +0000
changeset 48 2d46d51d3a3042fdcb732007bd2da35dd3ce5e27
parent 47 04b0488534f5bb49d091ea3d9a56bfe64a1a4d13
child 49 905412e3754fc44646f3112b407f8cf49712d3f9
push id15
push userbugzilla@standard8.plus.com
push dateWed, 02 Feb 2011 11:21:35 +0000
reviewersStandard8
bugs629847
Bug 629847 - treeclosure hook fetches 2MB of HTML to get at a few hundred bytes that are in TreeName/status.html; comm-central part. r=Standard8
mozhghooks/treeclosure_comm_central.py
runtests.py
--- a/mozhghooks/treeclosure_comm_central.py
+++ b/mozhghooks/treeclosure_comm_central.py
@@ -30,34 +30,34 @@ calendarOwns = [
 seamonkeyOwns = [
   'suite'
 ]
 # Everything else is assumed to be controlled by Thunderbird.
 
 
 # Thunderbird tinderbox trees
 thunderbirdTrees = {
-  'comm-central': 'http://tinderbox.mozilla.org/Thunderbird/',
-  'comm-1.9.1'  : 'http://tinderbox.mozilla.org/Thunderbird3.0/',
-  'comm-1.9.2'  : 'http://tinderbox.mozilla.org/Thunderbird3.1/'
+  'comm-central': 'http://tinderbox.mozilla.org/Thunderbird/status.html',
+  'comm-1.9.1'  : 'http://tinderbox.mozilla.org/Thunderbird3.0/status.html',
+  'comm-1.9.2'  : 'http://tinderbox.mozilla.org/Thunderbird3.1/status.html'
 }
 # SeaMonkey tinderbox trees
 seamonkeyTrees = {
-  'comm-central': 'http://tinderbox.mozilla.org/SeaMonkey/',
-  'comm-1.9.1'  : 'http://tinderbox.mozilla.org/SeaMonkey2.0/',
+  'comm-central': 'http://tinderbox.mozilla.org/SeaMonkey/status.html',
+  'comm-1.9.1'  : 'http://tinderbox.mozilla.org/SeaMonkey2.0/status.html',
    # SeaMonkey doesn't support 1.9.2. So therefore just point it at the
    # Thunderbird tree so that if cross-app patches get pushed, we don't get
    # the annoying message saying that the SeaMonkey tree can't be found.
-  'comm-1.9.2'  : 'http://tinderbox.mozilla.org/Thunderbird3.1/'
+  'comm-1.9.2'  : 'http://tinderbox.mozilla.org/Thunderbird3.1/status.html'
 }
 # Calendar tinderbox trees
 calendarTrees = {
-  'comm-central': 'http://tinderbox.mozilla.org/Sunbird/',
-  'comm-1.9.1'  : 'http://tinderbox.mozilla.org/Calendar1.0/',
-  'comm-1.9.2'  : 'http://tinderbox.mozilla.org/Calendar1.0/',
+  'comm-central': 'http://tinderbox.mozilla.org/Sunbird/status.html',
+  'comm-1.9.1'  : 'http://tinderbox.mozilla.org/Calendar1.0/status.html',
+  'comm-1.9.2'  : 'http://tinderbox.mozilla.org/Calendar1.0/status.html',
 }
 
 
 magicwords = "CLOSED TREE"
 
 # This function actually does the checking to see if a tree is closed or set
 # to approval required.
 def checkTreeState(repo, repoName, treeName, treeUrl):
--- a/runtests.py
+++ b/runtests.py
@@ -353,17 +353,17 @@ class TestTreeCommCentralClosureHook(Clo
     shutil.rmtree(self.clonedir)
     ClosureHookTestHelpers.tearDown(self)
 
   def actualTestCCOpen(self, treeName, fileInfo):
     """Pushing to an OPEN CC tree should succeed."""
     # If this tests attempts to pull something that isn't treeName, then the
     # re-director should fail for us. Hence we know that the hook is only
     # pulling the predefined tree and nothing else.
-    self.redirect("http://tinderbox.mozilla.org/" + treeName + "/",
+    self.redirect("http://tinderbox.mozilla.org/" + treeName + "/status.html",
                          '<span id="tree-status">OPEN</span><span id="extended-status">')
 
     # pushing something should now succeed
     u = self.ui
 
     fileName = fileInfo.pop()
     fileLoc = self.clonedir
     for dir in fileInfo:
@@ -391,17 +391,17 @@ class TestTreeCommCentralClosureHook(Clo
   def testCCOpenCalendar2(self):
     self.actualTestCCOpen("Sunbird", ["other-licenses", "branding", "sunbird", "test"])
 
   def actualTestCCClosed(self, treeName, fileInfo):
     """Pushing to a CLOSED Thunderbird tree should fail."""
     # If this tests attempts to pull something that isn't treeName, then the
     # re-director should fail for us. Hence we know that the hook is only
     # pulling the predefined tree and nothing else.
-    self.redirect("http://tinderbox.mozilla.org/" + treeName + "/",
+    self.redirect("http://tinderbox.mozilla.org/" + treeName + "/status.html",
                          '<span id="tree-status">CLOSED</span><span id="extended-status">')
 
     # pushing something should now fail
     u = self.ui
 
     fileName = fileInfo.pop()
     fileLoc = self.clonedir
     for dir in fileInfo:
@@ -430,33 +430,33 @@ class TestTreeCommCentralClosureHook(Clo
 
   # In theory adding CLOSED TREE is the same code-path for all projects,
   # so just checking for one project
   def testCCClosedThunderbirdMagicWords(self):
     """
     Pushing to a CLOSED Thunderbird tree with 'CLOSED TREE' in the commit message
     should succeed.
     """
-    self.redirect("http://tinderbox.mozilla.org/Thunderbird/",
+    self.redirect("http://tinderbox.mozilla.org/Thunderbird/status.html",
                          '<span id="tree-status">CLOSED</span><span id="extended-status">')
     u = self.ui
     appendFile(join(self.clonedir, "testfile"), "checkin 1")
     add(u, self.clonerepo, join(self.clonedir, "testfile"))
     commit(u, self.clonerepo, message="checkin 1 CLOSED TREE")
     push(u, self.clonerepo, dest=self.repodir)
     self.assertEqual(self.director.opened, 1)
 
   # In theory adding CLOSED TREE is the same code-path for all projects,
   # so just checking for one project
   def testCCClosedThunderbirdMagicWordsTip(self):
     """
     Pushing multiple changesets to a CLOSED Thunderbird tree with 'CLOSED TREE'
     in the commit message of the tip changeset should succeed.
     """
-    self.redirect("http://tinderbox.mozilla.org/Thunderbird/",
+    self.redirect("http://tinderbox.mozilla.org/Thunderbird/status.html",
                          '<span id="tree-status">CLOSED</span><span id="extended-status">')
     u = self.ui
     appendFile(join(self.clonedir, "testfile"), "checkin 1")
     add(u, self.clonerepo, join(self.clonedir, "testfile"))
     commit(u, self.clonerepo, message="checkin 1")
     appendFile(join(self.clonedir, "testfile"), "checkin 2")
     commit(u, self.clonerepo, message="checkin 2 CLOSED TREE")