com.aragost.javahg.commands
Class CloneCommand
java.lang.Object
com.aragost.javahg.internals.AbstractCommand
com.aragost.javahg.commands.flags.CloneCommandFlags
com.aragost.javahg.commands.CloneCommand
public class CloneCommand
- extends CloneCommandFlags
Command class for executing hg clone. Set flags from
CloneCommandFlags
and call the execute(java.lang.String)
method.
Use this command class to clone the current repository to somewhere
else without opening the destination. An example of this is cloning
to a remote SSH path.
To clone a remote repository to a local destination, use the
Repository.clone(java.io.File, String)
factory method.
Method Summary |
String |
execute(String destination)
Clone the current repository to another destination. |
Methods inherited from class com.aragost.javahg.commands.flags.CloneCommandFlags |
branch, getCommandName, insecure, noupdate, on, pull, remotecmd, rev, ssh, uncompressed, updaterev |
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 |
CloneCommand
public CloneCommand(Repository repository)
- Parameters:
repository
- the repository associated with this command.
execute
public String execute(String destination)
throws IOException
- Clone the current repository to another destination.
The equivalent command line call is
hg clone . destination.
- Parameters:
destination
- a path to a local destination or a (SSH) URL to a
remote destination.
- Returns:
- the output of the clone operation.
- Throws:
IOException
Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.