Package com.adaptris.core.management.vcs
Interface VersionControlSystem
-
public interface VersionControlSystem
Basic Version control System interface.- Since:
- 3.0.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAndCommit(java.io.File workingCopyUrl, java.lang.String commitMessage, java.lang.String... fileNames)
Add and commit the list of provided files to the remote repository.java.lang.String
checkout(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl)
Will perform a fresh checkout from the remote repository url to the local working copy url.java.lang.String
checkout(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl, java.lang.String revision)
Will perform a fresh checkout from the remote repository url to the local working copy url, to the specified revision number.void
commit(java.io.File workingCopyUrl, java.lang.String commitMessage)
Will send your changes to the remote repository, with the supplied commit message.java.lang.String
getImplementationName()
java.lang.String
getLocalRevision(java.io.File workingCopyUrl)
This method will return your local repositories current revision number/string/id.java.lang.String
getRemoteRevision(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl)
This method will return the remote repositories latest revision number/string/id.java.util.List<RevisionHistoryItem>
getRemoteRevisionHistory(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl, int limit)
Will return a list ofRevisionHistoryItem
's from the remote repository.void
recursiveAdd(java.io.File workingCopyUrl)
Will recursively check directories and sub directories adding all files for commit to the remote repository.java.lang.String
testConnection(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl)
Will perform an action on the remote repository to confirm that the url and credentials for the connection are valid.java.lang.String
update(java.io.File workingCopyUrl)
Will fetch and update your local working copy with the latest changes from the remote repository.java.lang.String
update(java.io.File workingCopyUrl, java.lang.String revision)
Will fetch and update yuour local working copy to the specified revision.
-
-
-
Method Detail
-
testConnection
java.lang.String testConnection(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl) throws VcsException
Will perform an action on the remote repository to confirm that the url and credentials for the connection are valid.- Parameters:
remoteRepoUrl
-workingCopyUrl
-- Returns:
- Revision number
- Throws:
VcsException
-
checkout
java.lang.String checkout(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl) throws VcsException
Will perform a fresh checkout from the remote repository url to the local working copy url.- Parameters:
remoteRepoUrl
-workingCopyUrl
-- Returns:
- Revision number
- Throws:
VcsException
-
checkout
java.lang.String checkout(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl, java.lang.String revision) throws VcsException
Will perform a fresh checkout from the remote repository url to the local working copy url, to the specified revision number.- Parameters:
remoteRepoUrl
-workingCopyUrl
-revision
-- Returns:
- Revision number
- Throws:
VcsException
-
update
java.lang.String update(java.io.File workingCopyUrl, java.lang.String revision) throws VcsException
Will fetch and update yuour local working copy to the specified revision.- Parameters:
workingCopyUrl
-revision
-- Returns:
- Revision number
- Throws:
VcsException
-
update
java.lang.String update(java.io.File workingCopyUrl) throws VcsException
Will fetch and update your local working copy with the latest changes from the remote repository.- Parameters:
workingCopyUrl
-- Returns:
- Revision number
- Throws:
VcsException
-
commit
void commit(java.io.File workingCopyUrl, java.lang.String commitMessage) throws VcsException
Will send your changes to the remote repository, with the supplied commit message.- Parameters:
workingCopyUrl
-commitMessage
-- Throws:
VcsException
-
recursiveAdd
void recursiveAdd(java.io.File workingCopyUrl) throws VcsException
Will recursively check directories and sub directories adding all files for commit to the remote repository.- Parameters:
workingCopyUrl
-- Throws:
VcsException
-
addAndCommit
void addAndCommit(java.io.File workingCopyUrl, java.lang.String commitMessage, java.lang.String... fileNames) throws VcsException
Add and commit the list of provided files to the remote repository. Useful when only some files need to be committed.- Parameters:
workingCopyUrl
-commitMessage
-fileNames
- relative to the workingCopyUrl- Throws:
VcsException
-
getImplementationName
java.lang.String getImplementationName()
- Returns:
- VCS Implementation Name
-
getRemoteRevision
java.lang.String getRemoteRevision(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl) throws VcsException
This method will return the remote repositories latest revision number/string/id.- Returns:
- Revision as a String
- Throws:
VcsException
-
getLocalRevision
java.lang.String getLocalRevision(java.io.File workingCopyUrl) throws VcsException
This method will return your local repositories current revision number/string/id.- Returns:
- Revision as a String
- Throws:
VcsException
-
getRemoteRevisionHistory
java.util.List<RevisionHistoryItem> getRemoteRevisionHistory(java.lang.String remoteRepoUrl, java.io.File workingCopyUrl, int limit) throws VcsException
Will return a list of
RevisionHistoryItem
's from the remote repository.The results returned may also be limited by providing a limit > zero. If your supplied limit equals zero then the results will not be limited.
- Parameters:
remoteRepoUrl
-- Returns:
- a list of
RevisionHistoryItem
s - Throws:
VcsException
-
-