[coreboot-gerrit] Patch set updated for coreboot: 03a3631 util/board_status: Fetch and rebase after failed push
Paul Menzel (paulepanter@users.sourceforge.net)
gerrit at coreboot.org
Wed May 20 08:33:24 CEST 2015
Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10262
-gerrit
commit 03a3631b56c43b2178e1eff243590d91c03261d7
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date: Wed May 20 07:35:56 2015 +0200
util/board_status: Fetch and rebase after failed push
Currently, when the remote master branch of the board-status
repository changes between cloning and pushing, `git push origin`
fails.
This race condition happens quite often with REACTS testing commits at
the same time on different systems.
If that happens, just download the objects and refs from the
board-status repository and rebase the local changes on it. Try that
three times before exiting with an error message.
Change-Id: I628ebce54895f44be6232b622d56acbcc421b847
Reported-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
util/board_status/board_status.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 2cb4e5c..22a1391 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -286,11 +286,19 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
echo "Uploading results"
git add "${vendor}"
git commit -a -m "${mainboard_dir}/${tagged_version}/${timestamp}"
- git push origin
+ COUNT=0
+ until [[ git push origin -eq 0 || $COUNT -gt 2 ]]; do
+ git pull --rebase
+ COUNT=$((COUNT + 1))
+ done;
# Results have been uploaded so it's pointless to keep the
# temporary files around.
rm -rf "${tmpdir}"
+ if [ $COUNT -gt 2 ]; then
+ "Error uploading to board-status repo, aborting"
+ exit $EXIT_FAILURE
+ fi
fi
cd "$coreboot_dir"
More information about the coreboot-gerrit
mailing list