Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions dev/merge_spark_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,33 @@ def _do_cherry_pick(pr_num, merge_hash, pick_ref):
run_cmd("git checkout %s" % pick_branch_name)

try:
run_cmd("git cherry-pick -sx %s" % merge_hash)
run_cmd(
[
"git",
"-c",
"commit.cleanup=scissors",
"cherry-pick",
"-sx",
merge_hash,
]
)
except Exception as e:
msg = "Error cherry-picking: %s\nWould you like to manually fix-up this merge?" % e
continue_maybe(msg, True)
msg = "Okay, please fix any conflicts and finish the cherry-pick. Finished?"
msg = "Okay, please fix any conflicts and 'git add' conflicting files... Finished?"
continue_maybe(msg, True)
# Important to use `scissors` and `--edit` otherwise git will strip lines starting with `#`
# when calling `--continue`. See: https://github.com/apache/spark/pull/58214
run_cmd(
[
"git",
"-c",
"commit.cleanup=scissors",
"cherry-pick",
"--continue",
"--edit",
]
)

continue_maybe(
"Pick complete (local ref %s). Push to %s?" % (pick_branch_name, PUSH_REMOTE_NAME)
Expand Down