|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.scm.SCM
hudson.scm.SubversionSCM
public class SubversionSCM
Subversion SCM.
Plugins that interact with Subversion can use SubversionSCM.DescriptorImpl.createAuthenticationProvider()
so that it can use the credentials (username, password, etc.) that the user entered for Hudson.
See the javadoc of this method for the precautions you need to take if you run Subversion operations
remotely on slaves.
Because this instance refers to some other classes that are not necessarily
Java serializable (like browser), remotable FilePath.FileCallables all
need to be declared as static inner classes.
| Nested Class Summary | |
|---|---|
static class |
SubversionSCM.DescriptorImpl
|
static class |
SubversionSCM.ModuleLocation
small structure to store local and remote (repository) location information of the repository. |
static class |
SubversionSCM.SvnInfo
|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary | |
|---|---|
static int |
DEFAULT_TIMEOUT
Network timeout in milliseconds. |
| Fields inherited from class hudson.scm.SCM |
|---|
PERMISSIONS, TAG |
| Constructor Summary | |
|---|---|
SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop,
java.lang.String excludedCommitMessages)
Deprecated. as of 1.xxx |
|
SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop,
java.lang.String excludedCommitMessages,
java.lang.String includedRegions)
|
|
SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions)
Deprecated. as of 1.315 |
|
SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop)
Deprecated. as of 1.324 |
|
SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop,
java.lang.String excludedCommitMessages)
Deprecated. as of 1.328 |
|
SubversionSCM(java.lang.String svnUrl)
Convenience constructor, especially during testing. |
|
SubversionSCM(java.lang.String[] remoteLocations,
java.lang.String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser)
Deprecated. as of 1.286 |
|
SubversionSCM(java.lang.String[] remoteLocations,
java.lang.String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions)
Deprecated. as of 1.311 |
|
SubversionSCM(java.lang.String[] remoteLocations,
java.lang.String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop)
Deprecated. as of 1.315 |
|
SubversionSCM(java.lang.String svnUrl,
java.lang.String local)
Convenience constructor, especially during testing. |
|
| Method Summary | |
|---|---|
void |
buildEnvVars(hudson.model.AbstractBuild build,
java.util.Map<java.lang.String,java.lang.String> env)
Sets the SVN_REVISION environment variable during the build. |
hudson.scm.SCMRevisionState |
calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
|
boolean |
checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.BuildListener listener,
java.io.File changelogFile)
|
protected hudson.scm.PollingResult |
compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState _baseline)
|
hudson.scm.ChangeLogParser |
createChangeLogParser()
|
static org.tmatesoft.svn.core.wc.SVNClientManager |
createSvnClientManager()
Creates SVNClientManager for code running on the master. |
static org.tmatesoft.svn.core.wc.SVNClientManager |
createSvnClientManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
Creates SVNClientManager. |
static void |
enableSshDebug(java.util.logging.Level level)
Enables trace logging of Ganymed SSH library. |
SubversionRepositoryBrowser |
getBrowser()
|
SubversionSCM.DescriptorImpl |
getDescriptor()
|
java.lang.String |
getExcludedCommitMessages()
|
java.lang.String[] |
getExcludedCommitMessagesNormalized()
|
java.lang.String |
getExcludedRegions()
|
java.lang.String[] |
getExcludedRegionsNormalized()
|
java.lang.String |
getExcludedRevprop()
|
java.lang.String |
getExcludedUsers()
|
java.util.Set<java.lang.String> |
getExcludedUsersNormalized()
|
java.lang.String |
getIncludedRegions()
|
java.lang.String[] |
getIncludedRegionsNormalized()
|
SubversionSCM.ModuleLocation[] |
getLocations()
list of all configured svn locations |
SubversionSCM.ModuleLocation[] |
getLocations(hudson.model.AbstractBuild<?,?> build)
list of all configured svn locations, expanded according to build parameters values; |
hudson.FilePath |
getModuleRoot(hudson.FilePath workspace)
|
hudson.FilePath[] |
getModuleRoots(hudson.FilePath workspace)
|
java.lang.String |
getModules()
Deprecated. as of 1.91. Use getLocations() instead. |
static java.io.File |
getRevisionFile(hudson.model.AbstractBuild build)
Gets the file that stores the revision. |
static void |
init()
|
boolean |
isDoRevert()
|
boolean |
isUseUpdate()
|
boolean |
repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
|
boolean |
requiresWorkspaceForPolling()
Polling can happen on the master and does not require a workspace. |
| Methods inherited from class hudson.scm.SCM |
|---|
_for, all, createEmptyChangeLog, getApi, getEffectiveBrowser, getType, nullify, poll, pollChanges, processWorkspaceBeforeDeletion, supportsPolling |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int DEFAULT_TIMEOUT
| Constructor Detail |
|---|
public SubversionSCM(java.lang.String[] remoteLocations,
java.lang.String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser)
public SubversionSCM(java.lang.String[] remoteLocations,
java.lang.String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions)
public SubversionSCM(java.lang.String[] remoteLocations,
java.lang.String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop)
public SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions)
public SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop)
public SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop,
java.lang.String excludedCommitMessages)
public SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop,
java.lang.String excludedCommitMessages)
@DataBoundConstructor
public SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
java.lang.String excludedRegions,
java.lang.String excludedUsers,
java.lang.String excludedRevprop,
java.lang.String excludedCommitMessages,
java.lang.String includedRegions)
public SubversionSCM(java.lang.String svnUrl)
public SubversionSCM(java.lang.String svnUrl,
java.lang.String local)
| Method Detail |
|---|
public java.lang.String getModules()
getLocations() instead.
@Exported public SubversionSCM.ModuleLocation[] getLocations()
public SubversionSCM.ModuleLocation[] getLocations(hudson.model.AbstractBuild<?,?> build)
build - If non-null, variable expansions are performed against the build parameters.@Exported public boolean isUseUpdate()
@Exported public boolean isDoRevert()
@Exported public SubversionRepositoryBrowser getBrowser()
getBrowser in class hudson.scm.SCM@Exported public java.lang.String getExcludedRegions()
public java.lang.String[] getExcludedRegionsNormalized()
@Exported public java.lang.String getIncludedRegions()
public java.lang.String[] getIncludedRegionsNormalized()
@Exported public java.lang.String getExcludedUsers()
public java.util.Set<java.lang.String> getExcludedUsersNormalized()
@Exported public java.lang.String getExcludedRevprop()
@Exported public java.lang.String getExcludedCommitMessages()
public java.lang.String[] getExcludedCommitMessagesNormalized()
public void buildEnvVars(hudson.model.AbstractBuild build,
java.util.Map<java.lang.String,java.lang.String> env)
buildEnvVars in class hudson.scm.SCMpublic boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling in class hudson.scm.SCM
public boolean checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.BuildListener listener,
java.io.File changelogFile)
throws java.io.IOException,
java.lang.InterruptedException
checkout in class hudson.scm.SCMjava.io.IOException
java.lang.InterruptedExceptionpublic static org.tmatesoft.svn.core.wc.SVNClientManager createSvnClientManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
SVNClientManager.
This method must be executed on the slave where svn operations are performed.
authProvider - The value obtained from SubversionSCM.DescriptorImpl.createAuthenticationProvider().
If the operation runs on slaves,
(and properly remoted, if the svn operations run on slaves.)public static org.tmatesoft.svn.core.wc.SVNClientManager createSvnClientManager()
SVNClientManager for code running on the master.
CAUTION: this code only works when invoked on master. On slaves, use
createSvnClientManager(ISVNAuthenticationProvider) and get ISVNAuthenticationProvider
from the master via remoting.
public static java.io.File getRevisionFile(hudson.model.AbstractBuild build)
public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws java.io.IOException,
java.lang.InterruptedException
calcRevisionsFromBuild in class hudson.scm.SCMjava.io.IOException
java.lang.InterruptedException
protected hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState _baseline)
throws java.io.IOException,
java.lang.InterruptedException
compareRemoteRevisionWith in class hudson.scm.SCMjava.io.IOException
java.lang.InterruptedExceptionpublic hudson.scm.ChangeLogParser createChangeLogParser()
createChangeLogParser in class hudson.scm.SCMpublic SubversionSCM.DescriptorImpl getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.scm.SCM>getDescriptor in class hudson.scm.SCMpublic hudson.FilePath getModuleRoot(hudson.FilePath workspace)
getModuleRoot in class hudson.scm.SCMpublic hudson.FilePath[] getModuleRoots(hudson.FilePath workspace)
getModuleRoots in class hudson.scm.SCM
public boolean repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
public static void init()
public static void enableSshDebug(java.util.logging.Level level)
Intended to be invoked from Groovy console.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||