[pypy-commit] buildbot 0.8.4-compat: add a link to summary from the build page by customizing the templace, and kill the old hack

antocuni noreply at buildbot.pypy.org
Sun Aug 7 20:40:24 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 0.8.4-compat
Changeset: r562:d624f01497bc
Date: 2011-08-07 16:39 +0200
http://bitbucket.org/pypy/buildbot/changeset/d624f01497bc/

Log:	add a link to summary from the build page by customizing the
	templace, and kill the old hack

diff --git a/bot2/pypybuildbot/master.py b/bot2/pypybuildbot/master.py
--- a/bot2/pypybuildbot/master.py
+++ b/bot2/pypybuildbot/master.py
@@ -29,32 +29,6 @@
     StatusResourceBuilder.force = my_force
 # Done
 
-# Add a similar link from the build page to the summary page
-def my_content_2(self, req, ctx):
-    data = _previous_content_2(self, req, ctx)
-    MARKER1 = '<h2>Results'
-    MARKER2 = '<h2>SourceStamp'
-    i1 = data.find(MARKER1)
-    i2 = data.find(MARKER2)
-    if i1 >= 0 and i2 >= 0:
-        from twisted.web import html
-        b = self.build_status
-        ss = b.getSourceStamp()
-        branch = ss.branch or '<trunk>'
-        builder_name = b.getBuilder().getName()
-        url = (self.path_to_root(req) +
-               "summary?builder=" + html.escape(builder_name) +
-               "&branch=" + html.escape(branch))
-        data = '%s&nbsp;&nbsp;&nbsp;(<a href="%s">view in summary</a>)\n\n%s'% (
-            data[:i2],
-            url,
-            data[i2:])
-    return data
-_previous_content_2 = StatusResourceBuild.content
-## if _previous_content_2.__name__ == 'content':
-##     StatusResourceBuild.content = my_content_2
-
-
 
 # Picking a random slave is not really what we want;
 # let's pick the first available one instead.
diff --git a/master/templates/build.html b/master/templates/build.html
--- a/master/templates/build.html
+++ b/master/templates/build.html
@@ -7,6 +7,8 @@
 <h1>
 Builder <a href="{{ path_to_builder }}">{{ b.getBuilder().getName() }}</a>
 Build #{{ b.getNumber() }}
+<!-- PyPy specific change: add a "view in summary" linke -->
+&nbsp;&nbsp;&nbsp;(<a href="{{ path_to_root }}summary?builder={{ b.getBuilder().getName() }}">view in summary</a>)
 </h1>
 
 <div class="column">
@@ -36,6 +38,7 @@
   {% endif %}
 {% endif %}
 
+
 <h2>SourceStamp:</h2>
 
 <table class="info" width="100%">


More information about the pypy-commit mailing list