diff --git a/NEWS b/NEWS index d4516385..c0e2dade 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 0.133 - add --meta option also to "list", "cat" and "less" commands - project checkout is skipping packages linking to project local packages by default + - add --keep-link option to copypac command - source validators are not called by default anymore: * They can get used via source services now * Allows different validations based on the code streams diff --git a/osc/commandline.py b/osc/commandline.py index 1c283aaa..cac0ee5a 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2390,6 +2390,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='do a (slower) client-side copy') @cmdln.option('-k', '--keep-maintainers', action='store_true', help='keep original maintainers. Default is remove all and replace with the one calling the script.') + @cmdln.option('-K', '--keep-link', action='store_true', + help='keep the source link in target, this also expands the source') @cmdln.option('-d', '--keep-develproject', action='store_true', help='keep develproject tag in the package metadata') @cmdln.option('-r', '--revision', metavar='rev', @@ -2465,7 +2467,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. keep_develproject=opts.keep_develproject, expand=opts.expand, revision=rev, - comment=comment) + comment=comment, + keep_link=opts.keep_link) print r diff --git a/osc/core.py b/osc/core.py index 4899ea38..a590adee 100644 --- a/osc/core.py +++ b/osc/core.py @@ -4367,7 +4367,8 @@ def copy_pac(src_apiurl, src_project, src_package, keep_develproject = False, expand = False, revision = None, - comment = None): + comment = None, + keep_link = None): """ Create a copy of a package. @@ -4390,8 +4391,10 @@ def copy_pac(src_apiurl, src_project, src_package, print 'Copying files...' if not client_side_copy: query = {'cmd': 'copy', 'oproject': src_project, 'opackage': src_package } - if expand: + if expand or keep_link: query['expand'] = '1' + if keep_link: + query['keeplink'] = '1' if revision: query['orev'] = revision if comment: