]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Append the basename of the target branch to the name of the created branch. 7940/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 17 Jun 2019 08:17:32 +0000 (10:17 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 17 Jun 2019 08:19:23 +0000 (10:19 +0200)
Typical name will be: backport-7905-to-rec-4.2.x

build-scripts/cherry-pick-pr.py

index c455d81159a8c7097a047ca0af9bb8d61f2fecbb..1c0319456e919676dad7706464f37cb90ff3c2f2 100755 (executable)
@@ -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 '
 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-'
     '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',
 
 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)
     run_command(command)
 
     commits = get_commits(args.pull_request)