Commit fb6ccd34 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

New command 'mpcdf_branch'

parent bc591d36
Pipeline #67018 failed with stage
in 13 seconds
from __future__ import print_function
import time
import mpcdf_common
import os
import osc
import osc.conf
import osc.core
import osc.cmdln
from xml.etree import ElementTree
def do_mpcdf_branch(self, subcmd, opts, *args):
"""${cmd_name}: Branch package from software to your home project
This creates a branch of the package PACKAGE in the central
'software' repository into your home:$USER project, and sets
all required meta-data for the enabled repositories.
osc mpcdf_branch PACKAGE
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:
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)
Supports Markdown
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