summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-16 01:54:03 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-16 01:54:03 +0000
commitf4a4e3ae740979ea7877f55e34cdb5abac9cbe33 (patch)
treeca298b683878f6c79a894e511ca7dd4af5a9c75e /utils
parent4145c49aa0e0e70a51a395bdd4107a464d05e592 (diff)
downloadllvm-f4a4e3ae740979ea7877f55e34cdb5abac9cbe33.tar.gz
llvm-f4a4e3ae740979ea7877f55e34cdb5abac9cbe33.tar.bz2
llvm-f4a4e3ae740979ea7877f55e34cdb5abac9cbe33.tar.xz
Add a script that helps merge changes into a release branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/release/merge.sh72
1 files changed, 72 insertions, 0 deletions
diff --git a/utils/release/merge.sh b/utils/release/merge.sh
new file mode 100755
index 0000000000..a6b716e3d3
--- /dev/null
+++ b/utils/release/merge.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+#===-- merge.sh - Test the LLVM release candidates -------------------------===#
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License.
+#
+#===------------------------------------------------------------------------===#
+#
+# Merge a revision into a project.
+#
+#===------------------------------------------------------------------------===#
+
+set -e
+
+rev=""
+proj=""
+
+function usage() {
+ echo "usage: `basename $0` [OPTIONS]"
+ echo " -proj PROJECT The project to merge the result into"
+ echo " -rev NUM The revision to merge into the project"
+}
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ -rev | --rev | -r )
+ shift
+ rev=$1
+ ;;
+ -proj | --proj | -project | --project | -p )
+ shift
+ proj=$1
+ ;;
+ -h | -help | --help )
+ usage
+ ;;
+ * )
+ echo "unknown option: $1"
+ echo ""
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+if [ "x$rev" = "x" -o "x$proj" = "x" ]; then
+ echo "error: need to specify project and revision"
+ echo
+ usage
+ exit 1
+fi
+
+if ! svn ls http://llvm.org/svn/llvm-project/$proj/trunk > /dev/null 2>&1 ; then
+ echo "error: invalid project: $proj"
+ exit 1
+fi
+
+tempfile=`mktemp /tmp/merge.XXXXXX` || exit 1
+
+echo "Merging r$rev:" > $tempfile
+svn log -c $rev http://llvm.org/svn/llvm-project/$proj/trunk >> $tempfile 2>&1
+
+cd $proj.src
+echo "# Merging r$rev into $proj"
+svn merge -c $rev https://llvm.org/svn/llvm-project/$proj/trunk . || exit 1
+echo "# Committing changes"
+svn commit -F $tempfile || exit 1
+rm -f $tempfile
+exit 0