|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.scm.provider.perforce.command.changelog.PerforceChangeLogConsumer
Field Summary | |
private static java.lang.String |
COMMENT_DELIMITER
The comment section ends with a blank line |
private org.apache.maven.scm.ChangeSet |
currentChange
The current log entry being processed by the parser |
private java.lang.String |
currentFile
the current file being processed by the parser |
private java.util.Date |
endDate
|
private java.util.List |
entries
|
private static java.lang.String |
FILE_BEGIN_TOKEN
A file line begins with two slashes |
private static int |
GET_COMMENT
State machine constant: expecting comments |
private static int |
GET_COMMENT_BEGIN
State machine constant: eat the first blank line |
private static int |
GET_REVISION
State machine constant: expecting revision and/or file information |
private static java.lang.String |
pattern
|
private static java.text.SimpleDateFormat |
PERFORCE_TIMESTAMP
Date formatter for perforce timestamp |
private org.apache.regexp.RE |
revisionRegexp
The regular expression used to match header lines |
private java.util.Date |
startDate
|
private int |
status
Current status of the parser |
Constructor Summary | |
PerforceChangeLogConsumer(java.util.Date startDate,
java.util.Date endDate)
|
Method Summary | |
private void |
addEntry(org.apache.maven.scm.ChangeSet entry,
org.apache.maven.scm.ChangeFile file)
Add a change log entry to the list (if it's not already there) with the given file. |
void |
consumeLine(java.lang.String line)
|
java.util.List |
getModifications()
|
private java.util.Date |
parseDate(java.lang.String date)
Converts the date timestamp from the perforce output into a date object. |
private void |
processGetComment(java.lang.String line)
Process the current input line in the GET_COMMENT state. |
private void |
processGetRevision(java.lang.String line)
Most of the relevant info is on the revision line matching the 'pattern' string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.text.SimpleDateFormat PERFORCE_TIMESTAMP
private java.util.List entries
private static final int GET_REVISION
private static final int GET_COMMENT_BEGIN
private static final int GET_COMMENT
private static final java.lang.String COMMENT_DELIMITER
private static final java.lang.String FILE_BEGIN_TOKEN
private int status
private org.apache.maven.scm.ChangeSet currentChange
private java.lang.String currentFile
private org.apache.regexp.RE revisionRegexp
private java.util.Date startDate
private java.util.Date endDate
private static final java.lang.String pattern
Constructor Detail |
public PerforceChangeLogConsumer(java.util.Date startDate, java.util.Date endDate)
Method Detail |
public java.util.List getModifications()
public void consumeLine(java.lang.String line)
consumeLine
in interface org.codehaus.plexus.util.cli.StreamConsumer
private void addEntry(org.apache.maven.scm.ChangeSet entry, org.apache.maven.scm.ChangeFile file)
entry
- a ChangeLogEntry
to be added to the list if another
with the same key (p4 change number) doesn't exist already.file
- a ChangeLogFile
to be added to the entryprivate void processGetRevision(java.lang.String line)
line
- A line of text from the perforce log outputprivate void processGetComment(java.lang.String line)
line
- a line of text from the perforce log outputprivate java.util.Date parseDate(java.lang.String date)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |