osc staging check with argument should give more output than without
(issue 1587)
This commit is contained in:
parent
b2b27a1ca7
commit
3e0cf8ed31
@ -184,7 +184,7 @@ def do_staging(self, subcmd, opts, *args):
|
||||
# call the respective command and parse args by need
|
||||
if cmd in ['check']:
|
||||
if len(args) > 1:
|
||||
return api.check_project_status(api.prj_from_letter(args[1]))
|
||||
return api.check_project_status(api.prj_from_letter(args[1]), verbose=True)
|
||||
for prj in api.get_staging_projects():
|
||||
print("Checking {}".format(prj))
|
||||
api.check_project_status(prj)
|
||||
|
@ -396,7 +396,7 @@ class StagingAPI(object):
|
||||
state = 'missing reviews: ' + ', '.join(failing_groups)
|
||||
return '{0}: {1}'.format(package, state)
|
||||
|
||||
def check_project_status(self, project):
|
||||
def check_project_status(self, project, verbose=False):
|
||||
"""
|
||||
Checks a staging project for acceptance. Checks all open requests for open reviews
|
||||
and build status
|
||||
@ -422,7 +422,8 @@ class StagingAPI(object):
|
||||
if ret:
|
||||
print(ret)
|
||||
all = False
|
||||
break # TODO: offer a details option
|
||||
if not verbose:
|
||||
break
|
||||
|
||||
buildstatus = self.gather_build_status(project)
|
||||
if buildstatus:
|
||||
@ -516,14 +517,15 @@ class StagingAPI(object):
|
||||
else:
|
||||
return [project, working, broken]
|
||||
|
||||
def print_build_status_details(self, details):
|
||||
def print_build_status_details(self, details, verbose=False):
|
||||
project, working, broken = details
|
||||
|
||||
if len(working) != 0:
|
||||
print("At least following repositories is still building:")
|
||||
for i in working:
|
||||
print(" {0}: {1}".format(i['path'], i['state']))
|
||||
break # TODO offer details option
|
||||
if not verbose:
|
||||
break
|
||||
print
|
||||
if len(broken) != 0:
|
||||
print("Following packages are broken:")
|
||||
|
Loading…
x
Reference in New Issue
Block a user