From 5bd78d44f81bbb133db0d099f2e37611e09e6a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 4 Aug 2010 17:16:59 +0200 Subject: [PATCH] another try for prjresutls, do not show "excluded" packages/repos by default, but show the manual disabled ones. --- osc/commandline.py | 6 +++--- osc/core.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 90e60c54..cde5811f 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -3335,8 +3335,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='show results only for specified repo(s)') @cmdln.option('-V', '--vertical', action='store_true', help='list packages vertically instead horizontally') - @cmdln.option('--hide-disabled', action='store_true', - help='hide packages that are disabled or excluded in all repos, also hide repos that have only disabled or excluded packages') + @cmdln.option('--show-excluded', action='store_true', + help='show packages that are excluded in all repos, also hide repos that have only excluded packages') @cmdln.alias('pr') def do_prjresults(self, subcmd, opts, *args): """${cmd_name}: Shows project-wide build results @@ -3358,7 +3358,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. wd = os.curdir project = store_read_project(wd) - print '\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, csv=opts.csv, status_filter=opts.status_filter, name_filter=opts.name_filter, repo=opts.repo, arch=opts.arch, vertical=opts.vertical, hide_disabled=opts.hide_disabled)) + print '\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, csv=opts.csv, status_filter=opts.status_filter, name_filter=opts.name_filter, repo=opts.repo, arch=opts.arch, vertical=opts.vertical, show_excluded=opts.show_excluded)) @cmdln.option('-q', '--hide-legend', action='store_true', diff --git a/osc/core.py b/osc/core.py index 71813154..df16258e 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3892,7 +3892,7 @@ def get_results(apiurl, prj, package, lastbuild=None, repository=[], arch=[], ve return r -def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=None, name_filter=None, arch=None, repo=None, vertical=None, hide_disabled=None): +def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=None, name_filter=None, arch=None, repo=None, vertical=None, show_excluded=None): #print '----------------------------------------' r = [] @@ -3931,7 +3931,7 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non targets.sort() # filter option - if status_filter or name_filter or hide_disabled: + if status_filter or name_filter or not show_excluded: pacs_to_show = [] targets_to_show = [] @@ -3958,12 +3958,12 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non pacs_to_show.append(pkg) #filter non building states - elif hide_disabled: + elif not show_excluded: enabled = {} for pkg in status.keys(): showpkg = False for repo in status[pkg].keys(): - if status[pkg][repo] != "excluded" and status[pkg][repo] != "disabled": + if status[pkg][repo] != "excluded": enabled[repo] = 1 showpkg = True