/** {@inheritDoc} */ public void checkout(String ref) throws GitException, InterruptedException { proxy.checkout(ref); }
/** {@inheritDoc} */ public void checkout(String ref, String branch) throws GitException, InterruptedException { proxy.checkout(ref, branch); }
public void checkoutBranch(final String branch, final boolean create) throws IOException, InterruptedException { GitClient client = getGitClient(null); debuggingLogger.fine(String.format("Checkout Branch '%s' with create=%s", branch, create)); if (create) { client.checkout(null, branch); } else { client.checkout(branch); } }
/** {@inheritDoc} */ public void checkout(String ref) throws GitException, InterruptedException { if (Git.USE_CLI) super.checkout(ref); else jgit.checkout(ref); }
/** {@inheritDoc} */ public void checkout(String ref, String branch) throws GitException, InterruptedException { if (Git.USE_CLI) super.checkout(ref, branch); else jgit.checkout(ref, branch); }
protected void makeCombination(Map<IndexEntry, Revision> settings) throws InterruptedException { // Assume we are checked out String name = "combine-" + tid + "-" + (idx++); git.branch(name); git.checkout(name); StringBuilder commit = new StringBuilder( "Jenkins generated combination of:\n"); for (Entry<IndexEntry, Revision> setting : settings.entrySet()) { commit.append(' ').append(' '); commit.append(setting.getKey().getFile()); commit.append(' '); commit.append(setting.getValue()); commit.append('\n'); } listener.getLogger().print(commit); for (Entry<IndexEntry, Revision> setting : settings.entrySet()) { IndexEntry submodule = setting.getKey(); Revision branch = setting.getValue(); GitClient subGit = git.subGit(submodule.getFile()); subGit.checkout(branch.getSha1().name()); git.add(submodule.getFile()); } git.commit(commit.toString()); }
git.checkout(sha1.name()); makeCombination(combination);
private void checkout(GitSCM scm, Run<?, ?> build, GitClient git, TaskListener listener, Revision rev) throws InterruptedException, IOException, GitException { CheckoutCommand checkoutCommand = git.checkout().ref(rev.getSha1String()); for (GitSCMExtension ext : scm.getExtensions()) { ext.decorateCheckoutCommand(scm, build, git, listener, checkoutCommand); } checkoutCommand.execute(); } }
private void checkout(GitSCM scm, Run<?, ?> build, GitClient git, TaskListener listener, Revision rev) throws InterruptedException, IOException, GitException { CheckoutCommand checkoutCommand = git.checkout().ref(rev.getSha1String()); for (GitSCMExtension ext : scm.getExtensions()) { ext.decorateCheckoutCommand(scm, build, git, listener, checkoutCommand); } checkoutCommand.execute(); } }
CheckoutCommand checkoutCommand = git.checkout().branch(localBranchName).ref(revToBuild.revision.getSha1String()).deleteBranchIfExist(true); for (GitSCMExtension ext : this.getExtensions()) { ext.decorateCheckoutCommand(this, build, git, listener, checkoutCommand);
CheckoutCommand checkoutCommand = git.checkout().branch(paramLocalBranch).ref(remoteBranchRef).deleteBranchIfExist(true); for (GitSCMExtension ext : scm.getExtensions()) ext.decorateCheckoutCommand(scm, build, git, listener, checkoutCommand); checkoutCommand = git.checkout().branch(paramLocalBranch).ref(rev.getSha1String()).deleteBranchIfExist(true); for (GitSCMExtension ext : scm.getExtensions()) ext.decorateCheckoutCommand(scm, build, git, listener, checkoutCommand);