public class SvnChangeLogConsumer extends AbstractConsumer
Modifier and Type | Field and Description |
---|---|
private static int |
AUTHOR_GROUP |
private static java.lang.String |
COMMENT_END_TOKEN
The comment section ends with a dashed line
|
private SvnChangeSet |
currentChange
The current log entry being processed by the parser
|
private java.lang.StringBuilder |
currentComment
The current comment of the entry being processed by the parser
|
private java.lang.String |
currentRevision
The current revision of the entry being processed by the parser
|
private static int |
DATE_GROUP |
private static java.util.regex.Pattern |
DATE_REG_EXP |
private java.util.List<ChangeSet> |
entries
List of change log entries
|
private static java.lang.String |
FILE_END_TOKEN
The file section ends with a blank line
|
private static java.util.regex.Pattern |
FILE_PATTERN
There is always action and affected path; when copying/moving, recognize also original path and revision
|
private static int |
GET_COMMENT
State machine constant: expecting comments
|
private static int |
GET_FILE
State machine constant: expecting file information
|
private static int |
GET_HEADER
State machine constant: expecting header
|
private static java.util.regex.Pattern |
HEADER_REG_EXP
The regular expression used to match header lines
|
private static java.util.regex.Pattern |
ORIG_FILE_PATTERN
This matches the 'original file info' part of the complete file line.
|
private static int |
REVISION_GROUP |
private static java.util.regex.Pattern |
REVISION_REG_EXP1 |
private static java.util.regex.Pattern |
REVISION_REG_EXP2 |
private int |
status
Current status of the parser
|
private static java.lang.String |
SVN_TIMESTAMP_PATTERN
Date formatter for svn timestamp (after a little massaging)
|
private java.lang.String |
userDateFormat |
Constructor and Description |
---|
SvnChangeLogConsumer(ScmLogger logger,
java.lang.String userDateFormat)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
consumeLine(java.lang.String line) |
private java.util.Date |
getDate(java.lang.String dateOutput)
Converts the date time stamp from the svn output into a date
object.
|
java.util.List<ChangeSet> |
getModifications() |
private java.lang.String |
getRevision(java.lang.String revisionOutput)
Gets the svn revision, from the svn log revision output.
|
private void |
processGetComment(java.lang.String line)
Process the current input line in the GET_COMMENT state.
|
private void |
processGetFile(java.lang.String line)
Process the current input line in the GET_FILE state.
|
private void |
processGetHeader(java.lang.String line)
Process the current input line in the GET_HEADER state.
|
getLogger, parseDate, parseDate, setLogger
private static final java.lang.String SVN_TIMESTAMP_PATTERN
private static final int GET_HEADER
private static final int GET_FILE
private static final int GET_COMMENT
private static final java.util.regex.Pattern FILE_PATTERN
private static final java.util.regex.Pattern ORIG_FILE_PATTERN
private static final java.lang.String FILE_END_TOKEN
private static final java.lang.String COMMENT_END_TOKEN
private int status
private java.util.List<ChangeSet> entries
private SvnChangeSet currentChange
private java.lang.String currentRevision
private java.lang.StringBuilder currentComment
private static final java.util.regex.Pattern HEADER_REG_EXP
private static final int REVISION_GROUP
private static final int AUTHOR_GROUP
private static final int DATE_GROUP
private static final java.util.regex.Pattern REVISION_REG_EXP1
private static final java.util.regex.Pattern REVISION_REG_EXP2
private static final java.util.regex.Pattern DATE_REG_EXP
private final java.lang.String userDateFormat
public SvnChangeLogConsumer(ScmLogger logger, java.lang.String userDateFormat)
public java.util.List<ChangeSet> getModifications()
public void consumeLine(java.lang.String line)
private void processGetHeader(java.lang.String line)
line
- A line of text from the svn log outputprivate java.lang.String getRevision(java.lang.String revisionOutput)
revisionOutput
- private void processGetFile(java.lang.String line)
line
- A line of text from the svn log outputprivate void processGetComment(java.lang.String line)
line
- a line of text from the svn log outputprivate java.util.Date getDate(java.lang.String dateOutput)
dateOutput
- The date output from an svn log command.