summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-03-20 21:27:32 +0200
committerArnold D. Robbins <arnold@skeeve.com>2017-03-20 21:27:32 +0200
commit7aeea616b4b0272c130ac45c65e640b3482add24 (patch)
tree6b38ab900c285a78ea0449632330816a361bcf34
parentefc7e96c876ccf3b83ab3249eca852a0292ff943 (diff)
downloadgawk-7aeea616b4b0272c130ac45c65e640b3482add24.tar.gz
Improvements in update-branches.sh helper script.
-rw-r--r--helpers/ChangeLog4
-rwxr-xr-xhelpers/update-branches.sh24
2 files changed, 25 insertions, 3 deletions
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index a3d6815c..b08dec6c 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,7 @@
+2017-03-20 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * update-branches.sh: Robustness improvements.
+
2017-02-23 Arnold D. Robbins <arnold@skeeve.com>
* update-branches.sh: New file.
diff --git a/helpers/update-branches.sh b/helpers/update-branches.sh
index 659da8b8..b08e1f16 100755
--- a/helpers/update-branches.sh
+++ b/helpers/update-branches.sh
@@ -6,14 +6,32 @@ then
exit 1
fi
-git checkout master || exit
+doit () {
+ echo "
+ Running: $@"
+ "$@" || {
+ echo "Oops: command [$@] failed with status $?"
+ return 1
+ }
+}
+
+doit git checkout master || exit
features=$(git branch -a | grep /origin/feature/ | sed 's;.*/origin/;;')
others="porting"
for i in $others $features
do
- (git checkout $i && git pull && git merge master && git push) || break
+ echo "
+ Updating branch $i"
+ (doit git checkout $i && doit git pull && doit git merge master && doit git push) || {
+ echo "
+Error encountered updating branch $i.
+Please resolve the conflict and push it manually in a separate window.
+Please hit enter when you are done so we may continue to merge into
+the other branches."
+ read x
+ }
done
-git checkout master || exit
+doit git checkout master