git.samba.org
/
build-farm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
242950a
)
Simplify handling of old build limit showing.
author
Jelmer Vernooij
<jelmer@samba.org>
Sat, 7 Jun 2014 16:32:33 +0000
(18:32 +0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Sat, 7 Jun 2014 16:32:33 +0000
(18:32 +0200)
buildfarm/web/__init__.py
patch
|
blob
|
history
diff --git
a/buildfarm/web/__init__.py
b/buildfarm/web/__init__.py
index 08d577a1ba3402c676d8a2dda53aedf2efc4cf2a..8f15f54baaa05263e386c3bf3c5812789cc957ae 100755
(executable)
--- a/
buildfarm/web/__init__.py
+++ b/
buildfarm/web/__init__.py
@@
-404,7
+404,7
@@
class BuildFarmPage(object):
class ViewBuildPage(BuildFarmPage):
class ViewBuildPage(BuildFarmPage):
- def show_oldrevs(self, myself, build, host, compiler, limit):
+ def show_oldrevs(self, myself, build, host, compiler, limit
=None
):
"""show the available old revisions, if any"""
tree = build.tree
"""show the available old revisions, if any"""
tree = build.tree
@@
-419,11
+419,7
@@
class ViewBuildPage(BuildFarmPage):
yield "<thead><tr><th>Revision</th><th>Status</th><th>Age</th></tr></thead>\n"
yield "<tbody>\n"
yield "<thead><tr><th>Revision</th><th>Status</th><th>Age</th></tr></thead>\n"
yield "<tbody>\n"
- nb = 0
- for old_build in old_builds:
- if limit >= 0 and nb >= limit:
- break
- nb = nb + 1
+ for old_build in old_builds[:limit]:
yield "<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n" % (
revision_link(myself, old_build.revision, tree),
build_link(myself, old_build),
yield "<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n" % (
revision_link(myself, old_build.revision, tree),
build_link(myself, old_build),