summaryrefslogtreecommitdiffstats
path: root/scripts/merge-all.sh
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2012-01-27 08:28:24 +0000
committerArtur Signell <artur.signell@itmill.com>2012-01-27 08:28:24 +0000
commitf08f86caf9bba1304ff42669e8b97ad8e81236e4 (patch)
tree0bfab048cc2d2b46de661f5cf45947a7fd80ae33 /scripts/merge-all.sh
parent94dddf055a57b344d326c7c1e04a982862ce4382 (diff)
downloadvaadin-framework-f08f86caf9bba1304ff42669e8b97ad8e81236e4.tar.gz
vaadin-framework-f08f86caf9bba1304ff42669e8b97ad8e81236e4.zip
Scripts for easing merge from 6.7
svn changeset:22783/svn branch:6.8
Diffstat (limited to 'scripts/merge-all.sh')
-rwxr-xr-xscripts/merge-all.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/scripts/merge-all.sh b/scripts/merge-all.sh
new file mode 100755
index 0000000000..74502a0533
--- /dev/null
+++ b/scripts/merge-all.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+FROM=$1
+AUTOMERGE=$2
+if [ "$FROM" = "" ]
+then
+ echo "Usage: $0 <from version> [automerge]"
+ exit
+fi
+if [ "$AUTOMERGE" = "automerge" ]
+then
+ AUTOCOMMIT="autocommit"
+fi
+
+svn up
+localchanges=`svn stat|wc -l`
+if [ "$localchanges" != "0" ] && [ "$IGNOREDIRTY" != "ignoredirty" ]
+then
+ echo "You must have a clean working space copy"
+ exit
+fi
+
+currentrepowithoutversion=`svn info|grep URL|sed "s/URL: //"|sed "s/\/[^\/]*$//"`
+
+sourceurl="$currentrepowithoutversion/$FROM"
+
+if [ "$unmerged" = "" ]
+then
+ echo "No changes to merge"
+ exit 0
+fi
+echo "Unmerged changes"
+echo "================"
+for revision in $unmerged
+do
+ echo -n "[$revision] "
+ svn log $sourceurl -r $revision --xml|grep "<msg>"|sed "s/<msg>//"|sed "s/<\/msg>//"
+done
+
+cmd=""
+for revision in $unmerged
+do
+ thiscmd=`dirname $0`"/merge.sh $FROM $revision $AUTOCOMMIT $IGNOREDIRTY"
+ cmd="$thiscmd && "
+ if [ "$AUTOMERGE" = "automerge" ]
+ then
+ echo "Merging [$revision]..."
+ $thiscmd
+ if [ "$?" != "0" ]
+ then
+ echo "Merge of [$revision] failed, aborting..."
+ exit 1
+ fi
+ fi
+done
+cmd="$cmd true"
+if [ "$AUTOMERGE" != "automerge" ]
+then
+ echo
+ echo "Merge command:"
+ echo
+ echo $cmd
+fi
+