public class SMAGit extends Object
| Constructor and Description |
|---|
SMAGit(String pathToWorkspace,
String curCommit)
Creates an SMAGit instance for the initial commit and/or initial build.
|
SMAGit(String pathToWorkspace,
String curCommit,
String prevCommit)
Creates an SMAGit instance for all other builds.
|
SMAGit(String pathToWorkspace,
String curCommit,
String targetBranch,
String sourceBranch)
Creates an SMAGit instance for a ghprb build
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,byte[]> |
getAllMetadata()
Replicates ls-tree for the current commit.
|
byte[] |
getBlob(String repoItem,
String commit)
Returns the blob information for the file at the specified path and commit
|
String |
getCurCommit() |
Map<String,byte[]> |
getDeletedMetadata()
Returns all of the items that were deleted in the current commit.
|
Map<String,byte[]> |
getNewMetadata()
Returns all of the items that were added in the current commit.
|
Map<String,byte[]> |
getOriginalMetadata()
Returns all of the modified (old paths) changes in the current commit.
|
String |
getPrevCommit() |
org.eclipse.jgit.api.Git |
getRepo() |
Map<String,byte[]> |
getUpdatedMetadata()
Returns all of the updated changes in the current commit.
|
boolean |
updatePackageXML(String workspace,
String userName,
String userEmail,
SMAPackage manifest)
Creates an updated package.xml file and commits it to the repository
|
public SMAGit(String pathToWorkspace, String curCommit) throws Exception
pathToWorkspace - The path to the git repository.curCommit - The current commit.Exceptionpublic SMAGit(String pathToWorkspace, String curCommit, String prevCommit) throws Exception
pathToWorkspace - The path to the git repository.curCommit - The current commit.prevCommit - The previous commit.Exceptionpublic Map<String,byte[]> getNewMetadata() throws Exception
IOExceptionExceptionpublic Map<String,byte[]> getDeletedMetadata() throws Exception
Exceptionpublic Map<String,byte[]> getUpdatedMetadata() throws Exception
IOExceptionExceptionpublic Map<String,byte[]> getOriginalMetadata() throws Exception
Exceptionpublic byte[] getBlob(String repoItem, String commit) throws Exception
repoItem - commit - Exceptionpublic Map<String,byte[]> getAllMetadata() throws Exception
IOExceptionExceptionpublic boolean updatePackageXML(String workspace, String userName, String userEmail, SMAPackage manifest) throws Exception
workspace - The workspace.userName - The user name of the committer.userEmail - The email of the committer.manifest - The SMAPackage representation of a package manifestExceptionpublic org.eclipse.jgit.api.Git getRepo()
public String getPrevCommit()
public String getCurCommit()
Copyright © 2004-2016. All Rights Reserved.