Repository: hbase Updated Branches: refs/heads/master a7816d88b -> 393191046
HBASE-12944 Support patches to branches in precommit jenkins build (ADDENDUM to fix the script) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/39319104 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/39319104 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/39319104 Branch: refs/heads/master Commit: 3931910460405488a16359d9ab24a3b75ff94044 Parents: a7816d8 Author: Enis Soztutar <e...@apache.org> Authored: Thu Jan 29 15:07:58 2015 -0800 Committer: Enis Soztutar <e...@apache.org> Committed: Thu Jan 29 15:08:18 2015 -0800 ---------------------------------------------------------------------- dev-support/test-patch.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/39319104/dev-support/test-patch.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index e1e6698..bacf22c 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -201,13 +201,6 @@ checkout () { fi fi echo - else - if [[ $BRANCH_NAME -ne "master" ]]; then - echo "${GIT} checkout ${BRANCH_NAME}" - ${GIT} checkout ${BRANCH_NAME} - echo "${GIT} status" - ${GIT} status - fi fi return $? } @@ -223,6 +216,26 @@ findBranchNameFromPatchName() { return 0 } +checkoutBranch() { + echo "" + echo "" + echo "======================================================================" + echo "======================================================================" + echo " Testing patch on branch ${BRANCH_NAME}." + echo "======================================================================" + echo "======================================================================" + echo "" + echo "" + if [[ $JENKINS == "true" ]] ; then + if [[ $BRANCH_NAME -ne "master" ]]; then + echo "${GIT} checkout ${BRANCH_NAME}" + ${GIT} checkout ${BRANCH_NAME} + echo "${GIT} status" + ${GIT} status + fi + fi +} + ############################################################################### setup () { ### Download latest patch file (ignoring .htm and .html) when run from patch process @@ -247,6 +260,7 @@ setup () { $WGET -q -O $PATCH_DIR/patch $patchURL VERSION=${GIT_COMMIT}_${defect}_PATCH-${patchNum} findBranchNameFromPatchName ${relativePatchURL} + checkoutBranch JIRA_COMMENT="Here are the results of testing the latest attachment $patchURL against ${BRANCH_NAME} branch at commit ${GIT_COMMIT}.