com.aragost.javahg.commands
Class DiffCommand

java.lang.Object
  extended by com.aragost.javahg.internals.AbstractCommand
      extended by com.aragost.javahg.commands.flags.DiffCommandFlags
          extended by com.aragost.javahg.commands.DiffCommand

public class DiffCommand
extends DiffCommandFlags

Command class for executing hg diff. Set flags from DiffCommandFlags and call the execute() method.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.aragost.javahg.internals.AbstractCommand
AbstractCommand.State
 
Constructor Summary
DiffCommand(Repository repository)
           
 
Method Summary
 String execute()
          Run hg diff.
 String execute(File... files)
          Run hg diff on the files.
 String execute(String... files)
          Run hg diff on the files.
 HgInputStream stream(File... files)
          Run hg diff on the files.
 
Methods inherited from class com.aragost.javahg.commands.flags.DiffCommandFlags
change, exclude, getCommandName, ignoreAllSpace, ignoreBlankLines, ignoreSpaceChange, include, nodates, on, rev, reverse, showFunction, stat, unified
 
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

DiffCommand

public DiffCommand(Repository repository)
Parameters:
repository - the repository associated with this command.
Method Detail

execute

public String execute()
Run hg diff.

Returns:
the diff as a String.

execute

public String execute(String... files)
Run hg diff on the files.

Parameters:
files - the input files
Returns:
the diff as a String.

execute

public String execute(File... files)
Run hg diff on the files.

Parameters:
files - the input files
Returns:
the diff as a String.

stream

public HgInputStream stream(File... files)
Run hg diff on the files. Note: The caller is responsible for fully consuming the returned stream

Parameters:
files - the input files
Returns:
the diff as a stream


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