HBASE-15725 make_patch.sh should add the branch name when -b is passed. -- addendum

This commit is contained in:
Elliott Clark 2016-05-13 16:38:02 -07:00
parent 00e61d2cfd
commit c12eaa5cc4
1 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ elif [ "$status" -ge 1 ]; then
# At least one patch already exists -- add a version prefix # At least one patch already exists -- add a version prefix
for i in {1..99}; do for i in {1..99}; do
# Check to see the maximum version of patch that exists # Check to see the maximum version of patch that exists
if [ ! -f "$patch_dir/$branch-v$i.patch" ]; then if [ ! -f "$patch_dir/$branch.v$i.patch" ]; then
version=$i version=$i
if [ -n "$addendum" ]; then if [ -n "$addendum" ]; then
# Don't increment the patch # if it is an addendum # Don't increment the patch # if it is an addendum
@ -108,10 +108,10 @@ elif [ "$status" -ge 1 ]; then
else else
# We are making an addendum to a different version of the patch # We are making an addendum to a different version of the patch
let version=$version-1 let version=$version-1
prefix="-v$version" prefix=".v$version"
fi fi
else else
prefix="-v$version" prefix=".v$version"
fi fi
break break
fi fi
@ -122,7 +122,7 @@ fi
tracking_suffix="" tracking_suffix=""
if [[ $tracking_branch != "origin/master" \ if [[ $tracking_branch != "origin/master" \
&& $tracking_branch != "master" ]]; then && $tracking_branch != "master" ]]; then
tracking_suffix="-${tracking_branch#origin/}" tracking_suffix=".${tracking_branch#origin/}"
fi fi
patch_name="$branch$prefix$addendum$tracking_suffix.patch" patch_name="$branch$prefix$addendum$tracking_suffix.patch"