hudson.plugins.git
Class GitAPI

java.lang.Object
  extended by hudson.plugins.git.GitAPI
All Implemented Interfaces:
IGitAPI

public class GitAPI
extends java.lang.Object
implements IGitAPI


Constructor Summary
GitAPI(java.lang.String gitExe, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener)
           
 
Method Summary
 void checkout(java.lang.String ref)
           
 void clone(java.lang.String source)
          Start from scratch and clone the whole repository.
protected  java.util.Map<java.lang.String,java.lang.String> createEnvVarMap()
           
 void deleteTag(java.lang.String tagName)
           
 void diff(java.io.OutputStream baos)
           
 void fetch()
           
 java.util.List<Branch> getBranches()
           
 java.util.List<Branch> getBranchesContaining(java.lang.String revspec)
           
 java.lang.String getGitExe()
           
 java.util.List<Tag> getTags()
           
 boolean hasGitModules()
           
 boolean hasGitRepo()
           
 void log(java.lang.String revFrom, java.lang.String revTo, java.io.OutputStream fos)
           
 void merge(java.lang.String revSpec)
          Merge any changes into the head.
 void push(java.lang.String refspec)
           
 java.lang.String revParse(java.lang.String revName)
           
 void submoduleInit()
          Init submodules.
 void submoduleUpdate()
          Update submodules.
 void tag(java.lang.String tagName, java.lang.String comment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GitAPI

public GitAPI(java.lang.String gitExe,
              hudson.Launcher launcher,
              hudson.FilePath workspace,
              hudson.model.TaskListener listener)
Method Detail

getGitExe

public java.lang.String getGitExe()

hasGitRepo

public boolean hasGitRepo()
                   throws GitException
Specified by:
hasGitRepo in interface IGitAPI
Throws:
GitException

hasGitModules

public boolean hasGitModules()
                      throws GitException
Specified by:
hasGitModules in interface IGitAPI
Throws:
GitException

fetch

public void fetch()
           throws GitException
Specified by:
fetch in interface IGitAPI
Throws:
GitException

clone

public void clone(java.lang.String source)
           throws GitException
Start from scratch and clone the whole repository.

Specified by:
clone in interface IGitAPI
Throws:
GitException

revParse

public java.lang.String revParse(java.lang.String revName)
                          throws GitException
Specified by:
revParse in interface IGitAPI
Throws:
GitException

diff

public void diff(java.io.OutputStream baos)
          throws GitException
Specified by:
diff in interface IGitAPI
Throws:
GitException

log

public void log(java.lang.String revFrom,
                java.lang.String revTo,
                java.io.OutputStream fos)
         throws GitException
Specified by:
log in interface IGitAPI
Throws:
GitException

merge

public void merge(java.lang.String revSpec)
           throws GitException
Merge any changes into the head.

Specified by:
merge in interface IGitAPI
Throws:
GitException

submoduleInit

public void submoduleInit()
                   throws GitException
Init submodules.

Specified by:
submoduleInit in interface IGitAPI
Throws:
GitException

submoduleUpdate

public void submoduleUpdate()
                     throws GitException
Update submodules.

Specified by:
submoduleUpdate in interface IGitAPI
Throws:
GitException

createEnvVarMap

protected final java.util.Map<java.lang.String,java.lang.String> createEnvVarMap()

tag

public void tag(java.lang.String tagName,
                java.lang.String comment)
         throws GitException
Specified by:
tag in interface IGitAPI
Throws:
GitException

getTags

public java.util.List<Tag> getTags()
                            throws GitException
Specified by:
getTags in interface IGitAPI
Throws:
GitException

push

public void push(java.lang.String refspec)
          throws GitException
Specified by:
push in interface IGitAPI
Throws:
GitException

getBranches

public java.util.List<Branch> getBranches()
                                   throws GitException
Specified by:
getBranches in interface IGitAPI
Throws:
GitException

getBranchesContaining

public java.util.List<Branch> getBranchesContaining(java.lang.String revspec)
                                             throws GitException
Specified by:
getBranchesContaining in interface IGitAPI
Throws:
GitException

checkout

public void checkout(java.lang.String ref)
              throws GitException
Specified by:
checkout in interface IGitAPI
Throws:
GitException

deleteTag

public void deleteTag(java.lang.String tagName)
               throws GitException
Specified by:
deleteTag in interface IGitAPI
Throws:
GitException


Copyright © 2008. All Rights Reserved.