diff --git a/NEWS b/NEWS
index e0903220..012bfa31 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
- add blt and rblt commands, aka "buildlogtail" and "remotebuildlogtail" to show
just the end of a build log (for getting the fail reason faster).
CHANGE: the --start parameter is now called --offset
+ - add "createrequest -a add_me" shortcut
0.130
- new "revert" command to restore the original working copy file (without
diff --git a/osc/commandline.py b/osc/commandline.py
index 3e3524f8..734a4701 100644
--- a/osc/commandline.py
+++ b/osc/commandline.py
@@ -1240,6 +1240,30 @@ Please submit there instead, or use --nodevelproject to force direct submission.
return actionxml
+ def _add_me(self, args, opts):
+ if len(args) > 3:
+ raise oscerr.WrongArgs('Too many arguments.')
+ if len(args) < 2:
+ raise oscerr.WrongArgs('Too few arguments.')
+
+ apiurl = self.get_api_url()
+
+ user = conf.get_apiurl_usr(apiurl)
+ role = args[1]
+ project = args[2]
+ actionxml = """ """ % \
+ (project, user, role)
+
+ if len(args) > 2:
+ package = args[2]
+ actionxml = """ """ % \
+ (project, package, user, role)
+
+ if get_user_meta(apiurl, user) == None:
+ raise oscerr.WrongArgs('osc: an error occured.')
+
+ return actionxml
+
def _add_role(self, args, opts):
if len(args) > 4:
raise oscerr.WrongArgs('Too many arguments.')
@@ -1315,6 +1339,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
-a submit SOURCEPRJ SOURCEPKG DESTPRJ [DESTPKG]
-a delete PROJECT [PACKAGE]
-a change_devel PROJECT PACKAGE DEVEL_PROJECT [DEVEL_PACKAGE]
+ -a add_me ROLE PROJECT [PACKAGE]
-a add_role USER ROLE PROJECT [PACKAGE]
-a set_bugowner USER PROJECT [PACKAGE]
]
@@ -1358,6 +1383,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
args = opts.actiondata[i]
actionsxml += self._changedevel_request(args,opts)
i = i+1
+ elif ai == 'add_me':
+ args = opts.actiondata[i]
+ actionsxml += self._add_me(args,opts)
+ i = i+1
elif ai == 'add_role':
args = opts.actiondata[i]
actionsxml += self._add_role(args,opts)