[pypy-svn] buildbot commit 13e8edc80748: Allow category prefixes too.
Bitbucket
commits-noreply at bitbucket.org
Mon Dec 13 09:10:02 CET 2010
# HG changeset patch -- Bitbucket.org
# Project buildbot
# URL http://bitbucket.org/pypy/buildbot/overview
# User arigo
# Date 1289472039 0
# Node ID 13e8edc807488e727210b88900ad439b239040c6
# Parent 6f703848f295d0300e6cd29165f3cfaa636ac585
Allow category prefixes too.
--- a/bot2/pypybuildbot/master.py
+++ b/bot2/pypybuildbot/master.py
@@ -86,7 +86,10 @@ status = WebStatus(httpPortNumber, allow
# pypy test summary page
summary = load('pypybuildbot.summary')
-status.putChild('summary', summary.Summary(['linux', 'mac', 'win', 'freebsd']))
+status.putChild('summary', summary.Summary(categories=['linux',
+ 'mac',
+ 'win',
+ 'freebsd']))
status.putChild('nightly', PyPyList(os.path.expanduser('~/nightly'),
defaultType='application/octet-stream'))
--- a/bot2/pypybuildbot/summary.py
+++ b/bot2/pypybuildbot/summary.py
@@ -774,12 +774,12 @@ class Summary(HtmlResource):
break
else:
branch_key = (len(self.branch_order_prefixes)+1, branch)
- try:
- i = self.categories.index(category)
- cat_key = (0, i)
- except ValueError:
- cat_key = (1, category)
-
+ for i, catprefix in enumerate(self.categories):
+ if category.startswith(catprefix):
+ break
+ else:
+ i = len(self.categories)
+ cat_key = (i, category)
return cat_key + branch_key
def body(self, request):
More information about the Pypy-commit
mailing list