From a7459e7463ea4a63eaaa1a0b3f19ea0a64788ad3 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 17 Apr 2019 12:42:02 +0200 Subject: [PATCH] backport_pr: don't assume devel remote to be 'origin' --- dist/tools/backport_pr/backport_pr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/tools/backport_pr/backport_pr.py b/dist/tools/backport_pr/backport_pr.py index 19b7553c0a..37db6bc2db 100755 --- a/dist/tools/backport_pr/backport_pr.py +++ b/dist/tools/backport_pr/backport_pr.py @@ -185,9 +185,10 @@ def main(): for commit in commits: bp_repo.git.cherry_pick('-x', commit['sha']) # Push to github - print("Pushing branch {} to origin".format(new_branch)) + origin = _find_remote(repo, username, REPO) + print("Pushing branch {} to {}".format(new_branch, origin)) if not args.noop: - repo.git.push('origin', '{0}:{0}'.format(new_branch)) + repo.git.push(origin, '{0}:{0}'.format(new_branch)) except Exception as exc: # Delete worktree print("Pruning temporary workdir at {}".format(worktree_dir))