Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpcdf
obs
osc-plugins
Commits
fb6ccd34
Commit
fb6ccd34
authored
Jul 25, 2019
by
Lorenz Huedepohl
Browse files
New command 'mpcdf_branch'
parent
bc591d36
Pipeline
#67018
failed with stage
in 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
mpcdf_branch.py
0 → 100644
View file @
fb6ccd34
#!/usr/bin/python2
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.
Usage:
osc mpcdf_branch PACKAGE
${cmd_option_list}
"""
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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment