From 8266dae0e9404c20093daa21645d4d66d8bb7bdb Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Thu, 4 Jun 2015 10:53:16 -0700 Subject: [PATCH] HADOOP-11994. smart-apply-patch wrongly assumes that git is infallible. (Contributed by Kengo Seki) --- dev-support/smart-apply-patch.sh | 5 ++++- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dev-support/smart-apply-patch.sh b/dev-support/smart-apply-patch.sh index be29c47181..ebcb660c51 100755 --- a/dev-support/smart-apply-patch.sh +++ b/dev-support/smart-apply-patch.sh @@ -101,7 +101,10 @@ if grep -q "^diff --git" "${PATCH_FILE}"; then fi # shellcheck disable=SC2086 git apply ${GIT_FLAGS} "${PATCH_FILE}" - exit $? + if [[ $? == 0 ]]; then + cleanup 0 + fi + echo "git apply failed. Going to apply the patch with: ${PATCH}" fi # Come up with a list of changed files into $TMP diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 3bca0bc31f..942d9e9ef9 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -820,6 +820,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12019. update BUILDING.txt to include python for 'mvn site' in windows (vinayakumarb) + HADOOP-11994. smart-apply-patch wrongly assumes that git is infallible. + (Kengo Seki via Arpit Agarwal) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES