Commit e0618d8f authored by Lorenz Hüdepohl's avatar Lorenz Hüdepohl
Browse files

Support home: sub-projects for mpcdf_push

parent 9832a66b
Pipeline #76362 passed with stage
in 14 seconds
......@@ -16,19 +16,24 @@ def do_mpcdf_branch(self, subcmd, opts, *args):
all required meta-data for the enabled repositories.
osc mpcdf_branch PACKAGE
osc mpcdf_branch PACKAGE [home:$USER]
apiurl = self.get_api_url()
target_project = "home:" + osc.conf.get_apiurl_usr(apiurl)
if len(args) == 0:
raise osc.oscerr.WrongArgs("Missing argument: PACKAGENAME")
if len(args) > 1:
elif len(args) == 1:
package, = args
target_project = "home:" + osc.conf.get_apiurl_usr(apiurl)
elif len(args) == 2:
package, target_project = args
if not target_project.startswith("home:"): # + osc.conf.get_apiurl_usr(apiurl)):
raise osc.oscerr.WrongArgs("Target must be a home project")
if len(args) > 2:
raise osc.oscerr.WrongArgs("Too many arguments")
package, = args
mpcdf_common.sync_projects(apiurl, package=package, from_project="software",
to_projects=(target_project,), add_to_maintainers=False)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment