|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jenkinsci.plugins.gitclient.CliGitAPIImpl
hudson.plugins.git.GitAPI
public class GitAPI
Backward compatible class to match the one some plugins used to get from git-plugin.
Extends CliGitAPIImpl to implement deprecated IGitAPI methods, but delegates supported methods to JGit implementation
until Git.USE_CLI is set.
| Field Summary |
|---|
| Fields inherited from interface org.jenkinsci.plugins.gitclient.GitClient |
|---|
quietRemoteBranches, verbose |
| Constructor Summary | |
|---|---|
GitAPI(String gitExe,
hudson.FilePath repository,
hudson.model.TaskListener listener,
hudson.EnvVars environment)
Deprecated. |
|
GitAPI(String gitExe,
hudson.FilePath repository,
hudson.model.TaskListener listener,
hudson.EnvVars environment,
String reference)
Deprecated. |
|
GitAPI(String gitExe,
File repository,
hudson.model.TaskListener listener,
hudson.EnvVars environment)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
add(String filePattern)
Deprecated. |
void |
branch(String name)
Deprecated. |
void |
checkout(String ref)
Deprecated. Checks out the specified commit/tag/branch into the workspace. |
void |
checkout(String ref,
String branch)
Deprecated. Creates a new branch that points to the specified ref. |
void |
clean()
Deprecated. Fully revert working copy to a clean state, i.e. run both git-reset(1) --hard then git-clean(1) for working copy to match a fresh clone. |
void |
clone(org.eclipse.jgit.transport.RemoteConfig source)
Deprecated. |
void |
clone(org.eclipse.jgit.transport.RemoteConfig rc,
boolean useShallowClone)
Deprecated. |
void |
commit(String message)
Deprecated. |
void |
commit(String message,
org.eclipse.jgit.lib.PersonIdent author,
org.eclipse.jgit.lib.PersonIdent committer)
Deprecated. |
void |
deleteBranch(String name)
Deprecated. (force) delete a branch. |
void |
deleteTag(String tagName)
Deprecated. |
void |
fetch()
Deprecated. |
void |
fetch(org.eclipse.jgit.transport.RemoteConfig remoteRepository)
Deprecated. |
void |
fetch(String remoteName,
org.eclipse.jgit.transport.RefSpec refspec)
Deprecated. Fetch a remote repository. |
void |
fetch(String repository,
String refspec)
Deprecated. |
String |
getAllLogEntries(String branch)
Deprecated. |
Set<Branch> |
getBranches()
Deprecated. |
List<Branch> |
getBranchesContaining(String revspec)
Deprecated. |
Set<Branch> |
getRemoteBranches()
Deprecated. |
String |
getRemoteUrl(String name)
Deprecated. From a given repository, get a remote's URL |
org.eclipse.jgit.lib.Repository |
getRepository()
Deprecated. Expose the JGit repository this GitClient is using. |
String |
getTagMessage(String tagName)
Deprecated. |
List<Tag> |
getTagsOnCommit(String revName)
Deprecated. |
boolean |
hasGitModules(String treeIsh)
Deprecated. |
boolean |
hasGitRepo()
Deprecated. |
void |
init()
Deprecated. |
boolean |
isCommitInRepo(org.eclipse.jgit.lib.ObjectId commit)
Deprecated. |
void |
merge(org.eclipse.jgit.lib.ObjectId rev)
Deprecated. Merge any changes into the head. |
void |
merge(String refSpec)
Deprecated. |
org.eclipse.jgit.lib.ObjectId |
mergeBase(org.eclipse.jgit.lib.ObjectId id1,
org.eclipse.jgit.lib.ObjectId id2)
Deprecated. |
void |
push(org.eclipse.jgit.transport.RemoteConfig repository,
String refspec)
Deprecated. |
void |
push(String remoteName,
String refspec)
Deprecated. |
void |
reset()
Deprecated. |
List<org.eclipse.jgit.lib.ObjectId> |
revListBranch(String branchId)
Deprecated. |
org.eclipse.jgit.lib.ObjectId |
revParse(String revName)
Deprecated. Retrieve commit object that is direct child for revName revision reference. |
void |
setRemoteUrl(String name,
String url)
Deprecated. For a given repository, set a remote's URL |
void |
setupSubmoduleUrls(String remote,
hudson.model.TaskListener listener)
Deprecated. |
List<String> |
showRevision(Revision r)
Deprecated. |
GitClient |
subGit(String subdir)
Deprecated. |
void |
tag(String tagName,
String comment)
Deprecated. Create (or update) a tag. |
boolean |
tagExists(String tagName)
Deprecated. |
| Methods inherited from class org.jenkinsci.plugins.gitclient.CliGitAPIImpl |
|---|
addNote, addSubmodule, appendNote, changelog, checkoutBranch, clone, describe, fixSubmoduleUrls, getDefaultRemote, getDefaultRemote, getHeadRev, getRemoteUrl, getSubmodules, getSubmoduleUrl, getTagNames, hasGitModules, hasGitRepo, isBareRepository, isBareRepository, launchCommand, launchCommand, lsTree, prune, reset, revList, revListAll, setRemoteUrl, setSubmoduleUrl, setupSubmoduleUrls, showRevision, showRevision, submoduleClean, submoduleInit, submoduleReset, submoduleSync, submoduleUpdate, validateRevision |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hudson.plugins.git.IGitAPI |
|---|
changelog, checkoutBranch, describe, fixSubmoduleUrls, getDefaultRemote, getRemoteUrl, getSubmoduleUrl, isBareRepository, isBareRepository, lsTree, reset, setRemoteUrl, setSubmoduleUrl, submoduleInit, submoduleSync |
| Methods inherited from interface org.jenkinsci.plugins.gitclient.GitClient |
|---|
addNote, addSubmodule, appendNote, clone, getHeadRev, getSubmodules, getTagNames, hasGitModules, prune, revList, revListAll, setupSubmoduleUrls, showRevision, showRevision, submoduleClean, submoduleUpdate |
| Constructor Detail |
|---|
@Deprecated
public GitAPI(String gitExe,
hudson.FilePath repository,
hudson.model.TaskListener listener,
hudson.EnvVars environment)
@Deprecated
public GitAPI(String gitExe,
hudson.FilePath repository,
hudson.model.TaskListener listener,
hudson.EnvVars environment,
String reference)
@Deprecated
public GitAPI(String gitExe,
File repository,
hudson.model.TaskListener listener,
hudson.EnvVars environment)
| Method Detail |
|---|
public void add(String filePattern)
throws GitException
add in interface GitClientadd in class CliGitAPIImplGitException
public String getRemoteUrl(String name)
throws GitException
GitClient
getRemoteUrl in interface GitClientgetRemoteUrl in class CliGitAPIImplname - The name of the remote (e.g. origin)
GitException - if executing the git command fails
public void push(String remoteName,
String refspec)
throws GitException
push in interface GitClientpush in class CliGitAPIImplGitException
public String getTagMessage(String tagName)
throws GitException
getTagMessage in interface GitClientgetTagMessage in class CliGitAPIImplGitExceptionpublic GitClient subGit(String subdir)
subGit in interface GitClientsubGit in class CliGitAPIImpl
public void setRemoteUrl(String name,
String url)
throws GitException
GitClient
setRemoteUrl in interface GitClientsetRemoteUrl in class CliGitAPIImplname - 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 Set<Branch> getBranches()
throws GitException
getBranches in interface GitClientgetBranches in class CliGitAPIImplGitException
public Set<Branch> getRemoteBranches()
throws GitException
getRemoteBranches in interface GitClientgetRemoteBranches in class CliGitAPIImplGitException
public void init()
throws GitException
init in interface GitClientinit in class CliGitAPIImplGitException
public void deleteBranch(String name)
throws GitException
GitClient
deleteBranch in interface GitClientdeleteBranch in class CliGitAPIImplGitException
public void checkout(String ref,
String branch)
throws GitException
GitClient
checkout in interface GitClientcheckout in class CliGitAPIImplref - A git object references expression. For backward compatibility, null will checkout current HEADbranch - name of the branch to create from reference
GitException
public boolean hasGitRepo()
throws GitException
hasGitRepo in interface GitClienthasGitRepo in class CliGitAPIImplGitException
public boolean isCommitInRepo(org.eclipse.jgit.lib.ObjectId commit)
throws GitException
isCommitInRepo in interface GitClientisCommitInRepo in class CliGitAPIImplGitException
public void commit(String message)
throws GitException
commit in interface GitClientcommit in class CliGitAPIImplGitException
public void commit(String message,
org.eclipse.jgit.lib.PersonIdent author,
org.eclipse.jgit.lib.PersonIdent committer)
throws GitException
commit in interface GitClientcommit in class CliGitAPIImplGitException
public void checkout(String ref)
throws GitException
GitClient
checkout in interface GitClientcheckout in class CliGitAPIImplref - A git object references expression (either a sha1, tag or branch)
GitException
public void deleteTag(String tagName)
throws GitException
deleteTag in interface GitClientdeleteTag in class CliGitAPIImplGitException
public org.eclipse.jgit.lib.Repository getRepository()
throws GitException
GitClientRepository.close(), to avoid JENKINS-12188.
getRepository in interface GitClientgetRepository in class CliGitAPIImplGitException
public void tag(String tagName,
String comment)
throws GitException
GitClient
tag in interface GitClienttag in class CliGitAPIImplGitException
public void fetch(String remoteName,
org.eclipse.jgit.transport.RefSpec refspec)
throws GitException
GitClient
fetch in interface GitClientfetch in class CliGitAPIImplGitException
public void merge(org.eclipse.jgit.lib.ObjectId rev)
throws GitException
CliGitAPIImpl
merge in interface GitClientmerge in class CliGitAPIImplrev - the revision
GitException - if the emrge fails
public boolean tagExists(String tagName)
throws GitException
tagExists in interface GitClienttagExists in class CliGitAPIImplGitException
public void clean()
throws GitException
GitClient
clean in interface GitClientclean in class CliGitAPIImplGitException
public org.eclipse.jgit.lib.ObjectId revParse(String revName)
throws GitException
GitClient
revParse in interface GitClientrevParse in class CliGitAPIImplrevName - a commit sha1 or tag/branch refname
GitException - when no such commit / revName is found in repository.
public void branch(String name)
throws GitException
branch in interface GitClientbranch in class CliGitAPIImplGitException
@Deprecated
public void merge(String refSpec)
throws GitException
merge in interface IGitAPIGitException
@Deprecated
public boolean hasGitModules(String treeIsh)
throws GitException
hasGitModules in interface IGitAPIGitException
@Deprecated
public void setupSubmoduleUrls(String remote,
hudson.model.TaskListener listener)
throws GitException
setupSubmoduleUrls in interface IGitAPIGitException
@Deprecated
public void fetch(String repository,
String refspec)
throws GitException
fetch in interface IGitAPIGitException@Deprecated public void fetch(org.eclipse.jgit.transport.RemoteConfig remoteRepository)
fetch in interface IGitAPI
@Deprecated
public void fetch()
throws GitException
fetch in interface IGitAPIfetch in class CliGitAPIImplGitException
public void reset()
throws GitException
reset in interface IGitAPIGitException
@Deprecated
public void push(org.eclipse.jgit.transport.RemoteConfig repository,
String refspec)
throws GitException
push in interface IGitAPIGitException
@Deprecated
public void clone(org.eclipse.jgit.transport.RemoteConfig source)
throws GitException
clone in interface IGitAPIGitException
@Deprecated
public void clone(org.eclipse.jgit.transport.RemoteConfig rc,
boolean useShallowClone)
throws GitException
clone in interface IGitAPIGitException
@Deprecated
public List<Branch> getBranchesContaining(String revspec)
throws GitException
getBranchesContaining in interface IGitAPIGitException
@Deprecated
public List<org.eclipse.jgit.lib.ObjectId> revListBranch(String branchId)
throws GitException
revListBranch in interface IGitAPIGitException
@Deprecated
public List<String> showRevision(Revision r)
throws GitException
showRevision in interface IGitAPIGitException
@Deprecated
public List<Tag> getTagsOnCommit(String revName)
throws GitException,
IOException
getTagsOnCommit in interface IGitAPIGitException
IOException
@Deprecated
public org.eclipse.jgit.lib.ObjectId mergeBase(org.eclipse.jgit.lib.ObjectId id1,
org.eclipse.jgit.lib.ObjectId id2)
mergeBase in interface IGitAPI@Deprecated public String getAllLogEntries(String branch)
getAllLogEntries in interface IGitAPI
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||