]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #7940 from omoerbeek/include-branch-in-cherry-pick-name
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 17 Jun 2019 08:23:54 +0000 (10:23 +0200)
committerGitHub <noreply@github.com>
Mon, 17 Jun 2019 08:23:54 +0000 (10:23 +0200)
Append the basename of the target branch to the name of the created branch

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 '
-    '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)