com.aragost.javahg.commands
Class LogCommand

java.lang.Object
  extended by com.aragost.javahg.internals.AbstractCommand
      extended by com.aragost.javahg.commands.flags.LogCommandFlags
          extended by com.aragost.javahg.commands.LogCommand
Direct Known Subclasses:
GenericLogCommand

public class LogCommand
extends LogCommandFlags

Command class for executing hg log. Set flags from LogCommandFlags and call the execute(java.lang.String...) method.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.aragost.javahg.internals.AbstractCommand
AbstractCommand.State
 
Constructor Summary
  LogCommand(Repository repository)
           
protected LogCommand(Repository repository, String stylePath)
          Construct a LogCommand using the specified template.
 
Method Summary
 List<Changeset> execute(String... files)
           
 LogCommand fileStatus()
          Enable eager load for changeset file data.
 Changeset single(String... files)
          Execute the log command and return a single Changeset.
 
Methods inherited from class com.aragost.javahg.commands.flags.LogCommandFlags
branch, copies, date, exclude, follow, followFirst, getCommandName, hidden, include, keyword, limit, noMerges, on, onlyBranch, onlyMerges, prune, removed, rev, user
 
Methods inherited from class com.aragost.javahg.internals.AbstractCommand
cancel, clear, cmdAppend, cmdAppend, cmdAppend, cmdAppend, cmdAppend, doneHook, getErrorString, getRepository, getReturnCode, isSuccessful, launchIterator, launchStream, launchString, needsInputLine, reopenOutputChannelStream, sendLine, toString, withDebugAndChangesetStyle, withDebugFlag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogCommand

public LogCommand(Repository repository)
Parameters:
repository - the repository associated with this command.

LogCommand

protected LogCommand(Repository repository,
                     String stylePath)
Construct a LogCommand using the specified template.

Parameters:
repository -
template -
Method Detail

fileStatus

public LogCommand fileStatus()
Enable eager load for changeset file data.

Returns:
this

execute

public List<Changeset> execute(String... files)
Parameters:
files - an optional list of files to retrieve the log for. With no files, all changesets are considered.
Returns:
the log as a list of changesets

single

public Changeset single(String... files)
Execute the log command and return a single Changeset.

If the log command gives more than one changeset an IllegalArgumentException is thrown. null is returned if the log command gives no Changesets.

Parameters:
files -
Returns:
a single Changeset
Throws:
IllegalArgumentException - if the log command returns more than one changeset


Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.