public class AddCommand
- extends AddCommandFlags
Command class for executing hg add. Set flags from
AddCommandFlags and see the
method for how to run the command.
|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
public AddCommand(Repository repository)
repository - the repository associated with this command.
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
isSuccessful in class
- true if the command exited with 0 or 1.
public List<String> execute(String... paths)
- Execute the add command, and return list of files added.
If a file could not be found, then Mercurial adds the other
files and exit with a return code of 1. As described in
isSuccessful(), we don't treat that as an error and
the caller should instead inspect the returned list to see if
all files were added.
paths - the files or directories to add. Leave empty to add
all untracked files.
- list of files added actually.
public List<File> execute(File... paths)
public List<File> execute()
Copyright © 2011-2013 aragost Trifork ag. All Rights Reserved.