mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
- add --linkrev option to branch command
This commit is contained in:
parent
e9766d5d5b
commit
df9c3000b0
1
NEWS
1
NEWS
@ -4,6 +4,7 @@
|
|||||||
OBS 2.7 only:
|
OBS 2.7 only:
|
||||||
- add "addchannels" and "enablechannel" commands
|
- add "addchannels" and "enablechannel" commands
|
||||||
- support new package instances on branching when using -N parameter
|
- support new package instances on branching when using -N parameter
|
||||||
|
- add --linkrev option to branch command
|
||||||
|
|
||||||
0.152
|
0.152
|
||||||
- add support searching for groups via "group:" prefix
|
- add support searching for groups via "group:" prefix
|
||||||
|
@ -3241,6 +3241,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
help='create a branch pointing to a not yet existing package')
|
help='create a branch pointing to a not yet existing package')
|
||||||
@cmdln.option('-r', '--revision', metavar='rev',
|
@cmdln.option('-r', '--revision', metavar='rev',
|
||||||
help='branch against a specific revision')
|
help='branch against a specific revision')
|
||||||
|
@cmdln.option('--linkrev', metavar='linkrev',
|
||||||
|
help='specify the used revision in the link target.')
|
||||||
def do_branch(self, subcmd, opts, *args):
|
def do_branch(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Branch a package
|
"""${cmd_name}: Branch a package
|
||||||
|
|
||||||
@ -3259,6 +3261,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
(list of projects from oscrc:getpac_default_project)
|
(list of projects from oscrc:getpac_default_project)
|
||||||
if nothing else is specfied on the command line.
|
if nothing else is specfied on the command line.
|
||||||
|
|
||||||
|
In case of branch errors, where the source has currently merge
|
||||||
|
conflicts use --linkrev=base option.
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
osc branch
|
osc branch
|
||||||
osc branch SOURCEPROJECT SOURCEPACKAGE
|
osc branch SOURCEPROJECT SOURCEPACKAGE
|
||||||
@ -3298,6 +3303,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
exists, targetprj, targetpkg, srcprj, srcpkg = \
|
exists, targetprj, targetpkg, srcprj, srcpkg = \
|
||||||
branch_pkg(apiurl, args[0], args[1],
|
branch_pkg(apiurl, args[0], args[1],
|
||||||
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
||||||
|
linkrev=opts.linkrev,
|
||||||
target_project=tproject, target_package=tpackage,
|
target_project=tproject, target_package=tpackage,
|
||||||
return_existing=opts.checkout, msg=opts.message or '',
|
return_existing=opts.checkout, msg=opts.message or '',
|
||||||
force=opts.force, noaccess=opts.noaccess,
|
force=opts.force, noaccess=opts.noaccess,
|
||||||
@ -3311,6 +3317,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
exists, targetprj, targetpkg, srcprj, srcpkg = \
|
exists, targetprj, targetpkg, srcprj, srcpkg = \
|
||||||
branch_pkg(apiurl, args[0], args[1],
|
branch_pkg(apiurl, args[0], args[1],
|
||||||
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
nodevelproject=opts.nodevelproject, rev=opts.revision,
|
||||||
|
linkrev=opts.linkrev,
|
||||||
target_project=tproject, target_package=tpackage,
|
target_project=tproject, target_package=tpackage,
|
||||||
return_existing=opts.checkout, msg=opts.message or '',
|
return_existing=opts.checkout, msg=opts.message or '',
|
||||||
force=opts.force, noaccess=opts.noaccess,
|
force=opts.force, noaccess=opts.noaccess,
|
||||||
@ -7716,9 +7723,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
raise oscerr.APIError('source link is not broken')
|
raise oscerr.APIError('source link is not broken')
|
||||||
workingrev = None
|
workingrev = None
|
||||||
|
|
||||||
baserev = linkinfo.get('baserev')
|
if linkinfo.get('baserev'):
|
||||||
if baserev != None:
|
query = { 'rev': 'latest', 'linkrev': 'base' }
|
||||||
query = { 'rev': 'latest', 'linkrev': baserev }
|
|
||||||
u = makeurl(apiurl, ['source', prj, package], query=query)
|
u = makeurl(apiurl, ['source', prj, package], query=query)
|
||||||
f = http_GET(u)
|
f = http_GET(u)
|
||||||
root = ET.parse(f).getroot()
|
root = ET.parse(f).getroot()
|
||||||
|
@ -5016,7 +5016,7 @@ def attribute_branch_pkg(apiurl, attribute, maintained_update_project_attribute,
|
|||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, target_project=None, target_package=None, return_existing=False, msg='', force=False, noaccess=False, add_repositories=False, extend_package_names=False, missingok=False, maintenance=False, newinstance=False):
|
def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None, linkrev=None, target_project=None, target_package=None, return_existing=False, msg='', force=False, noaccess=False, add_repositories=False, extend_package_names=False, missingok=False, maintenance=False, newinstance=False):
|
||||||
"""
|
"""
|
||||||
Branch a package (via API call)
|
Branch a package (via API call)
|
||||||
"""
|
"""
|
||||||
@ -5039,6 +5039,8 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
|
|||||||
query['extend_package_names'] = "1"
|
query['extend_package_names'] = "1"
|
||||||
if rev:
|
if rev:
|
||||||
query['rev'] = rev
|
query['rev'] = rev
|
||||||
|
if linkrev:
|
||||||
|
query['linkrev'] = linkrev
|
||||||
if target_project:
|
if target_project:
|
||||||
query['target_project'] = target_project
|
query['target_project'] = target_project
|
||||||
if target_package:
|
if target_package:
|
||||||
|
Loading…
Reference in New Issue
Block a user