|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQGit
An interface to GIT distributed revision control system.
Method Summary | |
---|---|
void |
add(Object files)
Adds file or files to the list of files staged for the next commit. |
void |
add(String filePattern,
boolean update)
Adds file or files to the list of files staged for the next commit. |
void |
addRemote(String name,
String url)
Add a remote. |
void |
applyStash(String ref)
Apply a stashed commit on top of the current working tree. |
void |
checkout(String name)
Checkout a branch |
void |
cherryPick(Object revision)
Integrates an individual commit into the current branch. |
String[] |
clean(Object files,
boolean dryRun)
Remove untracked files from the working tree. |
void |
clone(String folder,
String url,
String branch)
Clones a repository into a new directory. |
void |
commit(Object files,
Object username,
Object email,
String comment)
This method commits changes in the specified file or folder. |
void |
commit(Object username,
Object email,
String comment)
This method records changes to the repository. |
void |
createBranch(String name,
String ref)
Create a local branch. |
void |
createStash(Object username,
Object email,
String indexMessage,
String workingMessage)
Stash all current changes and return working tree to a clean state. |
void |
deleteBranch(String... names)
Delete one or more branches. |
void |
deleteTag(String... tags)
Delete one or more tags. |
void |
dropStash(int stashRef)
Delete a stashed commit. |
void |
fetch()
Downloads objects and refs from the default remote 'origin'. |
void |
fetch(String remote)
Downloads objects and refs from the specified remote repository. |
AQRevision[] |
getHistory(String filename)
Returns the file's complete revision history. |
AQRevision[] |
getHistory(String filename,
int count)
Returns the file's revision history. |
AQRevision |
getRevision(String filename)
Returns the file revision. |
byte[] |
getRevisionContents(String filename,
Object revision)
Returns the binary contents of the specified revision. |
void |
init(String folder,
boolean bare)
Creates an empty git repository or reinitialize an existing one. |
String[] |
listBranch()
Obtain a list of branches |
String[] |
listRemote()
List remotes. |
AQRevision[] |
listStash()
Return a list of stash commits |
String[] |
listTag()
Obtain a list of tags. |
AQRevision[] |
log(Object start,
int count)
Obtain the log. |
void |
merge(Object revision)
Performs a very basic merge operation, which allows only one argument. |
void |
pull()
Incorporates changes from a remote repository into the current branch. |
void |
push()
Push new branches and data to a remote repository. |
void |
rebase(Object upstream)
The Git rebase command. |
void |
rebaseAbort()
Abort the rebase process. |
void |
rebaseContinue()
Continue the rebase process. |
void |
rebaseSkip()
Skip the rebase process. |
void |
removeRemote(String name)
Remove a remote. |
void |
renameBranch(String oldName,
String newName)
Rename a branch |
void |
reset(String ref,
String mode,
String filename)
Undo changes and commits. |
void |
revert(Object commits)
Create a commit with the reverse patch to cancel it out. |
void |
setCredentials(String url,
String identity,
String password)
Register a credentials provider. |
void |
setVerbose(boolean verbose)
Sets the amount of diagnostic messages sent to the debugger console. |
void |
setWorkspace(String path)
Sets workspace folder. |
AQGitStatus |
status()
Obtain the Git repo status. |
void |
tag(Object revision,
String name,
Object username,
Object email,
String comment)
Create a tag. |
void |
trackRemote(String localBranch,
String remoteBranch)
Track remote branch. |
Method Detail |
---|
void setVerbose(boolean verbose)
verbose
- (Default value - true).void setWorkspace(String path)
path
- Workspace path.void setCredentials(String url, String identity, String password) throws Exception
null
loads known hosts
and private keys from $HOME/.ssh
.
url
- the url, protocol://host/path/to/repo.gitidentity
- username or public key filepassword
- password or passphrase
Exception
void commit(Object files, Object username, Object email, String comment) throws Exception
files
- A file name, or a javascript array of file namesusername
- A String
or a AQOpaqueObject
containing the user name.email
- A String
or a AQOpaqueObject
containing the user email address.comment
-
Exception
void commit(Object username, Object email, String comment) throws Exception
username
- A String
or a AQOpaqueObject
containing the user name.email
- A String
or a AQOpaqueObject
containing the user email address.comment
-
Exception
void add(Object files) throws Exception
files
- A file name, or a javascript array of file names
Exception
void add(String filePattern, boolean update) throws Exception
filePattern
- File to add content from. Also a leading directory name (e.g. dir to add dir/file1 and dir/file2) can be given to add all files
in the directory, recursively. Fileglobs (e.g. *.c) are not yet supported.update
- If set to true, the command only matches filepattern against already tracked files in the index rather than the working tree. That
means that it will never stage new files, but that it will stage modified new contents of tracked files and that it will remove
files from the index if the corresponding files in the working tree have been removed. In contrast to the git command line a
filepattern must exist also if update is set to true as there is no concept of a working directory here.
Exception
AQRevision getRevision(String filename) throws Exception
filename
- Workspace file name
Exception
AQRevision[] getHistory(String filename) throws Exception
filename
- Workspace file name
Exception
AQRevision[] getHistory(String filename, int count) throws Exception
filename
- Workspace file namecount
- Maximum number of revisions to return
Exception
byte[] getRevisionContents(String filename, Object revision) throws Exception
filename
- Workspace file namerevision
- An AQRevision
object or a SHA-1 hash of a commit, obtained via
AQRevision.getRevision()
Exception
void merge(Object revision) throws Exception
revision
- An AQRevision
object or a SHA-1 hash of a commit, obtained via
AQRevision.getRevision()
which is merged with the current head
Exception
void clone(String folder, String url, String branch) throws Exception
folder
- Destination folderurl
- Repository URL, protocol://host/path/to/repo.gitbranch
- (Optional) branch name. An empty branch name (or null
) selects the repository HEAD
Exception
void fetch() throws Exception
Exception
void fetch(String remote) throws Exception
remote
- the remote to fetch from
Exception
void pull() throws Exception
Exception
void init(String folder, boolean bare) throws Exception
folder
- bare
- When true, creates a bare repository.
Exception
void push() throws Exception
Exception
void reset(String ref, String mode, String filename) throws Exception
ref
- A reference to a commit. Points to HEAD if null
mode
- The mode. One of "SOFT", "MIXED" or "HARD"filename
- Workspace file name. May be null
to indicate all files
Note: the mode and filename parameters cannot be combined.
Exception
String[] listBranch() throws Exception
Exception
void createBranch(String name, String ref) throws Exception
name
- the name of the new branchref
- corresponds to the start-point; if null
, HEAD will be used
Exception
void checkout(String name) throws Exception
name
- the branch name
Exception
void renameBranch(String oldName, String newName) throws Exception
oldName
- the name of the branch to rename; if not set, the currently
checked out branch (if any) will be renamednewName
- the new name
Exception
void deleteBranch(String... names) throws Exception
names
- the names of the branches to delete; if not set, this will do
nothing; invalid branch names will simply be ignored
Exception
String[] listTag() throws Exception
Exception
void tag(Object revision, String name, Object username, Object email, String comment) throws Exception
revision
- An AQRevision
object or a SHA-1 hash of a commit, obtained via
AQRevision.getRevision()
name
- the tag nameusername
- A String
or a AQOpaqueObject
containing the user name.email
- A String
or a AQOpaqueObject
containing the user email address.comment
- the tag message
Exception
void deleteTag(String... tags) throws Exception
tags
- tags to be deleted
Exception
void rebase(Object upstream) throws Exception
upstream
- A branch name, an AQRevision
object or a SHA-1 hash of a commit, obtained via
AQRevision.getRevision()
If the operation fails (i.e. due to a merge conflict), a RuntimeException will be thrown.
Exception
void rebaseContinue() throws Exception
Exception
void rebaseSkip() throws Exception
Exception
void rebaseAbort() throws Exception
Exception
String[] listRemote() throws Exception
Exception
void addRemote(String name, String url) throws Exception
name
- the remote nameurl
- the remote url, protocol://host/path/to/repo.git
Exception
void removeRemote(String name) throws Exception
Exception
void trackRemote(String localBranch, String remoteBranch) throws Exception
localBranch
- the local branchremoteBranch
- the remote branch. Use null
to remove remote branch tracking
from local branch
Exception
void cherryPick(Object revision) throws Exception
revision
- An AQRevision
object or a SHA-1 hash of a commit, obtained via
AQRevision.getRevision()
If the operation fails (i.e. due to a merge conflict), a RuntimeException will be thrown.
Exception
AQRevision[] listStash() throws Exception
Exception
void createStash(Object username, Object email, String indexMessage, String workingMessage) throws Exception
username
- A String
or a AQOpaqueObject
containing the user name.email
- A String
or a AQOpaqueObject
containing the user email address.indexMessage
- the message used when committing index changesworkingMessage
- the message used when committing working directory changes
Exception
void applyStash(String ref) throws Exception
ref
- the reference (stash@{x}) to update with the stashed commit id. Use null
for all stashes
Exception
void dropStash(int stashRef) throws Exception
stashRef
- Set the stash reference to drop (0-based)
Exception
AQRevision[] log(Object start, int count) throws Exception
start
- a commit to start graph traversal from. Use null
for HEADcount
- the number of commits to obtain. Use -1 for all
Exception
AQGitStatus status() throws Exception
Exception
void revert(Object commits) throws Exception
commits
- an AQRevision
object or a SHA-1 hash of a commit, obtained via
AQRevision.getRevision()
, or a list of such objects.
Exception
String[] clean(Object files, boolean dryRun) throws Exception
files
- a file name, or a javascript array of file names, or null
for all untracked filesdryRun
- if it is set, the files in question will not actually be deleted
Exception
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |