org.codehaus.mojo.scmchangelog.scm.hg.command.changelog
Class HgChangeLogConsumer

java.lang.Object
  extended by org.apache.maven.scm.util.AbstractConsumer
      extended by org.apache.maven.scm.provider.hg.command.HgConsumer
          extended by org.codehaus.mojo.scmchangelog.scm.hg.command.changelog.HgChangeLogConsumer
All Implemented Interfaces:
org.codehaus.plexus.util.cli.StreamConsumer

public class HgChangeLogConsumer
extends org.apache.maven.scm.provider.hg.command.HgConsumer

Command consumer that parses the output from a hg log --verbose -rx:y command, using a grammar to build the changelog.

Version:
$Id: HgChangeLogConsumer.java 7663 2008-09-12 07:55:51Z ehsavoie $
Author:
ehsavoie
See Also:
HgConsumer, org.codehaus.mojo.scmchangelog.scm.hg.changelog.HgChangeLogCommand

Constructor Summary
HgChangeLogConsumer(org.apache.maven.scm.log.ScmLogger logger, String userDatePattern)
          Construtor for HgChangeLogConsumer.
 
Method Summary
 void consumeLine(String line)
          Consume a line of the output of the command.
 void doConsume(org.apache.maven.scm.ScmFileStatus status, String line)
          Consume a line
 List getModifications()
          Return a list of BetterChangeSet.
 
Methods inherited from class org.apache.maven.scm.provider.hg.command.HgConsumer
getStdErr
 
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

HgChangeLogConsumer

public HgChangeLogConsumer(org.apache.maven.scm.log.ScmLogger logger,
                           String userDatePattern)
Construtor for HgChangeLogConsumer.

Parameters:
logger - the logger used for trace.
userDatePattern - the pattern for parsing dates.
Method Detail

getModifications

public List getModifications()
Return a list of BetterChangeSet.

Returns:
a List<BetterChangeSet>
See Also:
org.codehaus.mojo.scmchangelog.scm.hg.changelog.BetterChangeSet

consumeLine

public void consumeLine(String line)
Consume a line of the output of the command.

Specified by:
consumeLine in interface org.codehaus.plexus.util.cli.StreamConsumer
Overrides:
consumeLine in class org.apache.maven.scm.provider.hg.command.HgConsumer
Parameters:
line - the line to be interpreted.

doConsume

public void doConsume(org.apache.maven.scm.ScmFileStatus status,
                      String line)
Consume a line

Overrides:
doConsume in class org.apache.maven.scm.provider.hg.command.HgConsumer
Parameters:
status - null.
line - a line of the command output.


Copyright © 2008-2009 Codehaus. All Rights Reserved.