Class SvnChangeLogConsumer
java.lang.Object
org.apache.maven.scm.util.AbstractConsumer
org.apache.maven.scm.provider.svn.svnexe.command.changelog.SvnChangeLogConsumer
- All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final String
The comment section ends with a dashed lineprivate SvnChangeSet
The current log entry being processed by the parserprivate StringBuilder
The current comment of the entry being processed by the parserprivate String
The current revision of the entry being processed by the parserprivate static final int
private static final Pattern
List of change log entriesprivate static final String
The file section ends with a blank lineprivate static final Pattern
There is always action and affected path; when copying/moving, recognize also original path and revisionprivate static final int
State machine constant: expecting commentsprivate static final int
State machine constant: expecting file informationprivate static final int
State machine constant: expecting headerprivate static final Pattern
The regular expression used to match header linesprivate static final Pattern
This matches the 'original file info' part of the complete file line.private static final int
private static final Pattern
private static final Pattern
private int
Current status of the parserprivate static final String
Date formatter for svn timestamp (after a little massaging)private final String
-
Constructor Summary
ConstructorsConstructorDescriptionSvnChangeLogConsumer
(ScmLogger logger, String userDateFormat) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
consumeLine
(String line) private Date
Converts the date time stamp from the svn output into a date object.private String
getRevision
(String revisionOutput) Gets the svn revision, from the svn log revision output.private void
processGetComment
(String line) Process the current input line in the GET_COMMENT state.private void
processGetFile
(String line) Process the current input line in the GET_FILE state.private void
processGetHeader
(String line) Process the current input line in the GET_HEADER state.Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
-
Field Details
-
SVN_TIMESTAMP_PATTERN
Date formatter for svn timestamp (after a little massaging)- See Also:
-
GET_HEADER
private static final int GET_HEADERState machine constant: expecting header- See Also:
-
GET_FILE
private static final int GET_FILEState machine constant: expecting file information- See Also:
-
GET_COMMENT
private static final int GET_COMMENTState machine constant: expecting comments- See Also:
-
FILE_PATTERN
There is always action and affected path; when copying/moving, recognize also original path and revision -
ORIG_FILE_PATTERN
This matches the 'original file info' part of the complete file line. Note the use of [:alpha:] instead of literal 'from' - this is meant to allow non-English localizations. -
FILE_END_TOKEN
The file section ends with a blank line- See Also:
-
COMMENT_END_TOKEN
The comment section ends with a dashed line- See Also:
-
status
private int statusCurrent status of the parser -
entries
List of change log entries -
currentChange
The current log entry being processed by the parser -
currentRevision
The current revision of the entry being processed by the parser -
currentComment
The current comment of the entry being processed by the parser -
HEADER_REG_EXP
The regular expression used to match header lines -
REVISION_GROUP
private static final int REVISION_GROUP- See Also:
-
AUTHOR_GROUP
private static final int AUTHOR_GROUP- See Also:
-
DATE_GROUP
private static final int DATE_GROUP- See Also:
-
REVISION_REG_EXP1
-
REVISION_REG_EXP2
-
DATE_REG_EXP
-
userDateFormat
-
-
Constructor Details
-
SvnChangeLogConsumer
Default constructor.
-
-
Method Details
-
getModifications
-
consumeLine
-
processGetHeader
Process the current input line in the GET_HEADER state. The author, date, and the revision of the entry are gathered. Note, Subversion does not have per-file revisions, instead, the entire repository is given a single revision number, which is used for the revision number of each file.- Parameters:
line
- A line of text from the svn log output
-
getRevision
Gets the svn revision, from the svn log revision output.- Parameters:
revisionOutput
-- Returns:
- the svn revision
-
processGetFile
Process the current input line in the GET_FILE state. This state adds each file entry line to the current change log entry. Note, the revision number for the entire entry is used for the revision number of each file.- Parameters:
line
- A line of text from the svn log output
-
processGetComment
Process the current input line in the GET_COMMENT state. This state gathers all of the comments that are part of a log entry.- Parameters:
line
- a line of text from the svn log output
-
getDate
Converts the date time stamp from the svn output into a date object.- Parameters:
dateOutput
- The date output from an svn log command.- Returns:
- A date representing the time stamp of the log entry.
-