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 hgprivate static final int
Number 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 hgA list of the MAX_STDERR_SIZE last errors or warnings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
consumeLine
(String line) void
doConsume
(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 String
private boolean
Methods inherited from class org.apache.maven.scm.util.AbstractConsumer
getLogger, parseDate, parseDate, setLogger
-
Field Details
-
IDENTIFIERS
A list of known keywords from hg -
MESSAGES
A list of known message prefixes from hg -
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
A list of the MAX_STDERR_SIZE last errors or warnings.
-
-
Constructor Details
-
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
-