com.aragost.javahg.commands
Class RemoveCommand

java.lang.Object
  extended by com.aragost.javahg.internals.AbstractCommand
      extended by com.aragost.javahg.commands.flags.RemoveCommandFlags
          extended by com.aragost.javahg.commands.RemoveCommand

public class RemoveCommand
extends RemoveCommandFlags

Command class for executing hg remove. Set flags from RemoveCommandFlags 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
RemoveCommand(Repository repository)
           
 
Method Summary
 List<File> execute()
           
 List<File> execute(File... files)
          Execute the remove command, and return list of files removed.
 List<String> execute(String... files)
          Execute the remove command, and return list of files removed.
 boolean isSuccessful()
          Check if the command ended successfully.
 
Methods inherited from class com.aragost.javahg.commands.flags.RemoveCommandFlags
after, exclude, force, getCommandName, include, 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

RemoveCommand

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

isSuccessful

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 remove the files that could be found.

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

execute

public List<String> execute(String... files)
Execute the remove command, and return list of files removed.

Parameters:
files - the files and directories to remove.
Returns:
list of removed files.

execute

public List<File> execute(File... files)
Execute the remove command, and return list of files removed.

Parameters:
files - the files and directories to remove.
Returns:
list of removed files.

execute

public List<File> execute()


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