Class AddRemoveCommand

  extended by com.aragost.javahg.internals.AbstractCommand
      extended by com.aragost.javahg.commands.flags.AddRemoveCommandFlags
          extended by com.aragost.javahg.commands.AddRemoveCommand

public class AddRemoveCommand
extends AddRemoveCommandFlags

Command class for executing hg addremove. Set flags from AddRemoveCommandFlags and see the #execute(String...) method for how to run the command.

Nested Class Summary
Nested classes/interfaces inherited from class com.aragost.javahg.internals.AbstractCommand
Constructor Summary
AddRemoveCommand(Repository repository)
Method Summary
 List<String> execute()
 boolean isSuccessful()
          Check if the command ended successfully.
Methods inherited from class com.aragost.javahg.commands.flags.AddRemoveCommandFlags
getCommandName, on
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


public AddRemoveCommand(Repository repository)
repository - the repository associated with this command.
Method Detail


public boolean isSuccessful()
Check if the command ended successfully.

In contrast with Mercurial, a return code of 1 is considered to be successful. Mercurial returns 1 if some files could not be found, but at the same time it does add the files that could be found.

isSuccessful in class AbstractCommand
true if the command exited with 0 or 1.


public List<String> execute()
List of added or removed files

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