From f93a65c60140ccf96f550dd60fafdfa1ba1d8ca9 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 20 Dec 2013 15:01:32 -0800 Subject: [PATCH] Meta/pushall: iterate and retry --- pushall | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/pushall b/pushall index e46ddf6086..d262e9f823 100755 --- a/pushall +++ b/pushall @@ -1,10 +1,25 @@ #!/bin/sh -# for remote in ko repo gph github2 sfjp sf.net -for remote in ko repo gph github2 sfjp sf.net +sites='ko repo github2 sfjp sf.net gph ' + +while : do - printf "%s: " "$remote" - git push --follow-tags "$remote" "$@" || exit $? + failed= + for remote in $sites + do + printf "%s: " "$remote" + git push --follow-tags "$remote" "$@" || failed="$failed$remote " + done + + if test -z "$failed" + then + break + elif test "x$sites" = "x$failed" + then + echo >&2 "Failed to push to: $sites" + exit 1 + fi + sites="$failed" done case "$#,$*" in -- 2.47.3