/** * Requires that the local branch with the given name is not behind a remote brach with the same name * * @param branch The name of the branch to test * @throws com.atlassian.jgitflow.core.exception.BranchOutOfDateException * @throws com.atlassian.jgitflow.core.exception.JGitFlowIOException */ public void requireLocalBranchNotBehindRemote(String branch) throws BranchOutOfDateException, JGitFlowIOException { reporter.debugMethod(commandName, "requireLocalBranchNotBehindRemote"); boolean behind = GitHelper.localBranchBehindRemote(git, branch); if (behind) { reporter.errorText(commandName, "local branch '" + branch + "' is behind the remote branch"); reporter.endMethod(); reporter.flush(); throw new BranchOutOfDateException("local branch '" + branch + "' is behind the remote branch"); } reporter.endMethod(); }
/** * Requires that the local branch with the given name is not behind a remote brach with the same name * * @param branch The name of the branch to test * @throws com.atlassian.jgitflow.core.exception.BranchOutOfDateException * @throws com.atlassian.jgitflow.core.exception.JGitFlowIOException */ public void requireLocalBranchNotBehindRemote(String branch) throws BranchOutOfDateException, JGitFlowIOException { reporter.debugMethod(commandName, "requireLocalBranchNotBehindRemote"); boolean behind = GitHelper.localBranchBehindRemote(git, branch); if (behind) { reporter.errorText(commandName, "local branch '" + branch + "' is behind the remote branch"); reporter.endMethod(); reporter.flush(); throw new BranchOutOfDateException("local branch '" + branch + "' is behind the remote branch"); } reporter.endMethod(); }
/** * Requires that the local branch with the given name is not behind a remote brach with the same name * @param branch The name of the branch to test * @throws BranchOutOfDateException * @throws JGitFlowIOException */ protected void requireLocalBranchNotBehindRemote(String branch) throws BranchOutOfDateException, JGitFlowIOException { reporter.debugMethod(getCommandName(),"requireLocalBranchNotBehindRemote"); boolean behind = GitHelper.localBranchBehindRemote(git,branch,reporter); if (behind) { reporter.errorText(getCommandName(),"local branch '" + branch + "' is behind the remote branch"); reporter.endMethod(); reporter.flush(); throw new BranchOutOfDateException("local branch '" + branch + "' is behind the remote branch"); } reporter.endMethod(); }
throw new BranchOutOfDateException("local branch '" + flow.getDevelopBranchName() + "' is behind the remote branch"); throw new BranchOutOfDateException("local branch '" + prefixedBranchName + "' is behind the remote branch"); throw new BranchOutOfDateException("local branch '" + flow.getMasterBranchName() + "' is behind the remote branch");
throw new BranchOutOfDateException("local branch '" + flow.getDevelopBranchName() + "' is behind the remote branch"); throw new BranchOutOfDateException("local branch '" + prefixedBranchName + "' is behind the remote branch"); throw new BranchOutOfDateException("local branch '" + flow.getMasterBranchName() + "' is behind the remote branch");
throw new BranchOutOfDateException("local branch '" + flow.getDevelopBranchName() + "' is behind the remote branch"); throw new BranchOutOfDateException("local branch '" + prefixedBranchName + "' is behind the remote branch");