com.aragost.javahg.commands
Class MergeCommand

java.lang.Object
  extended by com.aragost.javahg.internals.AbstractCommand
      extended by com.aragost.javahg.commands.flags.MergeCommandFlags
          extended by com.aragost.javahg.commands.MergeCommand

public class MergeCommand
extends MergeCommandFlags

Command class for executing hg merge. Set flags from MergeCommandFlags and call the execute(com.aragost.javahg.commands.ManifestMergeOracle) method.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.aragost.javahg.internals.AbstractCommand
AbstractCommand.State
 
Constructor Summary
MergeCommand(Repository repository)
           
 
Method Summary
 MergeContext execute()
           
 boolean execute(ManifestMergeOracle oracle)
          Perform the merge.
 boolean isSuccessful()
          Check if the command ended with a zero return code.
 
Methods inherited from class com.aragost.javahg.commands.flags.MergeCommandFlags
force, getCommandName, on, rev, tool
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MergeCommand

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

execute

public boolean execute(ManifestMergeOracle oracle)
                throws IOException
Perform the merge. Since a merge is an interactive command, a "merge oracle" must be supplied to answer any questions from Mercurial.

Feedback about this API will be greatly appreciated.

Parameters:
oracle -
Returns:
if no conflicts return true otherwise false
Throws:
IOException

execute

public MergeContext execute()
                     throws IOException
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.


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