Re: svn commit: r981077 - in /ofbiz/branches/release10.04: .gitignore mergefromtrunk.sh runtime/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r981077 - in /ofbiz/branches/release10.04: .gitignore mergefromtrunk.sh runtime/

Scott Gray-2
I like it, thanks Adam.

Regards
Scott

On 1/08/2010, at 6:32 AM, [hidden email] 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
>
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r981077 - in /ofbiz/branches/release10.04: .gitignore mergefromtrunk.sh runtime/

Adam Heath-2
Scott Gray wrote:
> I like it, thanks Adam.

It'd be nice if the logic was added to the .bat version too.  I don't
have a windows install available to test with.

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r981077 - in /ofbiz/branches/release10.04: .gitignore mergefromtrunk.sh runtime/

Scott Gray-2

On 1/08/2010, at 3:28 PM, Adam Heath wrote:

> Scott Gray wrote:
>> I like it, thanks Adam.
>
> It'd be nice if the logic was added to the .bat version too.  I don't
> have a windows install available to test with.

Can't help you there, sorry.

BTW did you notice my commit message didn't come through on 9.04 r981114 and same with yours on r981112?  Your recent one did on r981129, but I didn't see any changes to the script in the interim.

Regards
Scott


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r981077 - in /ofbiz/branches/release10.04: .gitignore mergefromtrunk.sh runtime/

Jacques Le Roux
Administrator
In reply to this post by Adam Heath-2
Adam Heath wrote:
> Scott Gray wrote:
>> I like it, thanks Adam.
>
> It'd be nice if the logic was added to the .bat version too.  I don't
> have a windows install available to test with.

The simple one I built is enough for me.

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r981077 - in /ofbiz/branches/release10.04: .gitignore mergefromtrunk.sh runtime/

Scott Gray-2
On 1/08/2010, at 10:03 PM, Jacques Le Roux wrote:

> Adam Heath wrote:
>> Scott Gray wrote:
>>> I like it, thanks Adam.
>> It'd be nice if the logic was added to the .bat version too.  I don't
>> have a windows install available to test with.
>
> The simple one I built is enough for me.
>
> Jacques

I still have a problem with backports not being tested before committing though.  This can be done now with Adam's version.

Regards
Scott



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r981077 - in /ofbiz/branches/release10.04: .gitignore mergefromtrunk.sh runtime/

Jacques Le Roux
Administrator
Yes, I could add this part, seems not hard to do indeed. OK, I will...

Jacques

Scott Gray wrote:

> On 1/08/2010, at 10:03 PM, Jacques Le Roux wrote:
>
>> Adam Heath wrote:
>>> Scott Gray wrote:
>>>> I like it, thanks Adam.
>>> It'd be nice if the logic was added to the .bat version too.  I don't
>>> have a windows install available to test with.
>>
>> The simple one I built is enough for me.
>>
>> Jacques
>
> I still have a problem with backports not being tested before committing though.  This can be done now with Adam's version.
>
> Regards
> Scott