1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 09:16:14 +01:00

show scheduler state for each repo with "results" and "prjresults"

This commit is contained in:
Adrian Schröter 2010-01-13 13:35:45 +01:00
parent 6be37ebb89
commit 217db3c20c
2 changed files with 14 additions and 2 deletions

1
NEWS
View File

@ -13,6 +13,7 @@
- new config option 'submitrequest_on_accept_action' to specify a default action
if a submitrequest has been accepted
- add "osc linktobranch" command to convert a classic link to a branch package
- show scheduler state for each repo with "results" and "prjresults"
0.124
- added 'osc bugowner' as a more intelligent version of 'osc maintainer -B'

View File

@ -3452,6 +3452,8 @@ def get_results(apiurl, prj, package, lastbuild=None, repository=[], arch=[]):
rmap['pac'] = package
rmap['rep'] = node.get('repository')
rmap['arch'] = node.get('arch')
rmap['state'] = node.get('state')
rmap['dirty'] = node.get('dirty')
statusnode = node.find('status')
try:
@ -3467,6 +3469,11 @@ def get_results(apiurl, prj, package, lastbuild=None, repository=[], arch=[]):
rmap['status'] += ': %s' % apiurl + \
'/build/%(prj)s/%(rep)s/%(arch)s/%(pac)s/_log' % rmap
if rmap['dirty'] == 'true':
rmap['status'] += ' (outdated)'
else:
rmap['status'] += ' (repository is %s)' % rmap['state']
r.append(result_line_templ % rmap)
return r
@ -3496,7 +3503,11 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non
continue
if repo != None and repo != node.get('repository'):
continue
tg = (node.get('repository'), node.get('arch'))
if node.get('dirty') == "true":
state = "outdated"
else:
state = node.get('state')
tg = (node.get('repository'), node.get('arch'), state)
targets.append(tg)
for pacnode in node.findall('status'):
pac = pacnode.get('package')
@ -3572,7 +3583,7 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non
buildstatus_symbols[status[pac][tg]] = '?'
line.append(st)
line.append(' ')
line.append(' %s %s' % tg)
line.append(' %s %s (%s)' % tg)
line = ''.join(line)
r.append(line)