sp-2 minor
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9dc2758b Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9dc2758b Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9dc2758b Branch: refs/heads/gg-9869 Commit: 9dc2758b5ded3f897c277777313adc7f2c0e8b57 Parents: 196519c6 Author: Yakov Zhdanov <yzhda...@gridgain.com> Authored: Fri Mar 27 16:28:33 2015 +0300 Committer: Yakov Zhdanov <yzhda...@gridgain.com> Committed: Fri Mar 27 16:28:33 2015 +0300 ---------------------------------------------------------------------- scripts/git-patch-functions.sh | 37 +++++++++++++++++++++++-------------- scripts/git-patch-prop.sh | 7 +++++-- 2 files changed, 28 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9dc2758b/scripts/git-patch-functions.sh ---------------------------------------------------------------------- diff --git a/scripts/git-patch-functions.sh b/scripts/git-patch-functions.sh old mode 100644 new mode 100755 index ab9bec3..03bf8e0 --- a/scripts/git-patch-functions.sh +++ b/scripts/git-patch-functions.sh @@ -21,7 +21,8 @@ # # -# Define functions. +# Doc +# Parameters # formatPatch () { GIT_HOME=$1 @@ -33,9 +34,9 @@ formatPatch () { git checkout ${DEFAULT_BRANCH} git checkout -b tmppatch - + git merge --no-edit ${PATCHED_BRANCH} -# Or we can 'squashe' merge to make only one commit. +# Or we can 'squash' merge to make only one commit. # git merge --squash ${PATCHED_BRANCH} # git commit -a -m "# PATCHED_BRANCH" @@ -45,23 +46,31 @@ formatPatch () { echo "Patch file created." git checkout ${PATCHED_BRANCH} - + git branch -D tmppatch # Delete tmp branch. - - echo + + echo echo "Patch created: ${PATCH_FILE}" } +# +# Doc +# Parameters +# determineCurrentBranch () { GIT_HOME=$1 - + cd ${GIT_HOME} - + CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` - + echo "$CURRENT_BRANCH" } +# +# Doc +# Parameters +# requireCleanWorkTree () { cd $1 # At git home. @@ -100,12 +109,12 @@ applyPatch () { PATCH_FILE=$3 cd ${GIT_HOME} - + if [ ! -f ${PATCH_FILE} ] then echo $0", ERROR:" echo "Expected patch file not found: $PATCH_FILE." - + exit 1 fi @@ -121,12 +130,12 @@ currentAndDefaultBranchesShouldBeEqual () { cd ${GIT_HOME} CURRENT_BRANCH=$( determineCurrentBranch ${GIT_HOME} ) - + if [ "$CURRENT_BRANCH" != "$DEFAULT_BRANCH" ] - then + then echo $0", ERROR:" echo "You are not on an expected branch. Your current branch at $GIT_HOME is $CURRENT_BRANCH, should be $DEFAULT_BRANCH." - + exit 1 fi } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9dc2758b/scripts/git-patch-prop.sh ---------------------------------------------------------------------- diff --git a/scripts/git-patch-prop.sh b/scripts/git-patch-prop.sh old mode 100644 new mode 100755 index 7eb3639..dadc96c --- a/scripts/git-patch-prop.sh +++ b/scripts/git-patch-prop.sh @@ -17,12 +17,15 @@ # # -# Git patch-file maker/applyer properties. +# Git patch-file formatter and applier properties. # + +#IGNITE_DEFAULT_BRANCH='sprint-2' +#BATCHES_HOME=${GG_HOME} if [ "${IGNITE_DEFAULT_BRANCH}" = "" ] then IGNITE_DEFAULT_BRANCH='sprint-2' fi if [ "${PATCHES_HOME}" = "" ] then PATCHES_HOME=${GG_HOME} -fi \ No newline at end of file +fi