|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.antmod.scm.impl.CvsSystemImpl
public class CvsSystemImpl
CVS repository provider, providing access to CVS repositories from Antmod.
This CVS repository provider is a thin layer on top of the "cvs" commandline executable, and as such requires the "cvs" executable to be in the PATH of the system.
| Field Summary | |
|---|---|
static char |
REVISION_NAME_SEPARATOR
|
static char |
REVISION_VERSION_SEPARATOR
|
| Constructor Summary | |
|---|---|
CvsSystemImpl()
Public default onstructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
createBranchInTrunk(ScmVersion newBranchForModule)
Creates a new branch in the HEAD of the given module. |
java.lang.String |
createTagInBranch(ScmVersion existingBranch,
ScmVersion newTag)
Creates a new tag in the given BRANCH of the given module. |
void |
doAdd(java.io.File file,
boolean recursive)
Add the given directory or file to this scm system. |
void |
doCheckout(java.lang.String moduleName,
java.io.File destDir,
ScmVersion version,
boolean reallyQuiet)
Checkout a module from this SCM repository into the given destination directory; the destDir contains the module contents afterwards. |
void |
doCheckoutOrUpdate(java.lang.String packageName,
java.io.File destDir,
ScmVersion version,
boolean reallyQuiet)
Convenience method for doing a checkout only if needed, and otherwise updating the existing checkout. |
void |
doCommit(java.io.File file,
java.lang.String message)
Commit the given file or a while directory to CVS. |
void |
doExport(java.lang.String moduleName,
java.io.File destDir,
ScmVersion version,
boolean reallyQuiet)
|
void |
doMerge(java.io.File moduleDir,
ScmVersion version)
Merge in changes made between current version of local module directory and given version. |
void |
doMerge(java.io.File moduleDir,
ScmVersion version,
boolean reallyQuiet)
|
void |
doUpdate(java.io.File file,
ScmVersion version)
Update existing checkout locally to the given revision, or keep the same revision if null. |
void |
doUpdate(java.lang.String packageName,
java.io.File file,
ScmVersion version,
boolean reallyQuiet)
|
ScmDifference[] |
getDifferences(ScmVersion version1,
ScmVersion version2)
Returns the files that have changed between the two given cvs revisions. |
java.lang.String |
getErrorOutput()
|
ScmVersion |
getLatestVersion(java.io.File moduleDir)
If the given module directory is not a tag, returns the latest version for that directory. |
ScmVersion |
getLocalVersion(java.io.File moduleDir)
Returns the currently checked out version of the module in the given directory. |
java.lang.String |
getRevisionNumber(java.io.File file)
Returns the latest file revision. |
java.lang.String |
getStandardOutput()
|
ScmUrl |
getUrl()
Get the URL of the repository which this ScmSystem instance is communicating with. |
ScmVersion[] |
getVersionsInBranch(java.io.File file,
ScmVersion branch)
Returns all available versions for the given file in the given branch, with the newest number first and the oldest number last (oldest is usually the ".0" version). |
boolean |
isCheckoutDir(java.io.File directory)
Returns true if the given directory contains a checkout of content from this ScmSystem. |
boolean |
isUpToDate(java.io.File checkoutDir)
Check whether the given checkout directory is up-to-date when comparing it to the repository contents. |
void |
setUrl(ScmUrl providerUrl)
Set the URL this ScmSystem instance should be talking with; is only invoked from within this package. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char REVISION_NAME_SEPARATOR
public static final char REVISION_VERSION_SEPARATOR
| Constructor Detail |
|---|
public CvsSystemImpl()
| Method Detail |
|---|
public java.lang.String getStandardOutput()
getStandardOutput in interface ScmSystempublic java.lang.String getErrorOutput()
getErrorOutput in interface ScmSystempublic ScmUrl getUrl()
ScmSystem
getUrl in interface ScmSystempublic void setUrl(ScmUrl providerUrl)
ScmSystem
setUrl in interface ScmSystemproviderUrl - The URL this ScmSystem instance should be connecting with
public void doAdd(java.io.File file,
boolean recursive)
ScmSystem
doAdd in interface ScmSystemfile - The file/directory to be addedrecursive - Whether to add any files under the directory recursively
public void doCheckout(java.lang.String moduleName,
java.io.File destDir,
ScmVersion version,
boolean reallyQuiet)
ScmSystem
doCheckout in interface ScmSystemmoduleName - The top-level module to be checked out from the SCM repositorydestDir - The destination directory for the locally checked out module contents, usually you set this to a directory with the name equal to the moduleNameversion - The module version you want to checkout.reallyQuiet - Whether console output should be suppressed
public void doExport(java.lang.String moduleName,
java.io.File destDir,
ScmVersion version,
boolean reallyQuiet)
doExport in interface ScmSystem
public void doCheckoutOrUpdate(java.lang.String packageName,
java.io.File destDir,
ScmVersion version,
boolean reallyQuiet)
ScmSystem
doCheckoutOrUpdate in interface ScmSystem
public void doMerge(java.io.File moduleDir,
ScmVersion version)
ScmSystem
doMerge in interface ScmSystemmoduleDir - The module directory which should receive the changes compared to the given versionversion - The version containing the changes to be merged into the locally checked module directory
public void doMerge(java.io.File moduleDir,
ScmVersion version,
boolean reallyQuiet)
public void doUpdate(java.io.File file,
ScmVersion version)
ScmSystem
doUpdate in interface ScmSystemfile - The directory or file to be updatedversion - If null, revision of checkout is not changed
public void doUpdate(java.lang.String packageName,
java.io.File file,
ScmVersion version,
boolean reallyQuiet)
public void doCommit(java.io.File file,
java.lang.String message)
doCommit in interface ScmSystemfile - public java.lang.String getRevisionNumber(java.io.File file)
getRevisionNumber in interface ScmSystempublic ScmVersion getLatestVersion(java.io.File moduleDir)
getLatestVersion in interface ScmSystem
public ScmVersion getLocalVersion(java.io.File moduleDir)
throws org.apache.tools.ant.BuildException
getLocalVersion in interface ScmSystemmoduleDir - The directory where the module is currently checked out
org.apache.tools.ant.BuildException
public ScmVersion[] getVersionsInBranch(java.io.File file,
ScmVersion branch)
getVersionsInBranch in interface ScmSystempublic boolean isUpToDate(java.io.File checkoutDir)
isUpToDate in interface ScmSystemcheckoutDir - The directory with locally checked out contents
public ScmDifference[] getDifferences(ScmVersion version1,
ScmVersion version2)
getDifferences in interface ScmSystemversion1 - The 'old' version to use as baseversion2 - The 'new' version, which should be compared against the 'old' version
public java.lang.String createBranchInTrunk(ScmVersion newBranchForModule)
createBranchInTrunk in interface ScmSystem
public java.lang.String createTagInBranch(ScmVersion existingBranch,
ScmVersion newTag)
createTagInBranch in interface ScmSystempublic boolean isCheckoutDir(java.io.File directory)
ScmSystem
isCheckoutDir in interface ScmSystemdirectory - The directory which does or does not contain a checkout
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||