From 2a6bf90fbc6b81bb6a96376adf7c5df0181c7f12 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 21 Apr 2016 16:49:38 +0200 Subject: [PATCH] Block stable/feature branch for new project imports When importing projects, check that they do not contain a simple "stable" branch as that will block creation of "stable/RELEASE" branches like "stable/mitaka". Similar for "feature". Change-Id: Ia190fdbddf9029149b54e686aa0e82fe040b6733 --- tools/check_valid_gerrit_projects.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/check_valid_gerrit_projects.py b/tools/check_valid_gerrit_projects.py index b3bd37a717..cdbc1740de 100755 --- a/tools/check_valid_gerrit_projects.py +++ b/tools/check_valid_gerrit_projects.py @@ -50,6 +50,16 @@ def check_repo(repo_path): else: found_errors += 1 print(" Error: No master branch exists") + if 'origin/stable' in branches: + found_errors += 1 + print(" A branch named 'stable' exists, this will break future\n") + print(" creation of stable/RELEASE branches.\n") + print(" Delete the branch on your upstream project.") + if 'origin/feature' in branches: + found_errors += 1 + print(" A branch named 'feature' exists, this will break future\n") + print(" creation of feature/NAME branches.\n") + print(" Delete the branch on your upstream project.") if repo.tags: print(" Found the following tags:") for tag in repo.tags: