public class GitUtils extends Object implements Serializable
| Constructor and Description |
|---|
GitUtils(hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient git) |
| Modifier and Type | Method and Description |
|---|---|
List<hudson.plugins.git.Revision> |
filterTipBranches(Collection<hudson.plugins.git.Revision> revisions)
Return a list of 'tip' branches (I.E.
|
static String[] |
fixupNames(String[] names,
String[] urls) |
Collection<hudson.plugins.git.Revision> |
getAllBranchRevisions()
Return a list of "Revisions" - where a revision knows about all the branch names that refer to
a SHA1.
|
static hudson.EnvVars |
getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
static hudson.EnvVars |
getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
boolean reuseLastBuildEnv)
An attempt to generate at least semi-useful EnvVars for polling calls, based on previous build.
|
hudson.plugins.git.Revision |
getRevisionContainingBranch(String branchName)
Return the revision containing the branch name.
|
hudson.plugins.git.Revision |
getRevisionForSHA1(org.eclipse.jgit.lib.ObjectId sha1) |
hudson.plugins.git.Revision |
sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder) |
hudson.plugins.git.Revision |
sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder,
hudson.EnvVars env) |
public GitUtils(hudson.model.TaskListener listener,
org.jenkinsci.plugins.gitclient.GitClient git)
public Collection<hudson.plugins.git.Revision> getAllBranchRevisions() throws hudson.plugins.git.GitException, IOException, InterruptedException
IOExceptionhudson.plugins.git.GitExceptionInterruptedExceptionpublic hudson.plugins.git.Revision getRevisionContainingBranch(String branchName) throws hudson.plugins.git.GitException, IOException, InterruptedException
branchName - IOExceptionhudson.plugins.git.GitExceptionInterruptedExceptionpublic hudson.plugins.git.Revision getRevisionForSHA1(org.eclipse.jgit.lib.ObjectId sha1)
throws hudson.plugins.git.GitException,
IOException,
InterruptedException
hudson.plugins.git.GitExceptionIOExceptionInterruptedExceptionpublic hudson.plugins.git.Revision sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder)
public hudson.plugins.git.Revision sortBranchesForRevision(hudson.plugins.git.Revision revision,
List<BranchSpec> branchOrder,
hudson.EnvVars env)
@WithBridgeMethods(value=java.util.Collection.class) public List<hudson.plugins.git.Revision> filterTipBranches(Collection<hudson.plugins.git.Revision> revisions) throws InterruptedException
revisions - InterruptedExceptionpublic static hudson.EnvVars getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic static hudson.EnvVars getPollEnvironment(hudson.model.AbstractProject p,
hudson.FilePath ws,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
boolean reuseLastBuildEnv)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionCopyright © 2004-2015. All Rights Reserved.