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