com.aragost.javahg.commands
Class UpdateCommand
java.lang.Object
com.aragost.javahg.internals.AbstractCommand
com.aragost.javahg.commands.flags.UpdateCommandFlags
com.aragost.javahg.commands.UpdateCommand
public class UpdateCommand
- extends UpdateCommandFlags
Command class for executing hg update. Set flags from
UpdateCommandFlags
and call the execute()
method.
Methods inherited from class com.aragost.javahg.internals.AbstractCommand |
cancel, clear, cmdAppend, cmdAppend, cmdAppend, cmdAppend, cmdAppend, doneHook, getErrorString, getRepository, getReturnCode, launchIterator, launchStream, launchString, needsInputLine, reopenOutputChannelStream, sendLine, toString, withDebugAndChangesetStyle, withDebugFlag |
UpdateCommand
public UpdateCommand(Repository repository)
- Parameters:
repository
- the repository associated with this command.
execute
public UpdateResult execute()
throws IOException
- Run hg update on a clean working copy. This runs with
no merge oracle and so the caller must ensure that there are no
merge conflicts.
- Returns:
- the update result.
- Throws:
IOException
execute
public UpdateResult execute(ManifestMergeOracle oracle)
throws IOException
- Run hg update with a merge oracle.
- Parameters:
oracle
- the merge oracle to use in case of merge conflicts.
- Returns:
- the update result.
- Throws:
IOException
isSuccessful
public boolean isSuccessful()
- Description copied from class:
AbstractCommand
- Check if the command ended with a zero return code. Subclasses
can override this to accept other return codes as successful.
- Overrides:
isSuccessful
in class AbstractCommand
- Returns:
- true if the command ended successfully.
crossedBranch
public boolean crossedBranch()
- Returns:
- True if the command was not successful because it would have
crossed branches. Applicable to updates where revision is not
specified.
rev
public UpdateCommand rev(Changeset cset)
- Set the --rev flag.
- Parameters:
cset
- the changeset to update to
- Returns:
- this command.
Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.