summarylogtreecommitdiffstats
path: root/0003-Support-synchronous-copyproj.patch
diff options
context:
space:
mode:
Diffstat (limited to '0003-Support-synchronous-copyproj.patch')
-rw-r--r--0003-Support-synchronous-copyproj.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/0003-Support-synchronous-copyproj.patch b/0003-Support-synchronous-copyproj.patch
new file mode 100644
index 000000000000..be6599cb2f9e
--- /dev/null
+++ b/0003-Support-synchronous-copyproj.patch
@@ -0,0 +1,53 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Marko Lemmetty <marko.lemmetty@jollamobile.com>
+Date: Fri, 15 May 2020 14:33:17 +0300
+Subject: [PATCH] Support synchronous copyproj
+
+---
+ osc/commandline.py | 5 +++++
+ osc/core.py | 2 ++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/osc/commandline.py b/osc/commandline.py
+index 7fc9dd5c47cb46d494f206a94793511e5fe901de..46bbc28087338961ff09cabc964ae0024a73001c 100644
+--- a/osc/commandline.py
++++ b/osc/commandline.py
+@@ -2108,6 +2108,8 @@ class Osc(cmdln.Cmdln):
+
+ @cmdln.option('-b', '--with-binaries', action='store_true',
+ help='copy the built binaries over to avoid a rebuild')
++ @cmdln.option('-n', '--now', action='store_true',
++ help='copy synchronously (may take some time to complete)')
+ @cmdln.option('-H', '--with-history', action='store_true',
+ help='replicate the history of each package.')
+ @cmdln.option('-o', '--make-older', action='store_true',
+@@ -2126,6 +2128,8 @@ class Osc(cmdln.Cmdln):
+
+ The user must be able to create DESTPRJ
+
++ Normally the copy is done asynchronously
++
+ usage:
+ osc copyprj SOURCEPRJ DESTPRJ
+ """
+@@ -2154,6 +2158,7 @@ class Osc(cmdln.Cmdln):
+ withhistory = opts.with_history,
+ makeolder = opts.make_older,
+ resign = opts.re_sign,
++ now = opts.now,
+ comment = comment)
+ print("done cp")
+ print(r)
+diff --git a/osc/core.py b/osc/core.py
+index 116d4f2e895d1ed03aba483588cd78ef168175f7..d3d4ca9cf3b3cfc6ad966fa3692cfa019d8d567c 100644
+--- a/osc/core.py
++++ b/osc/core.py
+@@ -6303,6 +6303,8 @@ def copy_prj(src_apiurl, src_project, dst_project,
+ query['resign'] = '1'
+ if comment:
+ query['comment'] = comment
++ if now:
++ query['nodelay'] = '1'
+ u = makeurl(src_apiurl, ['source', dst_project], query=query)
+ print("copyprj ", u, file=sys.stderr)
+ f = http_POST(u)