I like it, thanks Adam.

Regards
Scott

On 1/08/2010, at 6:32 AM, doo...@apache.org wrote:

> Author: doogie
> Date: Sat Jul 31 18:32:16 2010
> New Revision: 981077
> 
> URL: http://svn.apache.org/viewvc?rev=981077&view=rev
> Log:
> New merge script.
> 
> Modified:
>    ofbiz/branches/release10.04/.gitignore
>    ofbiz/branches/release10.04/mergefromtrunk.sh
>    ofbiz/branches/release10.04/runtime/   (props changed)
> 
> Modified: ofbiz/branches/release10.04/.gitignore
> URL: 
> http://svn.apache.org/viewvc/ofbiz/branches/release10.04/.gitignore?rev=981077&r1=981076&r2=981077&view=diff
> ==============================================================================
> --- ofbiz/branches/release10.04/.gitignore (original)
> +++ ofbiz/branches/release10.04/.gitignore Sat Jul 31 18:32:16 2010
> @@ -60,6 +60,7 @@ runtime/logs/*.html*
> runtime/logs/test-results/*
> runtime/data/derby/*
> runtime/catalina/work/*
> +runtime/merge-state
> runtime/tempfiles/*
> debian/EncryptPassword.class
> debian/copyright
> 
> Modified: ofbiz/branches/release10.04/mergefromtrunk.sh
> URL: 
> http://svn.apache.org/viewvc/ofbiz/branches/release10.04/mergefromtrunk.sh?rev=981077&r1=981076&r2=981077&view=diff
> ==============================================================================
> --- ofbiz/branches/release10.04/mergefromtrunk.sh (original)
> +++ ofbiz/branches/release10.04/mergefromtrunk.sh Sat Jul 31 18:32:16 2010
> @@ -18,6 +18,103 @@
> # under the License.
> #####################################################################
> set -e
> +
> +# this script requires a posix shell; namely, $(( math evaluation.
> +
> +help() {
> +     cat << _EOF_
> +$0 [options]
> +
> +mergefromtrunk.sh merge \$rev                Apply revision \$rev from trunk.
> +mergefromtrunk.sh test                       Run test suite(clean-all, 
> run-install, run-tests).
> +mergefromtrunk.sh commit             Commit current fix to svn.
> +mergefromtrunk.sh abort                      Abort current merge session.
> +
> +-h | --help          Show this help.
> +_EOF_
> +}
> +
> +cmd=""
> +rev=""
> +set -x
> +while [ $# -gt 0 ]; do
> +     case "$1" in
> +             (-h|--help)
> +                     help
> +                     exit 0
> +                     ;;
> +             (-*)
> +                     echo "Unknown arg ($1)." 1>&2
> +                     help 1>&2
> +                     exit 1
> +                     ;;
> +             (*)
> +                     if [ z = "z$cmd" ]; then
> +                             cmd="$1"
> +                     else
> +                             case "$cmd" in
> +                                     (merge)
> +                                             rev="$1"
> +                                             ;;
> +                                     (*)
> +                                             echo "Too many arguments." 1>&2
> +                                             help 1>&2
> +                                             exit 1
> +                                             ;;
> +                             esac
> +                     fi
> +                     ;;
> +     esac
> +     shift
> +done
> +case "$cmd" in
> +     (merge)
> +             if [ z = "z$rev" ]; then
> +                     echo "Need a revision." 1>&2
> +                     help 1>&2
> +                     exit 1
> +             fi
> +             if [ -d runtime/merge-state ]; then
> +                     echo "Merge session already started." 1>&2
> +                     help 1>&2
> +                     exit 1
> +             fi
> +             mkdir -p runtime/merge-state
> +             echo "$rev" > runtime/merge-state/revision
> +             # do not run any of the following commands in a complex
> +             # chained pipe; if one of the commands in the pipe fails,
> +             # it isn't possible to detect the failure.
> +             printf "Applied fix from trunk for revision: %s \n" "$rev" > 
> runtime/merge-state/log-message
> +             svn log --xml https://svn.apache.org/repos/asf/ofbiz/trunk -r 
> "$rev" > runtime/merge-state/log.xml
> +             sed -ne '/^<msg>/s,<msg>\(.*\)</msg>$,\1,p' < 
> runtime/merge-state/log.xml >> runtime/merge-state/log-message
> +             prevRev=$(($rev - 1))
> +             svn merge -r "$prevRev:$rev" 
> https://svn.apache.org/repos/asf/ofbiz/trunk 
> +             ;;
> +     (test)
> +             ant clean-all
> +             ant run-install
> +             ant run-tests
> +             ;;
> +     (commit)
> +             svn commit
> +             rm -rf runtime/merge-state
> +             ;;
> +     (abort)
> +             svn revert .
> +             rm -rf runtime/merge-state
> +             ;;
> +     ("")
> +             echo "Need a command and a revision." 1>&2
> +             help 1>&2
> +             exit 1
> +             ;;
> +     (*)
> +             echo "Unknown command($cmd)." 1>&2
> +             help 1>&2
> +             exit 1
> +             ;;
> +esac
> +exit
> prevRev=`expr $1 - 1`
> svn merge -r $prevRev:$1 https://svn.apache.org/repos/asf/ofbiz/trunk 
> trunkLog=runtime/trunkLog.xml
> 
> Propchange: ofbiz/branches/release10.04/runtime/
> ------------------------------------------------------------------------------
> --- svn:ignore (original)
> +++ svn:ignore Sat Jul 31 18:32:16 2010
> @@ -3,3 +3,4 @@ svninfo.ftl
> data.zip
> test-list-build.xml
> uploads
> +merge-state
> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to