Extend API to support remote commands like rlist, rlog
------------------------------------------------------

                 Key: SCM-381
                 URL: http://jira.codehaus.org/browse/SCM-381
             Project: Maven SCM
          Issue Type: New Feature
          Components: maven-scm-api
    Affects Versions: 1.x
            Reporter: Sergey Zakusov


We propose to extend the existing API to support some remote commands - it's a 
really required feature to allow work with SCMs without Working Copies.

For a start there should be done the following commands:
# *rlist* - to list remotely repository entries;
# *rinfo* - to get information about repository entries;
# *rlog* - to get change log of repository entries;
# *rcat* - to get file contents remotely.

It can be specified as a new interface extended from ScmManager:

{code:title=ScmRemoteManager.java|bolderStyle=solid}
public interface ScmRemoteManager extends ScmManager {

    /**
     * Lists remotely each element specified by <B>i_fileSet</B> in the 
repository.
     * 
     * @param i_repository the source control system to use
     * @param i_fileSet the entries (files and/or directories) to list
     * @param i_recursive descend recursively
     * @param i_version use the version defined by the branch/tag/revision
     * @return The list of entries in the repository
     * @throws ScmException if the command cannot be performed
     * @see ScmManager#list(ScmRepository, ScmFileSet, boolean, ScmVersion) to 
work with Working Copy
     */
    ListScmResult rlist(ScmRepository i_repository, ScmFileSet i_fileSet, 
boolean i_recursive, ScmVersion i_version)
            throws ScmException;

    /**
     * Retrieves information about each remote element specified by 
<B>i_fileSet</B>.
     * 
     * @param i_repository the source control system to use
     * @param i_fileSet the entries (files and/or directories) to get 
information
     * @param i_version the branch/tag/revision to use
     * @return Information about each requested entry from the repository
     * @throws ScmException if the command cannot be performed
     */
    InfoScmResult rinfo(ScmRepository i_repository, ScmFileSet i_fileSet, 
ScmVersion i_version) throws ScmException;

    /**
     * Retrieves log information about each remote element specified by 
<B>i_fileSet</B>.
     * 
     * @param i_repository the source control system to use
     * @param i_fileSet the entries (files and/or directories) to get 
information
     * @param i_startVersion the start branch/tag/revision
     * @param i_endVersion the end branch/tag/revision
     * @return Log information about each requested entry from the repository
     * @throws ScmException if the command cannot be performed
     * @see ScmManager#changeLog(ScmRepository, ScmFileSet, ScmVersion, 
ScmVersion) to work with Working Copy
     */
    ChangeLogScmResult rlog(ScmRepository i_repository, ScmFileSet i_fileSet, 
ScmVersion i_startVersion,
            ScmVersion i_endVersion) throws ScmException;

    /**
     * Fetches the contents and/or properties of each remote element specified 
by <B>i_fileSet</B>.
     * 
     * @param i_repository the source control system to use
     * @param i_fileSet the files to get content
     * @param i_version the branch/tag/revision to use
     * @return Contents and/or properties of each requested file from the 
repository
     * @throws ScmException if the command cannot be performed
     */
    CatScmResult rcat(ScmRepository i_repository, ScmFileSet i_fileSet, 
ScmVersion i_version) throws ScmException;
}
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to