[opensuse-buildservice] osc requestmaintainership
Hi, Is there a way to do requestownership? I looked at the code and it seems the value 'maintainer' is hardcoded, can we set the role type using --role for example and be able to set different roles? Does the patch below look ok? Anas -- diff --git a/osc/commandline.py b/osc/commandline.py index 2683ae7..089098a 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -1356,6 +1356,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. @cmdln.option('-m', '--message', metavar='TEXT', 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): @@ -1371,7 +1373,13 @@ Please submit there instead, or use --nodevelproject to force direct submission. """ args = slash_split(args) apiurl = self.get_api_url() - + available_roles = ['maintainer', 'bugowner'] + role = 'maintainer' + print opts.role + if len(opts.role) and opts.role in available_roles: + print 'blah' + role = opts.role + print role if len(args) < 2: if is_package_dir(os.getcwd()): project = store_read_project(os.curdir) @@ -1393,7 +1401,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. else: raise oscerr.WrongArgs('Wrong number of arguments.') - arg = [ user, 'maintainer', project, package ] + arg = [ user, role, project, package ] actionsxml = self._add_role(arg, None)-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi, On 2010-11-24 11:19:56 +0000, Anas Nashif wrote:
Hi, Is there a way to do requestownership? I looked at the code and it seems the value 'maintainer' is hardcoded, can we set the role type using --role for example and be able to set different roles?
Does the patch below look ok?
I just committed a slightly modified version of your patch (see 6d89fee500ba29fffd9385903ffd1cbb4886c866). Thanks for the patch! Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Thanks, looks good :) Anas On 2010-11-24, at 3:44 PM, Marcus Hüwe wrote:
Hi,
On 2010-11-24 11:19:56 +0000, Anas Nashif wrote:
Hi, Is there a way to do requestownership? I looked at the code and it seems the value 'maintainer' is hardcoded, can we set the role type using --role for example and be able to set different roles?
Does the patch below look ok?
I just committed a slightly modified version of your patch (see 6d89fee500ba29fffd9385903ffd1cbb4886c866). Thanks for the patch!
Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 24/11/10 16:44, Marcus Hüwe wrote:
I just committed a slightly modified version of your patch (see 6d89fee500ba29fffd9385903ffd1cbb4886c866). Thanks for the patch!
I just pushed a commit[1] which renames requestmaintainership command to requestrole. It makes much more sense and is nicer. Do we want osc to write "requestmaintainership is obsolete, use requestrole instead" when requestmaintainership is used? OSC CLI commands have never been stable so users are probably used to checking manpage or --help, right? [1] http://gitorious.org/opensuse/osc/commit/cc9d3e07eb01d22b0e850281c8a0388e35a... -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2010-11-24 18:23:38 +0100, Pavol Rusnak wrote:
On 24/11/10 16:44, Marcus Hüwe wrote:
I just committed a slightly modified version of your patch (see 6d89fee500ba29fffd9385903ffd1cbb4886c866). Thanks for the patch!
I just pushed a commit[1] which renames requestmaintainership command to requestrole. It makes much more sense and is nicer.
Hmm I'm not quite sure if this is a good change. If we change it to requestrole I would expect something like "osc requestrole <role> [<project> <package>]" (instead of specifying a different role via a "--role" option).
Do we want osc to write "requestmaintainership is obsolete, use requestrole instead" when requestmaintainership is used? IMHO the "old" cmds should be aliases for "requestrole" instead of simply dropping them. What do you think?
OSC CLI commands have never been stable so users are probably used to checking manpage or --help, right?
Yes the UI has never been consistent... but that doesn't justify an unnecessary (IMHO) breakage:) Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 24/11/10 18:43, Marcus Hüwe wrote:
On 2010-11-24 18:23:38 +0100, Pavol Rusnak wrote:
On 24/11/10 16:44, Marcus Hüwe wrote:
I just committed a slightly modified version of your patch (see 6d89fee500ba29fffd9385903ffd1cbb4886c866). Thanks for the patch!
I just pushed a commit[1] which renames requestmaintainership command to requestrole. It makes much more sense and is nicer.
Hmm I'm not quite sure if this is a good change. If we change it to requestrole I would expect something like "osc requestrole <role> [<project> <package>]" (instead of specifying a different role via a "--role" option).
Well, all (whatever)request and request(whatever) commands need serious overhaul. We should think about that ...
Do we want osc to write "requestmaintainership is obsolete, use requestrole instead" when requestmaintainership is used? IMHO the "old" cmds should be aliases for "requestrole" instead of simply dropping them. What do you think?
In case semantics change (you add role parameter as mandatory) then it should not be alias. Feel free to change anything or revert my commit completely ... -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o openSUSE Boosters Team Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9 prusnak[at]opensuse.org Czech Republic -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Am Mittwoch, 24. November 2010, 18:43:46 schrieb Marcus Hüwe:
On 2010-11-24 18:23:38 +0100, Pavol Rusnak wrote:
On 24/11/10 16:44, Marcus Hüwe wrote:
I just committed a slightly modified version of your patch (see 6d89fee500ba29fffd9385903ffd1cbb4886c866). Thanks for the patch!
I just pushed a commit[1] which renames requestmaintainership command to requestrole. It makes much more sense and is nicer.
Hmm I'm not quite sure if this is a good change. If we change it to requestrole I would expect something like "osc requestrole <role> [<project> <package>]" (instead of specifying a different role via a "--role" option).
yep, full support from me. Can we establish the policy that a change of osc interface always needs a mail on this list asking for support ?
Do we want osc to write "requestmaintainership is obsolete, use requestrole instead" when requestmaintainership is used? IMHO the "old" cmds should be aliases for "requestrole" instead of simply dropping them. What do you think?
OSC CLI commands have never been stable so users are probably used to checking manpage or --help, right?
Yes the UI has never been consistent... but that doesn't justify an unnecessary (IMHO) breakage:)
Yes. We should make it more consistent, but we should discuss it first ... -- Adrian Schroeter SUSE Linux Products GmbH email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2010-11-25 08:52:32 +0100, Adrian Schröter wrote:
Am Mittwoch, 24. November 2010, 18:43:46 schrieb Marcus Hüwe:
On 2010-11-24 18:23:38 +0100, Pavol Rusnak wrote:
On 24/11/10 16:44, Marcus Hüwe wrote:
I just committed a slightly modified version of your patch (see 6d89fee500ba29fffd9385903ffd1cbb4886c866). Thanks for the patch!
I just pushed a commit[1] which renames requestmaintainership command to requestrole. It makes much more sense and is nicer.
Hmm I'm not quite sure if this is a good change. If we change it to requestrole I would expect something like "osc requestrole <role> [<project> <package>]" (instead of specifying a different role via a "--role" option).
yep, full support from me.
I just reverted the commit for now.
Can we establish the policy that a change of osc interface always needs a mail on this list asking for support ?
Sounds good at least if a cmd is going to be dropped (or if some cmd is changed in a backward incompatible way).
Do we want osc to write "requestmaintainership is obsolete, use requestrole instead" when requestmaintainership is used? IMHO the "old" cmds should be aliases for "requestrole" instead of simply dropping them. What do you think?
OSC CLI commands have never been stable so users are probably used to checking manpage or --help, right?
Yes the UI has never been consistent... but that doesn't justify an unnecessary (IMHO) breakage:)
Yes.
We should make it more consistent, but we should discuss it first ...
+1 Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (4)
-
Adrian Schröter
-
Anas Nashif
-
Marcus Hüwe
-
Pavol Rusnak