Class HgConsumer
java.lang.Object
org.apache.maven.scm.util.AbstractConsumer
org.apache.maven.scm.provider.hg.command.HgConsumer
- All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer
- Direct Known Subclasses:
HgAddConsumer, HgBlameConsumer, HgChangeLogConsumer, HgCheckOutConsumer, HgConfig.HgVersionConsumer, HgDiffConsumer, HgInfoConsumer, HgListConsumer, HgOutgoingConsumer, HgRemoveConsumer, HgStatusConsumer, HgTagConsumer, HgUtils.HgBranchnameConsumer, HgUtils.HgRevNoConsumer
Base consumer to do common parsing for all hg commands.
More specific: log line each line if debug is enabled, get file status and detect warnings from hg.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<String, ScmFileStatus> A list of known keywords from hg.private static final intNumber of lines to keep from Std.Err This size is set to ensure that we capture enough info but still keeps a low memory footprint.A list of known message prefixes from hg.A list of the MAX_STDERR_SIZE last errors or warnings.Fields inherited from class AbstractConsumer
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconsumeLine(String line) voiddoConsume(ScmFileStatus status, String trimmedLine) Warnings and errors is usually printed out in Std.Err, thus for derived consumers operating on Std.Out this would typically return an empty string.private static Stringprivate booleanMethods inherited from class AbstractConsumer
parseDate, parseDate
-
Field Details
-
IDENTIFIERS
A list of known keywords from hg. -
MESSAGES
-
MAX_STDERR_SIZE
private static final int MAX_STDERR_SIZENumber of lines to keep from Std.Err This size is set to ensure that we capture enough info but still keeps a low memory footprint.- See Also:
-
stderr
-
-
Constructor Details
-
HgConsumer
public HgConsumer()
-
-
Method Details
-
doConsume
-
consumeLine
-
getStdErr
Warnings and errors is usually printed out in Std.Err, thus for derived consumers operating on Std.Out this would typically return an empty string.- Returns:
- return the last lines interpreted as an warning or an error
-
processInputForKnownIdentifiers
-
processInputForKnownMessages
-