diff --git a/Makefile b/Makefile index df93c432ee..9de9cbafef 100644 --- a/Makefile +++ b/Makefile @@ -166,8 +166,7 @@ check-merges-reproducibility: echo "Running replay_merge for idx $$idx"; \ src/python/replay_merge.py --testing --merges_csv $(CSV_RESULTS) -skip_build -delete_workdir --idx $$idx || FAILED_IDXES="$$FAILED_IDXES $$idx"; \ done; \ - echo "$$FAILED_IDXES"; \ - test -z "$$FAILED_IDXES" + test -z "$$FAILED_IDXES" || { echo "Failed indexes = $$FAILED_IDXES"; false; } protect-repos: find repos -mindepth 1 -type d -exec chmod a-w {} + diff --git a/src/scripts/merge_tools/git_hires_merge.sh b/src/scripts/merge_tools/git_hires_merge.sh index 83d2fad295..e15431ee96 100755 --- a/src/scripts/merge_tools/git_hires_merge.sh +++ b/src/scripts/merge_tools/git_hires_merge.sh @@ -13,8 +13,10 @@ clone_dir=$1 branch1=$2 branch2=$3 +SCRIPTDIR="$(cd "$(dirname "$0")" && pwd -P)" + # Print the current PATH -echo "PATH: $PATH" +echo "$0 PATH: $PATH" cd "$clone_dir" || { echo "$0: cannot cd to $clone_dir from $(pwd)"; exit 2; } @@ -25,7 +27,7 @@ attributes_file=".git/info/attributes" echo "* merge=git-hires-merge" >> "$attributes_file" git config --local merge.git-hires-merge.name "An interactive merge driver for resolving conflicts on individual or adjacent lines" -git config --local merge.git-hires-merge.driver "git-hires-merge %O %A %B %L %P" +git config --local merge.git-hires-merge.driver "${SCRIPTDIR}/git-hires-merge %O %A %B %L %P" git config --local merge.git-hires-merge.recursive "binary" git config --local merge.conflictstyle diff3 diff --git a/src/scripts/merge_tools/merge_git_then_plumelib.sh b/src/scripts/merge_tools/merge_git_then_plumelib.sh index 62d8561d99..7cf9a5827c 100755 --- a/src/scripts/merge_tools/merge_git_then_plumelib.sh +++ b/src/scripts/merge_tools/merge_git_then_plumelib.sh @@ -19,6 +19,8 @@ branch2=$3 git_strategy=$4 #"-Xignore-space-change" plumelib_strategy=$5 #"--only-adjacent" +SCRIPTDIR="$(cd "$(dirname "$0")" && pwd -P)" + VERBOSE= ## Enable for debugging # VERBOSE=YES @@ -55,11 +57,7 @@ fi git config --local merge.tool merge-plumelib # shellcheck disable=SC2016 -if [ -n "$VERBOSE" ] ; then - git config --local mergetool.merge-plumelib.cmd 'merge-tool.sh --verbose '"$plumelib_strategy"' ${LOCAL} ${BASE} ${REMOTE} ${MERGED}' -else - git config --local mergetool.merge-plumelib.cmd 'merge-tool.sh '"$plumelib_strategy"' ${LOCAL} ${BASE} ${REMOTE} ${MERGED}' -fi +git config --local mergetool.merge-plumelib.cmd "$SCRIPTDIR"/'java-merge-tool.sh '"$plumelib_strategy"' ${BASE} ${LOCAL} ${REMOTE} ${MERGED}' git config --local mergetool.merge-plumelib.trustExitCode true case "$plumelib_strategy" in diff --git a/src/scripts/merge_tools/merge_script_then_plumelib.sh b/src/scripts/merge_tools/merge_script_then_plumelib.sh index 92172e45f3..b63d643fb5 100755 --- a/src/scripts/merge_tools/merge_script_then_plumelib.sh +++ b/src/scripts/merge_tools/merge_script_then_plumelib.sh @@ -20,6 +20,8 @@ branch2=$3 merge_script=$4 #"-Xignore-space-change" plumelib_strategy=$5 #"--only-adjacent" +SCRIPTDIR="$(cd "$(dirname "$0")" && pwd -P)" + VERBOSE= ## Enable for debugging # VERBOSE=YES @@ -56,11 +58,7 @@ fi git config --local merge.tool merge-plumelib # shellcheck disable=SC2016 -if [ -n "$VERBOSE" ] ; then - git config --local mergetool.merge-plumelib.cmd 'merge-tool.sh --verbose '"$plumelib_strategy"' ${LOCAL} ${BASE} ${REMOTE} ${MERGED}' -else - git config --local mergetool.merge-plumelib.cmd 'merge-tool.sh '"$plumelib_strategy"' ${LOCAL} ${BASE} ${REMOTE} ${MERGED}' -fi +git config --local mergetool.merge-plumelib.cmd "$SCRIPTDIR"/'java-merge-tool.sh '"$plumelib_strategy"' ${BASE} ${LOCAL} ${REMOTE} ${MERGED}' git config --local mergetool.merge-plumelib.trustExitCode true case "$plumelib_strategy" in