hudson.plugins.git.util
Class GitUtils

java.lang.Object
  extended by hudson.plugins.git.util.GitUtils

public class GitUtils
extends Object


Constructor Summary
GitUtils(hudson.model.TaskListener listener, IGitAPI git)
           
 
Method Summary
 Collection<Revision> filterTipBranches(Collection<Revision> revisions)
          Return a list of 'tip' branches (I.E.
static String[] fixupNames(String[] names, String[] urls)
           
 Collection<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)
          An attempt to generate at least semi-useful EnvVars for polling calls, based on previous build.
 Revision getRevisionContainingBranch(String branchName)
          Return the revision containing the branch name.
 Revision getRevisionForSHA1(org.spearce.jgit.lib.ObjectId sha1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GitUtils

public GitUtils(hudson.model.TaskListener listener,
                IGitAPI git)
Method Detail

getAllBranchRevisions

public Collection<Revision> getAllBranchRevisions()
                                           throws GitException,
                                                  IOException
Return a list of "Revisions" - where a revision knows about all the branch names that refer to a SHA1.

Returns:
Throws:
IOException
GitException

getRevisionContainingBranch

public Revision getRevisionContainingBranch(String branchName)
                                     throws GitException,
                                            IOException
Return the revision containing the branch name.

Parameters:
branchName -
Returns:
Throws:
IOException
GitException

getRevisionForSHA1

public Revision getRevisionForSHA1(org.spearce.jgit.lib.ObjectId sha1)
                            throws GitException,
                                   IOException
Throws:
GitException
IOException

filterTipBranches

public Collection<Revision> filterTipBranches(Collection<Revision> revisions)
Return a list of 'tip' branches (I.E. branches that aren't included entirely within another branch).

Parameters:
git -
Returns:

getPollEnvironment

public static hudson.EnvVars getPollEnvironment(hudson.model.AbstractProject p,
                                                hudson.FilePath ws,
                                                hudson.Launcher launcher,
                                                hudson.model.TaskListener listener)
                                         throws IOException,
                                                InterruptedException
An attempt to generate at least semi-useful EnvVars for polling calls, based on previous build. Cribbed from various places.

Throws:
IOException
InterruptedException

fixupNames

public static String[] fixupNames(String[] names,
                                  String[] urls)


Copyright © 2004-2011 Hudson. All Rights Reserved.