Class PerforceChangeLogConsumer
java.lang.Object
org.apache.maven.scm.util.AbstractConsumer
org.apache.maven.scm.provider.perforce.command.changelog.PerforceChangeLogConsumer
- All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
The comment section ends with a blank lineprivate ChangeSet
The current log entry being processed by the parserprivate String
the current file being processed by the parserprivate Date
private static final String
A file line begins with two slashesprivate static final int
State machine constant: expecting commentsprivate static final int
State machine constant: eat the first blank lineprivate static final int
State machine constant: expecting revision and/or file informationprivate static final Pattern
The regular expression used to match header linesprivate static final String
Date formatter for perforce timestampprivate String
The location of files within the Perforce depot that we are processing e.g.private Date
private int
Current status of the parserprivate String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEntry
(ChangeSet entry, ChangeFile file) Add a change log entry to the list (if it's not already there) with the given file.void
consumeLine
(String line) private void
processGetComment
(String line) Process the current input line in the GET_COMMENT state.private void
processGetRevision
(String line) Most of the relevant info is on the revision line matching the 'pattern' string.Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
-
Field Details
-
PERFORCE_TIMESTAMP_PATTERN
Date formatter for perforce timestamp- See Also:
-
entries
-
GET_REVISION
private static final int GET_REVISIONState machine constant: expecting revision and/or file information- See Also:
-
GET_COMMENT_BEGIN
private static final int GET_COMMENT_BEGINState machine constant: eat the first blank line- See Also:
-
GET_COMMENT
private static final int GET_COMMENTState machine constant: expecting comments- See Also:
-
COMMENT_DELIMITER
The comment section ends with a blank line- See Also:
-
FILE_BEGIN_TOKEN
A file line begins with two slashes- See Also:
-
status
private int statusCurrent status of the parser -
currentChange
The current log entry being processed by the parser -
currentFile
the current file being processed by the parser -
repoPath
The location of files within the Perforce depot that we are processing e.g. //depot/projects/foo/bar -
startDate
-
endDate
-
userDatePattern
-
PATTERN
The regular expression used to match header lines
-
-
Constructor Details
-
PerforceChangeLogConsumer
-
-
Method Details
-
getModifications
- Throws:
ScmException
-
consumeLine
-
addEntry
Add a change log entry to the list (if it's not already there) with the given file.- Parameters:
entry
- aChangeSet
to be added to the list if another with the same key (p4 change number) doesn't exist already.file
- aChangeFile
to be added to the entry
-
processGetRevision
Most of the relevant info is on the revision line matching the 'pattern' string.- Parameters:
line
- A line of text from the perforce 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 perforce log output
-