org.apache.maven.scm.provider.hg.command

## 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, HgChangeLogConsumer, HgCheckOutConsumer, HgDiffConsumer, HgListConsumer, HgRemoveConsumer, HgTagConsumer

    public class HgConsumer
    extends AbstractConsumer

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

Version:
  $Id: HgConsumer.java 691810 2008-09-03 22:38:28Z vsiveton $
Author:
  thurner rupert

### Constructor Summary

Constructors
Constructor and Description
`HgConsumer(ScmLogger logger)`

### Method Summary

Methods
`void` `consumeLine(String line)`
`void` `doConsume(ScmFileStatus status, String trimmedLine)`
`String` `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.

### Methods inherited from class org.apache.maven.scm.util.AbstractConsumer

`getLogger, parseDate, parseDate, setLogger`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HgConsumer

    public HgConsumer(ScmLogger logger)

### Method Detail

#### doConsume

    public void doConsume(ScmFileStatus status,
                 String trimmedLine)

#### consumeLine

    public void consumeLine(String line)

#### getStdErr

    public String 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