com.aragost.javahg.commands
Class ExportCommand

java.lang.Object
  extended by com.aragost.javahg.internals.AbstractCommand
      extended by com.aragost.javahg.commands.flags.ExportCommandFlags
          extended by com.aragost.javahg.commands.ExportCommand

public class ExportCommand
extends ExportCommandFlags

Command class for executing hg export. Set flags from ExportCommandFlags 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
ExportCommand(Repository repository)
           
 
Method Summary
 String execute(int... revs)
          Export a revision to a string.
 String execute(String... revs)
          Export a revision to a string.
 HgInputStream stream(String... revs)
          Export a revision to a stream.
 
Methods inherited from class com.aragost.javahg.commands.flags.ExportCommandFlags
getCommandName, nodates, on, rev, switchParent
 
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

ExportCommand

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

execute

public String execute(String... revs)
Export a revision to a string.

Parameters:
revs - list of changeset identifiers to export.
Returns:
the patch as a string.
Throws:
IOException

execute

public String execute(int... revs)
Export a revision to a string.

Parameters:
revs - list of revision numbers to export.
Returns:
the patch as a string.
Throws:
IOException

stream

public HgInputStream stream(String... revs)
Export a revision to a stream. Note: The caller is responsible for fully consuming the returned stream

Parameters:
revs - list of changeset identifiers to export.
Returns:
the patch as a string.
Throws:
IOException


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