1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

backport_pr: exit early when backport branch already exists

This commit is contained in:
Martine Lenders 2019-04-17 12:44:21 +02:00
parent a7459e7463
commit 1930368fd5

View File

@ -174,6 +174,9 @@ def main():
# Build topic branch in temp dir
new_branch = args.backport_branch_fmt.format(release=release_shortname,
origbranch=orig_branch)
if new_branch in repo.branches:
print("ERROR: Branch {} already exists".format(new_branch))
sys.exit(1)
worktree_dir = os.path.join(args.gitdir, WORKTREE_SUBDIR)
repo.git.worktree("add", "-b",
new_branch,