OpenAPI 1.0

com.aquafold.openapi.vcs
Interface AQGit


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 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 fetch()
          Downloads objects and refs from one or more other repositories.
 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.
 void merge(String ref)
          Performs a very basic merge operation, which allows only one argument.
 void pull()
          Incorporates changes from a remote repository into the current branch.
 void setVerbose(boolean verbose)
          Sets the amount of diagnostic messages sent to the debugger console.
 void setWorkspace(String path)
          Sets workspace folder.
 

Method Detail

setVerbose

void setVerbose(boolean verbose)
Sets the amount of diagnostic messages sent to the debugger console.

Parameters:
verbose - (Default value - true).

setWorkspace

void setWorkspace(String path)
Sets workspace folder.

Parameters:
path - Workspace path.

commit

void commit(Object files,
            Object username,
            Object email,
            String comment)
            throws Exception
This method commits changes in the specified file or folder.

Parameters:
files - A file name, or a javascript array of file names
username - A String or a AQOpaqueObject containing the user name.
email - A String or a AQOpaqueObject containing the user email address.
comment -
Throws:
Exception

commit

void commit(Object username,
            Object email,
            String comment)
            throws Exception
This method records changes to the repository

Parameters:
username - A String or a AQOpaqueObject containing the user name.
email - A String or a AQOpaqueObject containing the user email address.
comment -
Throws:
Exception

add

void add(Object files)
         throws Exception
Adds file or files to the list of files staged for the next commit.

Parameters:
files - A file name, or a javascript array of file names
Throws:
Exception

add

void add(String filePattern,
         boolean update)
         throws Exception
Adds file or files to the list of files staged for the next commit.

Parameters:
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.
Throws:
Exception

getRevision

AQRevision getRevision(String filename)
                       throws Exception
Returns the file revision.

Parameters:
filename - Workspace file name.
Throws:
Exception

getHistory

AQRevision[] getHistory(String filename)
                        throws Exception
Returns the file's complete revision history.

Parameters:
filename - Workspace file name.
Throws:
Exception

getHistory

AQRevision[] getHistory(String filename,
                        int count)
                        throws Exception
Returns the file's revision history.

Parameters:
filename - Workspace file name.
count - Maximum number of revisions to return.
Throws:
Exception

getRevisionContents

byte[] getRevisionContents(String filename,
                           Object revision)
                           throws Exception
Returns the binary contents of the specified revision.

Parameters:
filename - Workspace file name.
revision - An AQRevision object or a SHA-1 hash of a commit, obtained via AQRevision.getRevision()
Throws:
Exception

merge

void merge(String ref)
           throws Exception
Performs a very basic merge operation, which allows only one argument. Currently, this command supports only fast forward merge.

Parameters:
ref - A reference to a commit which is merged with the current head.
Throws:
Exception

clone

void clone(String folder,
           String url,
           String branch)
           throws Exception
Clones a repository into a new directory.

Parameters:
folder - Destination folder.
url - Repository URL.
branch - (Optional) branch name. An empty branch name (or null) selects the repository HEAD.
Throws:
Exception

fetch

void fetch()
           throws Exception
Downloads objects and refs from one or more other repositories.

Throws:
Exception

pull

void pull()
          throws Exception
Incorporates changes from a remote repository into the current branch. In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD.

Throws:
Exception

init

void init(String folder,
          boolean bare)
          throws Exception
Creates an empty git repository or reinitialize an existing one.

Parameters:
folder -
bare - When true, creates a bare repository.
Throws:
Exception

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.