From e8afde8a4671bee636bd4174c51b55990d7410f0 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 17 Jun 2019 10:17:32 +0200 Subject: [PATCH] Append the basename of the target branch to the name of the created branch. Typical name will be: backport-7905-to-rec-4.2.x --- build-scripts/cherry-pick-pr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-scripts/cherry-pick-pr.py b/build-scripts/cherry-pick-pr.py index c455d81159..1c0319456e 100755 --- a/build-scripts/cherry-pick-pr.py +++ b/build-scripts/cherry-pick-pr.py @@ -29,7 +29,7 @@ action = a.add_mutually_exclusive_group(required=True) action.add_argument( '-b', '--backport-unto', metavar='REF', nargs=1, help='Backport, using ' 'cherry-pick, all commits from PULL_REQUEST onto REF. This is done on a ' - 'branch called "backport-PULL_REQUEST". When the cherry-pick fails, solve ' + 'branch called "backport-PULL_REQUEST-to-basename(REF)". When the cherry-pick fails, solve ' 'the conflict as usual and run "git cherry-pick --continue --allow-empty"') action.add_argument( '-m', '--merge-into', metavar='REF', nargs=1, help='Take the backport-' @@ -42,7 +42,7 @@ args = a.parse_args() if args.backport_unto: command = ['git', 'checkout', '-b', - 'backport-{}'.format(args.pull_request), args.backport_unto[0]] + 'backport-{}-to-{}'.format(args.pull_request, args.backport_unto[0].split('/')[-1]), args.backport_unto[0]] run_command(command) commits = get_commits(args.pull_request) -- 2.39.2