public class VssChangeLogConsumer extends AbstractConsumer
Modifier and Type | Field and Description |
---|---|
private ChangeSet |
currentChangeSet |
private ChangeFile |
currentFile |
private java.util.Map<java.lang.String,ChangeSet> |
entries
rcs entries, in reverse (date, time, author, comment) order
|
private static java.text.SimpleDateFormat |
ENTRY_KEY_TIMESTAMP_FORMAT
Custom date/time formatter.
|
private static int |
GET_AUTHOR
expecting date
|
private static int |
GET_COMMENT
expecting comments
|
private static int |
GET_FILE
expecting file information
|
private static int |
GET_FILE_PATH
expecting file path information
|
private static int |
GET_REVISION
expecting revision
|
private static int |
GET_UNKNOWN
unknown vss history line status
|
private int |
lastStatus
last status of the parser
|
private VssScmProviderRepository |
repo |
private static java.lang.String |
START_AUTHOR
Marks author data
|
private static java.lang.String |
START_COMMENT
Marks comment data
|
private static java.lang.String |
START_FILE
Marks start of file data
|
private static java.lang.String |
START_FILE_PATH
Marks start of file data
|
private static java.lang.String |
START_REVISION
Marks start of revision
|
private java.lang.String |
userDatePattern |
Constructor and Description |
---|
VssChangeLogConsumer(VssScmProviderRepository repo,
java.lang.String userDatePattern,
ScmLogger logger) |
Modifier and Type | Method and Description |
---|---|
private 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(java.lang.String line) |
private int |
getLineStatus(java.lang.String line)
Identify the status of a vss history line
|
java.util.List<ChangeSet> |
getModifications() |
private void |
processGetAuthor(java.lang.String line)
Process the current input line in the Get Author state.
|
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 |
processGetFilePath(java.lang.String line)
Process the current input line in the Get File Path state.
|
private void |
processGetRevision(java.lang.String line)
Process the current input line in the Get Revision state.
|
getLogger, parseDate, parseDate, setLogger
private static final java.text.SimpleDateFormat ENTRY_KEY_TIMESTAMP_FORMAT
private static final int GET_FILE
private static final int GET_FILE_PATH
private static final int GET_AUTHOR
private static final int GET_COMMENT
private static final int GET_REVISION
private static final int GET_UNKNOWN
private static final java.lang.String START_FILE
private static final java.lang.String START_FILE_PATH
private static final java.lang.String START_REVISION
private static final java.lang.String START_AUTHOR
private static final java.lang.String START_COMMENT
private java.util.Map<java.lang.String,ChangeSet> entries
private ChangeFile currentFile
private ChangeSet currentChangeSet
private int lastStatus
private VssScmProviderRepository repo
private java.lang.String userDatePattern
public VssChangeLogConsumer(VssScmProviderRepository repo, java.lang.String userDatePattern, ScmLogger logger)
public java.util.List<ChangeSet> getModifications()
public void consumeLine(java.lang.String line)
private void processGetComment(java.lang.String line)
line
- a line of text from the VSS log outputprivate void processGetAuthor(java.lang.String line)
line
- a line of text from the VSS log outputprivate void processGetFile(java.lang.String line)
line
- a line of text from the VSS log outputprivate void processGetFilePath(java.lang.String line)
line
- a line of text from the VSS log outputprivate void processGetRevision(java.lang.String line)
line
- a line of text from the VSS log outputprivate int getLineStatus(java.lang.String line)
line
- The line to processprivate void addEntry(ChangeSet entry, ChangeFile file)
entry
- a ChangeSet
to be added to the list if another
with the same key doesn't exist already. If the entry's author
is null, the entry wont be addedfile
- a ChangeFile
to be added to the entry