Package hudson.plugins.git
Class GitChangeSet
java.lang.Object
hudson.scm.ChangeLogSet.Entry
hudson.plugins.git.GitChangeSet
Represents a change set.
- Author:
- Nigel Magnay
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGitChangeSet(List<String> lines, boolean authorOrCommitter) Create Git change set using information in given lines.GitChangeSet(List<String> lines, boolean authorOrCommitter, boolean retainFullCommitSummary) Create Git change set using information in given lines. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfindOrCreateUser(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail) Deprecated.findOrCreateUser(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail, boolean useExistingAccountWithSameEmail) Returns user of the change set.Gets the author name for this changeset - note that this is mainly here so that we can test authorOrCommitter without needing a fully instantiated Jenkins (which is needed for User.get in getAuthor()).Gets the comment fully marked up byChangeLogAnnotator.getDate()getId()getMsg()getPaths()Gets the files that are changed in this commit.longinthashCode()voidsetParent(ChangeLogSet parent) Methods inherited from class hudson.scm.ChangeLogSet.Entry
getMsgAnnotated, getMsgEscaped, getParent
-
Field Details
-
LOGGER
-
-
Constructor Details
-
GitChangeSet
Create Git change set using information in given lines.- Parameters:
lines- change set lines read to construct change setauthorOrCommitter- if true, use author information (name, time), otherwise use committer information
-
GitChangeSet
Create Git change set using information in given lines.- Parameters:
lines- change set lines read to construct change setauthorOrCommitter- if true, use author information (name, time), otherwise use committer informationretainFullCommitSummary- if true, do not truncate commit summary in the 'Changes' page
-
-
Method Details
-
getDate
-
getAuthorEmail
-
getTimestamp
public long getTimestamp()- Overrides:
getTimestampin classChangeLogSet.Entry
-
getCommitId
- Overrides:
getCommitIdin classChangeLogSet.Entry
-
setParent
- Overrides:
setParentin classChangeLogSet.Entry
-
getParentCommit
-
getAffectedPaths
- Specified by:
getAffectedPathsin classChangeLogSet.Entry
-
getPaths
Gets the files that are changed in this commit.- Returns:
- can be empty but never null.
-
getAffectedFiles
- Overrides:
getAffectedFilesin classChangeLogSet.Entry
-
findOrCreateUser
@Deprecated public User findOrCreateUser(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail) Deprecated.Returns user of the change set.- Parameters:
csAuthor- user name.csAuthorEmail- user email.createAccountBasedOnEmail- true if create new user based on committer's email.- Returns:
User
-
findOrCreateUser
public User findOrCreateUser(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail, boolean useExistingAccountWithSameEmail) Returns user of the change set.- Parameters:
csAuthor- user name.csAuthorEmail- user email.createAccountBasedOnEmail- true if create new user based on committer's email.useExistingAccountWithSameEmail- true if users should be searched for their email attribute- Returns:
User
-
getAuthor
- Specified by:
getAuthorin classChangeLogSet.Entry
-
getAuthorName
Gets the author name for this changeset - note that this is mainly here so that we can test authorOrCommitter without needing a fully instantiated Jenkins (which is needed for User.get in getAuthor()).- Returns:
- author name
-
getMsg
- Specified by:
getMsgin classChangeLogSet.Entry
-
getId
-
getRevision
-
getComment
-
getCommentAnnotated
Gets the comment fully marked up byChangeLogAnnotator.- Returns:
- annotated comment
-
getBranch
-
equals
-
hashCode
public int hashCode()
-
findOrCreateUser(String,String,boolean,boolean)