/** * Requires that no hotfix branches already exist * @throws HotfixBranchExistsException * @throws JGitFlowGitAPIException */ protected void requireNoExistingHotfixBranches() throws HotfixBranchExistsException, JGitFlowGitAPIException { List<Ref> branches = GitHelper.listBranchesWithPrefix(git, JGitFlowConstants.PREFIXES.HOTFIX.configKey()); if (!branches.isEmpty()) { reporter.errorText(getCommandName(),"a hotfix branch [" + branches.get(0).getName() + "] already exists. Finish that first!"); reporter.flush(); throw new HotfixBranchExistsException("a hotfix branch [" + branches.get(0).getName() + "] already exists. Finish that first!"); } }
throw new JGitFlowReleaseException("Error starting hotfix: " + e.getMessage(), e);
/** * Requires that no hotfix branches already exist * * @throws com.atlassian.jgitflow.core.exception.HotfixBranchExistsException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ public void requireNoExistingHotfixBranches() throws HotfixBranchExistsException, JGitFlowGitAPIException { List<Ref> branches = GitHelper.listBranchesWithPrefix(git, gfConfig.getPrefixValue(JGitFlowConstants.PREFIXES.HOTFIX.configKey())); if (!branches.isEmpty()) { reporter.errorText(commandName, "a hotfix branch [" + branches.get(0).getName() + "] already exists. Finish that first!"); reporter.flush(); throw new HotfixBranchExistsException("a hotfix branch [" + branches.get(0).getName() + "] already exists. Finish that first!"); } }
/** * Requires that no hotfix branches already exist * * @throws com.atlassian.jgitflow.core.exception.HotfixBranchExistsException * @throws com.atlassian.jgitflow.core.exception.JGitFlowGitAPIException */ public void requireNoExistingHotfixBranches() throws HotfixBranchExistsException, JGitFlowGitAPIException { List<Ref> branches = GitHelper.listBranchesWithPrefix(git, gfConfig.getPrefixValue(JGitFlowConstants.PREFIXES.HOTFIX.configKey())); if (!branches.isEmpty()) { reporter.errorText(commandName, "a hotfix branch [" + branches.get(0).getName() + "] already exists. Finish that first!"); reporter.flush(); throw new HotfixBranchExistsException("a hotfix branch [" + branches.get(0).getName() + "] already exists. Finish that first!"); } }