com.aragost.javahg.commands
Class LogCommand
java.lang.Object
com.aragost.javahg.internals.AbstractCommand
com.aragost.javahg.commands.flags.LogCommandFlags
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.
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 |
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
-
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.