From d4ce37e73270c857df5e6d19177660ce6eead73e Mon Sep 17 00:00:00 2001 From: Marko Lemmetty Date: Fri, 15 May 2020 14:47:19 +0300 Subject: [PATCH 4/7] Add -p to copyprj to enable copying of prjconf --- osc/commandline.py | 4 +++- osc/core.py | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index a395ee19..e8166115 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -3160,6 +3160,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='replicate the history of each package.') @cmdln.option('-o', '--make-older', action='store_true', help='No idea') + @cmdln.option('-p', '--prjconf', action='store_true', + help='copy the prjconf also') @cmdln.option('-r', '--re-sign', action='store_true', help='re-sign the binaries') @cmdln.option('-m', '--message', metavar='TEXT', @@ -3205,7 +3207,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. withhistory = opts.with_history, makeolder = opts.make_older, resign = opts.re_sign, - now = opts.now, + now = opts.now, prjconf = opts.prjconf, comment = comment) print("done cp") print(r) diff --git a/osc/core.py b/osc/core.py index de116a70..8036b616 100644 --- a/osc/core.py +++ b/osc/core.py @@ -5556,6 +5556,8 @@ def copy_prj(src_apiurl, src_project, dst_project, withhistory = False, makeolder = False, resign = False, + now = False, + prjconf = False, comment = None): """ Create a copy of a project. @@ -5577,6 +5579,9 @@ def copy_prj(src_apiurl, src_project, dst_project, query['comment'] = comment if now: query['nodelay'] = '1' + if prjconf: + query['prjconf'] = '1' + u = makeurl(src_apiurl, ['source', dst_project], query=query) print >>sys.stderr, "copyprj ", u f = http_POST(u) -- 2.34.1