2 #===-- merge.sh - Test the LLVM release candidates -------------------------===#
4 # The LLVM Compiler Infrastructure
6 # This file is distributed under the University of Illinois Open Source
9 #===------------------------------------------------------------------------===#
11 # Merge a revision into a project.
13 #===------------------------------------------------------------------------===#
21 echo "usage: `basename $0` [OPTIONS]"
22 echo " -proj PROJECT The project to merge the result into"
23 echo " -rev NUM The revision to merge into the project"
26 while [ $# -gt 0 ]; do
32 -proj | --proj | -project | --project | -p )
40 echo "unknown option: $1"
49 if [ "x$rev" = "x" -o "x$proj" = "x" ]; then
50 echo "error: need to specify project and revision"
56 if ! svn ls http://llvm.org/svn/llvm-project/$proj/trunk > /dev/null 2>&1 ; then
57 echo "error: invalid project: $proj"
61 tempfile=`mktemp /tmp/merge.XXXXXX` || exit 1
63 echo "Merging r$rev:" > $tempfile
64 svn log -c $rev http://llvm.org/svn/llvm-project/$proj/trunk >> $tempfile 2>&1
67 echo "# Updating tree"
69 echo "# Merging r$rev into $proj"
70 svn merge -c $rev https://llvm.org/svn/llvm-project/$proj/trunk . || exit 1
71 echo "# Committing changes"
72 svn commit -F $tempfile || exit 1