jhbuild r2266 - in trunk: . buildbot/public_html jhbuild/buildbot/status/web
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2266 - in trunk: . buildbot/public_html jhbuild/buildbot/status/web
- Date: Sat, 16 Aug 2008 22:03:01 +0000 (UTC)
Author: fpeters
Date: Sat Aug 16 22:03:00 2008
New Revision: 2266
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2266&view=rev
Log:
* buildbot/public_html/lgo.css,
jhbuild/buildbot/status/web/__init__.py,
jhbuild/buildbot/status/web/changes.py: custom buildbot changes pages,
linking to GNOME ViewVC.
Added:
trunk/jhbuild/buildbot/status/web/changes.py
Modified:
trunk/ChangeLog
trunk/buildbot/public_html/lgo.css
trunk/jhbuild/buildbot/status/web/__init__.py
Modified: trunk/buildbot/public_html/lgo.css
==============================================================================
--- trunk/buildbot/public_html/lgo.css (original)
+++ trunk/buildbot/public_html/lgo.css Sat Aug 16 22:03:00 2008
@@ -321,3 +321,13 @@
text-align: center;
font-weight: bold;
}
+
+div.changeset ul {
+ margin-left: 0em;
+ padding-left: 0em;
+ list-style: none;
+}
+
+div.changeset ul ul {
+ padding-left: 1em;
+}
Modified: trunk/jhbuild/buildbot/status/web/__init__.py
==============================================================================
--- trunk/jhbuild/buildbot/status/web/__init__.py (original)
+++ trunk/jhbuild/buildbot/status/web/__init__.py Sat Aug 16 22:03:00 2008
@@ -23,6 +23,10 @@
from buildbot.status.web.base import HtmlResource, ITopBox, build_get_class
from buildbot import interfaces, util
from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
+from buildbot.status.web.baseweb import WebStatus
+
+from waterfall import JhWaterfallStatusResource
+from changes import ChangesResource
def content(self, request):
@@ -37,9 +41,6 @@
return data
HtmlResource.content = content
-from buildbot.status.web.baseweb import WebStatus
-from waterfall import JhWaterfallStatusResource
-
class ProjectsSummary(HtmlResource):
MAX_PROJECT_NAME = 25
@@ -170,6 +171,9 @@
# set the summary homepage
self.putChild("", ProjectsSummary())
+ # set custom changes pages
+ self.putChild('changes', ChangesResource())
+
def setupSite(self):
WebStatus.setupSite(self)
Added: trunk/jhbuild/buildbot/status/web/changes.py
==============================================================================
--- (empty file)
+++ trunk/jhbuild/buildbot/status/web/changes.py Sat Aug 16 22:03:00 2008
@@ -0,0 +1,76 @@
+# jhbuild - a build script for GNOME 1.x and 2.x
+# Copyright (C) 2008 Frederic Peters
+#
+# changes.py: custom changes pages
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+import time
+
+from buildbot.status.web.base import HtmlResource
+from twisted.web.util import Redirect
+
+
+class ChangesResource(HtmlResource):
+ def getChild(self, path, req):
+ if path == '':
+ return Redirect('..')
+ num = int(path)
+ c = self.getStatus(req).getChange(num)
+ if not c:
+ return NoResource("No change number '%d'" % num)
+ return ChangeResource(c)
+
+
+class ChangeResource(HtmlResource):
+ def __init__(self, change):
+ self.change = change
+
+ def getTitle(self, request):
+ status = self.getStatus(request)
+ p = status.getProjectName()
+ return '%s - %s - revision #%s' % (p, self.change.project, self.change.revision)
+
+ def body(self, request):
+ data = '<div class="changeset">\n'
+ data += '<ul>'
+ if self.change.project:
+ data += '<li>Project: <a href="../%s">%s</a></li>\n' % (
+ self.change.project, self.change.project)
+ if self.change.who:
+ data += '<li>Author: <strong class="author">%s</strong></li>\n' % self.change.who
+ if self.change.when:
+ data += '<li>Date: <strong class="date">%s</strong></li>\n' % time.strftime(
+ '%a %d %b %Y %H:%M:%S', time.localtime(self.change.when))
+ if self.change.files:
+ data += '<li>Files:<ul>\n'
+ for f in self.change.files:
+ data += '<li><tt>%s</tt></li>\n' % f
+ data += '</ul></li>\n'
+ data += '</ul>\n'
+ if self.change.comments:
+ data += '<pre>'
+ data += self.change.comments
+ data += '</pre>\n'
+
+ if self.change.revision:
+ link = 'http://svn.gnome.org/viewvc/%s?view=revision&revision=%s' % (
+ self.change.project, self.change.revision)
+ data += '<p>View in GNOME ViewVC: <a href="%s">%s r%s</a></dd>\n' % (
+ link, self.change.project, self.change.revision)
+
+ data += '</div>'
+ return data
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]