From cc9d3e07eb01d22b0e850281c8a0388e35ae0cfe Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 24 Nov 2010 18:20:49 +0100 Subject: [PATCH] rename requestmaintainership to requestrole (much nicer and makes more sense) --- osc/commandline.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 31a1f429..ffe9939e 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1358,22 +1358,21 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='specify message TEXT') @cmdln.option('-r', '--role', metavar='role', default='maintainer', help='specify user role (default: maintainer)') - @cmdln.alias("reqmaintainership") - @cmdln.alias("reqms") - def do_requestmaintainership(self, subcmd, opts, *args): - """${cmd_name}: requests to add user as maintainer + @cmdln.alias("reqrole") + def do_requestrole(self, subcmd, opts, *args): + """${cmd_name}: requests to add user as a certain role (usually maintainer) usage: - osc requestmaintainership # for current user in checked out package - osc requestmaintainership USER # for specified user in checked out package - osc requestmaintainership PROJECT PACKAGE # for current user - osc requestmaintainership PROJECT PACKAGE USER # request for specified user + osc requestrole # for current user in checked out package + osc requestrole USER # for specified user in checked out package + osc requestrole PROJECT PACKAGE # for current user + osc requestrole PROJECT PACKAGE USER # request for specified user ${cmd_option_list} """ args = slash_split(args) apiurl = self.get_api_url() - + if len(args) < 2: if is_package_dir(os.getcwd()): project = store_read_project(os.curdir) @@ -1395,8 +1394,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. else: raise oscerr.WrongArgs('Wrong number of arguments.') - if not opts.role in ('maintainer', 'bugowner'): - raise oscerr.WrongOptions('invalid \'--role\': either specify \'maintainer\' or \'bugowner\'') + if not opts.role in ('maintainer', 'bugowner', 'reviewer', 'downloader'): + raise oscerr.WrongOptions("invalid '--role': specify one of these: 'maintainer', 'bugowner', 'reviewer', 'downloader'") arg = [ user, opts.role, project, package ]