From: Robin Wittler Date: Wed, 3 Aug 2011 12:53:42 +0000 (+0200) Subject: add check X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=752d7dcc337f8fd8a17d3d640434fdedbb642def;p=profitbricks%2Fjenkins-build-scripts.git add check --- diff --git a/lib/git_helper.py b/lib/git_helper.py index 771e6e0..779b57f 100644 --- a/lib/git_helper.py +++ b/lib/git_helper.py @@ -72,6 +72,8 @@ def git_clone_remote_repository(url, destination): def git_new_branch_from(branch_name, from_branch): if git_repo_has_branch(branch_name): raise BranchExistError(branch_name) + if not git_repo_has_branch(from_branch): + raise BranchNotExistError(from_branch) cmd = [GIT, 'checkout', '-b', branch_name, from_branch] cmdobj = subprocess.Popen(