[autobuilder-helper,thud,03/40] scripts/send-qa-email: Allow force pushing of basebranch based comparisions

Submitted by Richard Purdie on Sept. 10, 2020, 1:29 p.m. | Patch ID: 176325

Details

Message ID 20200910133035.2044355-3-richard.purdie@linuxfoundation.org
State New
Headers show

Commit Message

Richard Purdie Sept. 10, 2020, 1:29 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/send-qa-email | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/scripts/send-qa-email b/scripts/send-qa-email
index a769bbc..ec89845 100755
--- a/scripts/send-qa-email
+++ b/scripts/send-qa-email
@@ -61,8 +61,12 @@  if 'poky' in repos and os.path.exists(resulttool) and args.results_dir:
     try:
         subprocess.check_call(["git", "clone", "git@git.yoctoproject.org:yocto-testresults", tempdir])
         subprocess.check_call([resulttool, "store", args.results_dir, tempdir])
-        subprocess.check_call(["git", "push", "--all"], cwd=tempdir)
-        subprocess.check_call(["git", "push", "--tags"], cwd=tempdir)
+        if basebranch:
+            subprocess.check_call(["git", "push", "--all", "--force"], cwd=tempdir)
+            subprocess.check_call(["git", "push", "--tags", "--force"], cwd=tempdir)
+        else:
+            subprocess.check_call(["git", "push", "--all"], cwd=tempdir)
+            subprocess.check_call(["git", "push", "--tags"], cwd=tempdir)
 
         regreport = subprocess.check_output([resulttool, "regression-git", tempdir] + extraopts.split())
         with open(args.results_dir + "/testresult-regressions-report.txt", "wb") as f: