fi
else
set +x
+ maybe_restore_set_x
error "Cannot initialize $local_branch - local branch already exists"
false
fi
git fetch "$upstream_remote" "pull/$original_pr/head:pr-$original_pr"
set +x
+ maybe_restore_set_x
info "Attempting to cherry pick $number_of_commits commits from ${original_pr_url} into local branch $local_branch"
offset="$((number_of_commits - 1))" || true
for ((i=offset; i>=0; i--)) ; do
set -x
if git cherry-pick -x "$sha1_to_cherry_pick" ; then
set +x
+ maybe_restore_set_x
else
set +x
+ maybe_restore_set_x
[ "$VERBOSE" ] && git status
error "Cherry pick failed"
info "Next, manually fix conflicts and complete the current cherry-pick"
set -x
rm -f "$deprecated_backport_common"
set +x
+ maybe_restore_set_x
fi
fi
if [ -e "$deprecated_backport_common" ] ; then
fi
}
+function maybe_restore_set_x {
+ if [ "$DEBUG" ] ; then
+ set -x
+ fi
+}
+
function maybe_update_pr_milestone_labels {
local component
local data_binary
set -x
git checkout "$local_branch"
set +x
+ maybe_restore_set_x
fi
set -x
git push -u "$fork_remote" "$local_branch"
set +x
+ maybe_restore_set_x
original_issue=""
original_pr=""