Class JazzListChangesetConsumer
java.lang.Object
org.apache.maven.scm.util.AbstractConsumer
org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
org.apache.maven.scm.provider.jazz.command.changelog.JazzListChangesetConsumer
- All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
Consume the output of the scm command for the "list changesets" operation.
This parses the contents of the output and uses it to fill in the remaining
information in the
entries
list.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Pattern
private static final Pattern
private int
private int
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final int
private static final int
private static final int
private static final int
private static final int
private final String
Fields inherited from class org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
fed
-
Constructor Summary
ConstructorsConstructorDescriptionJazzListChangesetConsumer
(ScmProviderRepository repo, ScmLogger logger, List<ChangeSet> entries, String userDateFormat) Constructor for our "scm list changeset" consumer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
consumeLine
(String line) Process one line of output from the execution of the "scm list changeset" command.private ScmFileStatus
parseChangeSetChangeState
(String state) Parse the change state file flags from Jazz and map them to the maven SCM ones.private ScmFileStatus
parseFileChangeState
(String state) Parse the change state file flags from Jazz and map them to the maven SCM ones.private void
processChangeSetLine
(String line) private void
processChangesLine
(String line) private void
processModifiedLine
(String line) protected String
stripDelimiters
(String text) String the leading/trailing ", invalid input: '<' and > from the text.Methods inherited from class org.apache.maven.scm.provider.jazz.command.consumer.AbstractRepositoryConsumer
getRepository, isFed, setFed, setRepository
Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
-
Field Details
-
STATE_CHANGE_SETS
private static final int STATE_CHANGE_SETS- See Also:
-
STATE_CHANGE_SET
private static final int STATE_CHANGE_SET- See Also:
-
STATE_COMPONENT
private static final int STATE_COMPONENT- See Also:
-
STATE_MODIFIED
private static final int STATE_MODIFIED- See Also:
-
STATE_CHANGES
private static final int STATE_CHANGES- See Also:
-
HEADER_CHANGE_SETS
- See Also:
-
HEADER_CHANGE_SET
- See Also:
-
HEADER_COMPONENT
- See Also:
-
HEADER_MODIFIED
- See Also:
-
HEADER_CHANGES
- See Also:
-
JAZZ_TIMESTAMP_PATTERN
- See Also:
-
JAZZ_TIMESTAMP_PATTERN_TIME
- See Also:
-
CHANGESET_PATTERN
-
CHANGES_PATTERN
-
entries
-
userDateFormat
-
currentChangeSetIndex
private int currentChangeSetIndex -
currentState
private int currentState
-
-
Constructor Details
-
JazzListChangesetConsumer
public JazzListChangesetConsumer(ScmProviderRepository repo, ScmLogger logger, List<ChangeSet> entries, String userDateFormat) Constructor for our "scm list changeset" consumer.- Parameters:
repo
- The JazzScmProviderRepository being used.logger
- The ScmLogger to use.entries
- The List of ChangeSet entries that we will populate.
-
-
Method Details
-
consumeLine
Process one line of output from the execution of the "scm list changeset" command.- Specified by:
consumeLine
in interfaceorg.codehaus.plexus.util.cli.StreamConsumer
- Overrides:
consumeLine
in classAbstractRepositoryConsumer
- Parameters:
line
- The line of output from the external command that has been pumped to us.- See Also:
-
processChangeSetLine
-
processModifiedLine
-
processChangesLine
-
stripDelimiters
String the leading/trailing ", invalid input: '<' and > from the text.- Parameters:
text
- The text to process.- Returns:
- The striped text.
-
parseChangeSetChangeState
Parse the change state file flags from Jazz and map them to the maven SCM ones. "----" Character positions 0-3. [0] is '*' or '-' Indicates that this is the current change set ('*') or not ('-'). STATE_CHANGESET_CURRENT [1] is '!' or '-' Indicates a Potential Conflict ('!') or not ('-'). STATE_POTENTIAL_CONFLICT [2] is '#' or '-' Indicates a Conflict ('#') or not ('-'). STATE_CONFLICT [3] is '@' or '$' Indicates whether the changeset is active ('@') or not ('$'). STATE_CHANGESET_ACTIVE- Parameters:
state
- The 5 character long state string- Returns:
- The ScmFileStatus value.
-
parseFileChangeState
Parse the change state file flags from Jazz and map them to the maven SCM ones. "-----" Character positions 0-4. The default is '-'. [0] is '-' or '!' Indicates a Potential Conflict. STATE_POTENTIAL_CONFLICT [1] is '-' or '#' Indicates a Conflict. STATE_CONFLICT [2] is '-' or 'a' Indicates an addition. STATE_ADD or 'd' Indicates a deletion. STATE_DELETE or 'm' Indicates a move. STATE_MOVE [3] is '-' or 'c' Indicates a content change. STATE_CONTENT_CHANGE [4] is '-' or 'p' Indicates a property change. STATE_PROPERTY_CHANGE NOTE: [3] and [4] can only be set it [2] is NOT 'a' or 'd'.- Parameters:
state
- The 5 character long state string- Returns:
- The SCMxxx value.
-