| #===-- merge.sh - Test the LLVM release candidates -------------------------===# |
| # The LLVM Compiler Infrastructure |
| # This file is distributed under the University of Illinois Open Source |
| #===------------------------------------------------------------------------===# |
| # Merge a revision into a project. |
| #===------------------------------------------------------------------------===# |
| 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" |
| -proj | --proj | -project | --project | -p ) |
| echo "unknown option: $1" |
| if [ "x$rev" = "x" -o "x$proj" = "x" ]; then |
| echo "error: need to specify project and revision" |
| if ! svn ls http://llvm.org/svn/llvm-project/$proj/trunk > /dev/null 2>&1 ; then |
| echo "error: invalid project: $proj" |
| 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 |
| 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 |