hudson.plugins.git
Interface IGitAPI

All Known Implementing Classes:
GitAPI

public interface IGitAPI

Encapsulates Git operations on a particular directory through git(1).


Method Summary
 void add(String filePattern)
           
 void branch(String name)
           
 void changelog(String revFrom, String revTo, OutputStream fos)
           
 void checkout(String commitish)
          Short for checkoutBranch(null, commitish)
 void checkoutBranch(String branch, String commitish)
          Checks out the specified commit/ref into the workspace.
 void clean()
           
 void clone(org.spearce.jgit.transport.RemoteConfig source)
           
 void commit(File f)
           
 void deleteBranch(String name)
           
 void deleteTag(String tagName)
           
 String describe(String commitIsh)
           
 void fetch()
           
 void fetch(org.spearce.jgit.transport.RemoteConfig remoteRepository)
           
 void fetch(String repository, String refspec)
           
 void fixSubmoduleUrls(String remote, hudson.model.TaskListener listener)
           
 String getAllLogEntries(String branch)
           
 List<Branch> getBranches()
           
 List<Branch> getBranchesContaining(String revspec)
           
 String getDefaultRemote(String _default_)
           
 hudson.EnvVars getEnvironment()
           
 String getGitExe()
           
 List<Branch> getRemoteBranches()
           
 String getRemoteUrl(String name)
           
 String getRemoteUrl(String name, String GIT_DIR)
           
 List<IndexEntry> getSubmodules(String treeIsh)
           
 String getSubmoduleUrl(String name)
           
 Set<String> getTagNames(String tagPattern)
           
 List<org.spearce.jgit.lib.Tag> getTagsOnCommit(String revName)
           
 boolean hasGitModules()
           
 boolean hasGitModules(String treeIsh)
           
 boolean hasGitRepo()
          Returns true if the encapsulated directory has ".git" directory
 void init()
           
 boolean isBareRepository()
           
 boolean isBareRepository(String GIT_DIR)
           
 boolean isCommitInRepo(String sha1)
           
 List<IndexEntry> lsTree(String treeIsh)
           
 void merge(String revSpec)
           
 org.spearce.jgit.lib.ObjectId mergeBase(org.spearce.jgit.lib.ObjectId sha1, org.spearce.jgit.lib.ObjectId sha12)
           
 void prune(org.spearce.jgit.transport.RemoteConfig repository)
           
 void push(org.spearce.jgit.transport.RemoteConfig repository, String revspec)
           
 List<org.spearce.jgit.lib.ObjectId> revListAll()
           
 List<org.spearce.jgit.lib.ObjectId> revListBranch(String branchId)
           
 org.spearce.jgit.lib.ObjectId revParse(String revName)
           
 void setRemoteUrl(String name, String url)
           
 void setRemoteUrl(String name, String url, String GIT_DIR)
           
 void setSubmoduleUrl(String name, String url)
           
 void setupSubmoduleUrls(Revision rev, hudson.model.TaskListener listener)
           
 void setupSubmoduleUrls(String remote, hudson.model.TaskListener listener)
           
 List<String> showRevision(Revision r)
           
 void submoduleClean(boolean recursive)
           
 void submoduleInit()
           
 void submoduleSync()
           
 void submoduleUpdate(boolean recursive)
           
 void tag(String tagName, String comment)
           
 boolean tagExists(String tagName)
           
 

Method Detail

getGitExe

String getGitExe()

getEnvironment

hudson.EnvVars getEnvironment()

init

void init()
          throws GitException
Throws:
GitException

hasGitRepo

boolean hasGitRepo()
                   throws GitException
Returns true if the encapsulated directory has ".git" directory

Throws:
GitException

isCommitInRepo

boolean isCommitInRepo(String sha1)

hasGitModules

boolean hasGitModules()
                      throws GitException
Throws:
GitException

hasGitModules

boolean hasGitModules(String treeIsh)
                      throws GitException
Throws:
GitException

getSubmodules

List<IndexEntry> getSubmodules(String treeIsh)
                               throws GitException
Throws:
GitException

getRemoteUrl

String getRemoteUrl(String name)
                    throws GitException
Throws:
GitException

setRemoteUrl

void setRemoteUrl(String name,
                  String url)
                  throws GitException
Throws:
GitException

getRemoteUrl

String getRemoteUrl(String name,
                    String GIT_DIR)
                    throws GitException
Throws:
GitException

setRemoteUrl

void setRemoteUrl(String name,
                  String url,
                  String GIT_DIR)
                  throws GitException
Throws:
GitException

getDefaultRemote

String getDefaultRemote(String _default_)
                        throws GitException
Throws:
GitException

isBareRepository

boolean isBareRepository()
                         throws GitException
Throws:
GitException

isBareRepository

boolean isBareRepository(String GIT_DIR)
                         throws GitException
Throws:
GitException

submoduleInit

void submoduleInit()
                   throws GitException
Throws:
GitException

submoduleUpdate

void submoduleUpdate(boolean recursive)
                     throws GitException
Throws:
GitException

submoduleClean

void submoduleClean(boolean recursive)
                    throws GitException
Throws:
GitException

submoduleSync

void submoduleSync()
                   throws GitException
Throws:
GitException

getSubmoduleUrl

String getSubmoduleUrl(String name)
                       throws GitException
Throws:
GitException

setSubmoduleUrl

void setSubmoduleUrl(String name,
                     String url)
                     throws GitException
Throws:
GitException

fixSubmoduleUrls

void fixSubmoduleUrls(String remote,
                      hudson.model.TaskListener listener)
                      throws GitException
Throws:
GitException

setupSubmoduleUrls

void setupSubmoduleUrls(Revision rev,
                        hudson.model.TaskListener listener)
                        throws GitException
Throws:
GitException

setupSubmoduleUrls

void setupSubmoduleUrls(String remote,
                        hudson.model.TaskListener listener)
                        throws GitException
Throws:
GitException

fetch

void fetch(String repository,
           String refspec)
           throws GitException
Throws:
GitException

fetch

void fetch(org.spearce.jgit.transport.RemoteConfig remoteRepository)

fetch

void fetch()
           throws GitException
Throws:
GitException

push

void push(org.spearce.jgit.transport.RemoteConfig repository,
          String revspec)
          throws GitException
Throws:
GitException

merge

void merge(String revSpec)
           throws GitException
Throws:
GitException

clone

void clone(org.spearce.jgit.transport.RemoteConfig source)
           throws GitException
Throws:
GitException

clean

void clean()
           throws GitException
Throws:
GitException

prune

void prune(org.spearce.jgit.transport.RemoteConfig repository)
           throws GitException
Throws:
GitException

revParse

org.spearce.jgit.lib.ObjectId revParse(String revName)
                                       throws GitException
Throws:
GitException

getBranches

List<Branch> getBranches()
                         throws GitException
Throws:
GitException

getRemoteBranches

List<Branch> getRemoteBranches()
                               throws GitException,
                                      IOException
Throws:
GitException
IOException

getBranchesContaining

List<Branch> getBranchesContaining(String revspec)
                                   throws GitException
Throws:
GitException

lsTree

List<IndexEntry> lsTree(String treeIsh)
                        throws GitException
Throws:
GitException

revListBranch

List<org.spearce.jgit.lib.ObjectId> revListBranch(String branchId)
                                                  throws GitException
Throws:
GitException

revListAll

List<org.spearce.jgit.lib.ObjectId> revListAll()
                                               throws GitException
Throws:
GitException

describe

String describe(String commitIsh)
                throws GitException
Throws:
GitException

getTagsOnCommit

List<org.spearce.jgit.lib.Tag> getTagsOnCommit(String revName)
                                               throws GitException,
                                                      IOException
Throws:
GitException
IOException

tag

void tag(String tagName,
         String comment)
         throws GitException
Throws:
GitException

tagExists

boolean tagExists(String tagName)
                  throws GitException
Throws:
GitException

deleteTag

void deleteTag(String tagName)
               throws GitException
Throws:
GitException

getTagNames

Set<String> getTagNames(String tagPattern)
                        throws GitException
Throws:
GitException

changelog

void changelog(String revFrom,
               String revTo,
               OutputStream fos)
               throws GitException
Throws:
GitException

checkout

void checkout(String commitish)
              throws GitException
Short for checkoutBranch(null, commitish)

Throws:
GitException

checkoutBranch

void checkoutBranch(String branch,
                    String commitish)
                    throws GitException
Checks out the specified commit/ref into the workspace.

Parameters:
branch - If non-null, move/create the branch in this name at the specified commit-ish and check out that branch.
Throws:
GitException

add

void add(String filePattern)
         throws GitException
Throws:
GitException

branch

void branch(String name)
            throws GitException
Throws:
GitException

deleteBranch

void deleteBranch(String name)
                  throws GitException
Throws:
GitException

commit

void commit(File f)
            throws GitException
Throws:
GitException

mergeBase

org.spearce.jgit.lib.ObjectId mergeBase(org.spearce.jgit.lib.ObjectId sha1,
                                        org.spearce.jgit.lib.ObjectId sha12)

getAllLogEntries

String getAllLogEntries(String branch)

showRevision

List<String> showRevision(Revision r)
                          throws GitException
Throws:
GitException


Copyright © 2004-2011 Hudson. All Rights Reserved.