Commit 5a29a44e authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Check that current branch is allowed

parent b1aa3d49
......@@ -171,6 +171,11 @@ def main():
print "Latest Reflog entry is %s" % reflog_hexsha
branch =
allowed_branches = ", ".join(x for x in BRANCH_TYPES.keys())
if branch.split('-')[0] not in allowed_branches:
raise ValueError("Malformed branch name '%s', cannot classify as"
" one of %s" % (branch, allowed_branches))
brnorm = versioning.normalize_branch_name(branch)
btypestr = versioning.get_branch_type(brnorm)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment