From: Otto Moerbeek Date: Mon, 17 Jun 2019 08:17:32 +0000 (+0200) Subject: Append the basename of the target branch to the name of the created branch. X-Git-Tag: dnsdist-1.4.0-rc1~121^2 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fpdns.git;a=commitdiff_plain;h=e8afde8a4671bee636bd4174c51b55990d7410f0;ds=sidebyside 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 --- 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)