mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 09:36:21 +01:00
Streamlined 'bugowner' and 'maintainer' commands.
Both commands now check the current working-copy path if no arguments are given and return the respective maintainer/bugowner. Related to that, the help messages where updated and changed slightly to look more similar.
This commit is contained in:
parent
8e92cebaf2
commit
4c25b73151
@ -5233,11 +5233,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
osc bugowner PRJ
|
osc bugowner PRJ
|
||||||
osc bugowner PRJ PKG
|
osc bugowner PRJ PKG
|
||||||
|
|
||||||
Shortcut for osc maintainer -B [PRJ] PKG
|
PRJ and PKG default to current working-copy path.
|
||||||
|
|
||||||
PRJ defaults to '%(getpac_default_project)s'.
|
|
||||||
Prints bugowner if defined, or maintainer otherwise.
|
Prints bugowner if defined, or maintainer otherwise.
|
||||||
|
|
||||||
|
Shortcut for osc maintainer -B [PRJ] PKG
|
||||||
|
|
||||||
${cmd_option_list}
|
${cmd_option_list}
|
||||||
"""
|
"""
|
||||||
opts.role = ()
|
opts.role = ()
|
||||||
@ -5276,17 +5276,17 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
def do_maintainer(self, subcmd, opts, *args):
|
def do_maintainer(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Show maintainers of a project/package
|
"""${cmd_name}: Show maintainers of a project/package
|
||||||
|
|
||||||
To be used like this:
|
|
||||||
|
|
||||||
osc maintainer PRJ <options>
|
osc maintainer PRJ <options>
|
||||||
or
|
|
||||||
osc maintainer PRJ PKG <options>
|
osc maintainer PRJ PKG <options>
|
||||||
|
|
||||||
|
PRJ and PKG default to current working-copy path.
|
||||||
|
|
||||||
${cmd_usage}
|
${cmd_usage}
|
||||||
${cmd_option_list}
|
${cmd_option_list}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pac = None
|
pac = None
|
||||||
|
prj = None
|
||||||
root = None
|
root = None
|
||||||
roles = [ 'bugowner', 'maintainer' ]
|
roles = [ 'bugowner', 'maintainer' ]
|
||||||
if len(opts.role):
|
if len(opts.role):
|
||||||
@ -5294,7 +5294,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if opts.bugowner_only or opts.bugowner:
|
if opts.bugowner_only or opts.bugowner:
|
||||||
roles = [ 'bugowner' ]
|
roles = [ 'bugowner' ]
|
||||||
|
|
||||||
if len(args) == 1:
|
if len(args) == 0:
|
||||||
|
try:
|
||||||
|
pac = store_read_package('.')
|
||||||
|
except oscerr.NoWorkingCopy:
|
||||||
|
pass
|
||||||
|
prj = store_read_project('.')
|
||||||
|
elif len(args) == 1:
|
||||||
prj = args[0]
|
prj = args[0]
|
||||||
elif len(args) == 2:
|
elif len(args) == 2:
|
||||||
prj = args[0]
|
prj = args[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user