|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jenkinsci.plugins.gitclient.JGitAPIImpl
public class JGitAPIImpl
| Field Summary |
|---|
| Fields inherited from interface hudson.plugins.git.IGitAPI |
|---|
verbose |
| Constructor Summary | |
|---|---|
JGitAPIImpl(String gitExe,
File workspace,
hudson.model.TaskListener listener,
hudson.EnvVars environment)
|
|
| Method Summary | |
|---|---|
void |
add(String filePattern)
|
void |
addNote(String note,
String namespace)
|
void |
appendNote(String note,
String namespace)
|
void |
branch(String name)
|
void |
changelog(String revFrom,
String revTo,
OutputStream fos)
Adds the changelog entries for commits in the range revFrom..revTo. |
void |
checkout(String commit)
Checks out the specified commit/tag/branch into the workspace. |
void |
checkout(String ref,
String branch)
Checks out the specified commit/ref into the workspace, creating specified branch (equivalent to git checkout -b branch commit |
void |
clean()
|
void |
clone(String url,
String origin,
boolean useShallowClone,
String reference)
Clone a remote repository |
void |
commit(String message)
|
void |
deleteBranch(String name)
|
void |
deleteTag(String tagName)
|
void |
fetch(String remote,
org.eclipse.jgit.transport.RefSpec refspec)
|
Set<Branch> |
getBranches()
|
org.eclipse.jgit.lib.ObjectId |
getHeadRev(String remoteRepoUrl,
String branch)
|
Set<Branch> |
getRemoteBranches()
|
String |
getRemoteUrl(String name)
From a given repository, get a remote's URL |
org.eclipse.jgit.lib.Repository |
getRepository()
|
List<IndexEntry> |
getSubmodules(String treeIsh)
|
Set<String> |
getTagNames(String tagPattern)
|
boolean |
hasGitModules()
Returns true if the repository has Git submodules. |
boolean |
hasGitRepo()
|
void |
init()
|
boolean |
isCommitInRepo(org.eclipse.jgit.lib.ObjectId commit)
|
void |
merge(org.eclipse.jgit.lib.ObjectId revSpec)
|
void |
prune(org.eclipse.jgit.transport.RemoteConfig repository)
|
void |
push(String remoteName,
String revspec)
|
List<org.eclipse.jgit.lib.ObjectId> |
revListAll()
|
org.eclipse.jgit.lib.ObjectId |
revParse(String revName)
|
void |
setRemoteUrl(String name,
String url)
For a given repository, set a remote's URL |
void |
setupSubmoduleUrls(Revision rev,
hudson.model.TaskListener listener)
Set up submodule URLs so that they correspond to the remote pertaining to the revision that has been checked out. |
List<String> |
showRevision(org.eclipse.jgit.lib.ObjectId from,
org.eclipse.jgit.lib.ObjectId to)
Given a Revision, show it as if it were an entry from git whatchanged, so that it can be parsed by GitChangeLogParser. |
IGitAPI |
subGit(String subdir)
|
void |
submoduleClean(boolean recursive)
|
void |
submoduleUpdate(boolean recursive)
|
void |
tag(String name,
String message)
|
boolean |
tagExists(String tagName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JGitAPIImpl(String gitExe,
File workspace,
hudson.model.TaskListener listener,
hudson.EnvVars environment)
| Method Detail |
|---|
public IGitAPI subGit(String subdir)
subGit in interface IGitAPI
public void init()
throws GitException
init in interface IGitAPIGitException
public void checkout(String commit)
throws GitException
IGitAPI
checkout in interface IGitAPIcommit - A git object references expression
GitException
public void checkout(String ref,
String branch)
throws GitException
IGitAPI
checkout in interface IGitAPIref - A git object references expressionbranch - name of the branch to create from reference
GitException
public void add(String filePattern)
throws GitException
add in interface IGitAPIGitException
public void commit(String message)
throws GitException
commit in interface IGitAPIGitException
public void branch(String name)
throws GitException
branch in interface IGitAPIGitException
public void deleteBranch(String name)
throws GitException
deleteBranch in interface IGitAPIGitException
public Set<Branch> getBranches()
throws GitException
getBranches in interface IGitAPIGitException
public Set<Branch> getRemoteBranches()
throws GitException
getRemoteBranches in interface IGitAPIGitException
public void tag(String name,
String message)
throws GitException
tag in interface IGitAPIGitException
public boolean tagExists(String tagName)
throws GitException
tagExists in interface IGitAPIGitException
public void fetch(String remote,
org.eclipse.jgit.transport.RefSpec refspec)
throws GitException
fetch in interface IGitAPIGitException
public org.eclipse.jgit.lib.ObjectId getHeadRev(String remoteRepoUrl,
String branch)
throws GitException
getHeadRev in interface IGitAPIGitException
public String getRemoteUrl(String name)
throws GitException
IGitAPI
getRemoteUrl in interface IGitAPIname - The name of the remote (e.g. origin)
GitException - if executing the git command fails
public org.eclipse.jgit.lib.Repository getRepository()
throws IOException
getRepository in interface IGitAPIIOException
public void addNote(String note,
String namespace)
throws GitException
addNote in interface IGitAPIGitException
public void appendNote(String note,
String namespace)
throws GitException
appendNote in interface IGitAPIGitException
public void changelog(String revFrom,
String revTo,
OutputStream fos)
throws GitException
IGitAPI
changelog in interface IGitAPIGitException
public void clean()
throws GitException
clean in interface IGitAPIGitException
public void clone(String url,
String origin,
boolean useShallowClone,
String reference)
throws GitException
IGitAPI
clone in interface IGitAPIurl - URL for remote repository to cloneorigin - upstream track name, defaults to origin by conventionuseShallowClone - option to create a shallow clone, that has some restriction but will make clone operationreference - (optional) reference to a local clone for faster clone operations (reduce network and local storage costs)
GitException
public void deleteTag(String tagName)
throws GitException
deleteTag in interface IGitAPIGitException
public List<IndexEntry> getSubmodules(String treeIsh)
throws GitException
getSubmodules in interface IGitAPIGitException
public Set<String> getTagNames(String tagPattern)
throws GitException
getTagNames in interface IGitAPIGitException
public boolean hasGitModules()
throws GitException
IGitAPI
hasGitModules in interface IGitAPIGitException
public boolean hasGitRepo()
throws GitException
hasGitRepo in interface IGitAPIGitException
public boolean isCommitInRepo(org.eclipse.jgit.lib.ObjectId commit)
throws GitException
isCommitInRepo in interface IGitAPIGitException
public void merge(org.eclipse.jgit.lib.ObjectId revSpec)
throws GitException
merge in interface IGitAPIGitException
public void prune(org.eclipse.jgit.transport.RemoteConfig repository)
throws GitException
prune in interface IGitAPIGitException
public void push(String remoteName,
String revspec)
throws GitException
push in interface IGitAPIGitException
public List<org.eclipse.jgit.lib.ObjectId> revListAll()
throws GitException
revListAll in interface IGitAPIGitException
public org.eclipse.jgit.lib.ObjectId revParse(String revName)
throws GitException
revParse in interface IGitAPIGitException
public void setRemoteUrl(String name,
String url)
throws GitException
IGitAPI
setRemoteUrl in interface IGitAPIname - The name of the remote (e.g. origin)url - The new value of the remote's URL
GitException - if executing the git command fails
public void setupSubmoduleUrls(Revision rev,
hudson.model.TaskListener listener)
throws GitException
IGitAPI
setupSubmoduleUrls in interface IGitAPIGitException
public List<String> showRevision(org.eclipse.jgit.lib.ObjectId from,
org.eclipse.jgit.lib.ObjectId to)
throws GitException
IGitAPIChanges are computed on the [from..to] range. If from is null, changes for to commit are considered.
showRevision in interface IGitAPIGitException
public void submoduleClean(boolean recursive)
throws GitException
submoduleClean in interface IGitAPIGitException
public void submoduleUpdate(boolean recursive)
throws GitException
submoduleUpdate in interface IGitAPIGitException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||