|
||||||||||
| 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(AbstractProject)
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.External
Information about svn:external |
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 String |
CONFIG_DIR
If set to non-null, read configuration from this directory instead of "~/.subversion". |
static int |
DEFAULT_TIMEOUT
Network timeout in milliseconds. |
| Fields inherited from class hudson.scm.SCM |
|---|
PERMISSIONS, TAG |
| Constructor Summary | |
|---|---|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages)
Deprecated. as of 1.xxx |
|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions)
Deprecated. as of 1.23 |
|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions)
Deprecated. as of 1.315 |
|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop)
Deprecated. as of 1.324 |
|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages)
Deprecated. as of 1.328 |
|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
WorkspaceUpdater workspaceUpdater,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions)
Deprecated. as of ... |
|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
WorkspaceUpdater workspaceUpdater,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions,
boolean ignoreDirPropChanges)
Deprecated. |
|
SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
WorkspaceUpdater workspaceUpdater,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions,
boolean ignoreDirPropChanges,
boolean filterChangelog)
|
|
SubversionSCM(String svnUrl)
Convenience constructor, especially during testing. |
|
SubversionSCM(String[] svnUrls,
String[] locals)
Convenience constructor, especially during testing. |
|
SubversionSCM(String[] remoteLocations,
String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser)
Deprecated. as of 1.286 |
|
SubversionSCM(String[] remoteLocations,
String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions)
Deprecated. as of 1.311 |
|
SubversionSCM(String[] remoteLocations,
String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop)
Deprecated. as of 1.315 |
|
SubversionSCM(String svnUrl,
String local)
Convenience constructor, especially during testing. |
|
| Method Summary | |
|---|---|
void |
buildEnvVars(hudson.model.AbstractBuild<?,?> build,
Map<String,String> env)
Sets the SVN_REVISION_n and SVN_URL_n environment variables 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,
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 SvnClientManager |
createClientManager(hudson.model.AbstractProject context)
Creates SVNClientManager for code running on the master. |
static SvnClientManager |
createClientManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
Creates SVNClientManager. |
static org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions |
createDefaultSVNOptions()
Creates the DefaultSVNOptions. |
static org.tmatesoft.svn.core.auth.ISVNAuthenticationManager |
createSvnAuthenticationManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
|
static org.tmatesoft.svn.core.wc.SVNClientManager |
createSvnClientManager(hudson.model.AbstractProject context)
Deprecated. as of 2.0 Use createClientManager(AbstractProject) |
static org.tmatesoft.svn.core.wc.SVNClientManager |
createSvnClientManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
Deprecated. as of 1.40 Use createClientManager(ISVNAuthenticationProvider) |
SVNLogFilter |
createSVNLogFilter()
|
static void |
enableSshDebug(Level level)
Enables trace logging of Ganymed SSH library. |
SubversionRepositoryBrowser |
getBrowser()
|
SubversionSCM.DescriptorImpl |
getDescriptor()
|
String |
getExcludedCommitMessages()
|
String[] |
getExcludedCommitMessagesNormalized()
|
String |
getExcludedRegions()
|
String[] |
getExcludedRegionsNormalized()
|
String |
getExcludedRevprop()
|
String |
getExcludedUsers()
|
Set<String> |
getExcludedUsersNormalized()
|
String |
getIncludedRegions()
|
String[] |
getIncludedRegionsNormalized()
|
SubversionSCM.ModuleLocation[] |
getLocations()
list of all configured svn locations |
SubversionSCM.ModuleLocation[] |
getLocations(hudson.model.AbstractBuild<?,?> build)
Deprecated. Use getLocations(EnvVars, AbstractBuild) for vars
expansion to be performed on all env vars rather than just
build parameters. |
SubversionSCM.ModuleLocation[] |
getLocations(hudson.EnvVars env,
hudson.model.AbstractBuild<?,?> build)
List of all configured svn locations, expanded according to all env vars or, if none defined, according to only build parameters values. |
hudson.FilePath |
getModuleRoot(hudson.FilePath workspace)
Deprecated. |
hudson.FilePath |
getModuleRoot(hudson.FilePath workspace,
hudson.model.AbstractBuild build)
|
hudson.FilePath[] |
getModuleRoots(hudson.FilePath workspace)
Deprecated. |
hudson.FilePath[] |
getModuleRoots(hudson.FilePath workspace,
hudson.model.AbstractBuild build)
|
String |
getModules()
Deprecated. as of 1.91. Use getLocations() instead. |
SubversionSCM.ModuleLocation[] |
getProjectLocations(hudson.model.AbstractProject project)
Get the list of every checked-out location. |
static File |
getRevisionFile(hudson.model.AbstractBuild build)
Gets the file that stores the revision. |
WorkspaceUpdater |
getWorkspaceUpdater()
|
static void |
init()
|
boolean |
isFilterChangelog()
|
boolean |
isIgnoreDirPropChanges()
|
boolean |
repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
Deprecated. 1.34 |
boolean |
repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener,
hudson.EnvVars env)
|
boolean |
requiresWorkspaceForPolling()
Polling can happen on the master and does not require a workspace. |
void |
setWorkspaceUpdater(WorkspaceUpdater workspaceUpdater)
|
| Methods inherited from class hudson.scm.SCM |
|---|
_calcRevisionsFromBuild, _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
public static String CONFIG_DIR
| Constructor Detail |
|---|
public SubversionSCM(String[] remoteLocations,
String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser)
public SubversionSCM(String[] remoteLocations,
String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions)
public SubversionSCM(String[] remoteLocations,
String[] localLocations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop)
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions)
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop)
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages)
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages)
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
boolean useUpdate,
boolean doRevert,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions)
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
WorkspaceUpdater workspaceUpdater,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions)
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
WorkspaceUpdater workspaceUpdater,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions,
boolean ignoreDirPropChanges)
@DataBoundConstructor
public SubversionSCM(List<SubversionSCM.ModuleLocation> locations,
WorkspaceUpdater workspaceUpdater,
SubversionRepositoryBrowser browser,
String excludedRegions,
String excludedUsers,
String excludedRevprop,
String excludedCommitMessages,
String includedRegions,
boolean ignoreDirPropChanges,
boolean filterChangelog)
public SubversionSCM(String svnUrl)
public SubversionSCM(String svnUrl,
String local)
public SubversionSCM(String[] svnUrls,
String[] locals)
| Method Detail |
|---|
public String getModules()
getLocations() instead.
@Exported public SubversionSCM.ModuleLocation[] getLocations()
@Exported public WorkspaceUpdater getWorkspaceUpdater()
public void setWorkspaceUpdater(WorkspaceUpdater workspaceUpdater)
public SubversionSCM.ModuleLocation[] getLocations(hudson.model.AbstractBuild<?,?> build)
getLocations(EnvVars, AbstractBuild) for vars
expansion to be performed on all env vars rather than just
build parameters.
public SubversionSCM.ModuleLocation[] getLocations(hudson.EnvVars env,
hudson.model.AbstractBuild<?,?> build)
env - If non-null, variable expansions are performed against these varsbuild - If non-null (and if env is null), variable expansions are
performed against the build parameters
public SubversionSCM.ModuleLocation[] getProjectLocations(hudson.model.AbstractProject project)
throws IOException
getLocations()
which returns only the configured locations whereas this method returns the configured
locations + any svn:externals locations.
IOException@Exported public SubversionRepositoryBrowser getBrowser()
getBrowser in class hudson.scm.SCM@Exported public String getExcludedRegions()
public String[] getExcludedRegionsNormalized()
@Exported public String getIncludedRegions()
public String[] getIncludedRegionsNormalized()
@Exported public String getExcludedUsers()
public Set<String> getExcludedUsersNormalized()
@Exported public String getExcludedRevprop()
@Exported public String getExcludedCommitMessages()
public String[] getExcludedCommitMessagesNormalized()
@Exported public boolean isIgnoreDirPropChanges()
@Exported public boolean isFilterChangelog()
public void buildEnvVars(hudson.model.AbstractBuild<?,?> build,
Map<String,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,
File changelogFile)
throws IOException,
InterruptedException
checkout in class hudson.scm.SCMIOException
InterruptedExceptionpublic static org.tmatesoft.svn.core.wc.SVNClientManager createSvnClientManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
createClientManager(ISVNAuthenticationProvider)
public static SvnClientManager createClientManager(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(AbstractProject).
If the operation runs on slaves,
(and properly remoted, if the svn operations run on slaves.)public static org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions createDefaultSVNOptions()
DefaultSVNOptions.
DefaultSVNOptions.public static org.tmatesoft.svn.core.auth.ISVNAuthenticationManager createSvnAuthenticationManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
public static org.tmatesoft.svn.core.wc.SVNClientManager createSvnClientManager(hudson.model.AbstractProject context)
createClientManager(AbstractProject)
public static SvnClientManager createClientManager(hudson.model.AbstractProject context)
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 File getRevisionFile(hudson.model.AbstractBuild build)
public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
calcRevisionsFromBuild in class hudson.scm.SCMIOException
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 IOException,
InterruptedException
compareRemoteRevisionWith in class hudson.scm.SCMIOException
InterruptedExceptionpublic SVNLogFilter createSVNLogFilter()
public 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.SCM@Deprecated public hudson.FilePath getModuleRoot(hudson.FilePath workspace)
getModuleRoot in class hudson.scm.SCM
public hudson.FilePath getModuleRoot(hudson.FilePath workspace,
hudson.model.AbstractBuild build)
getModuleRoot in class hudson.scm.SCM@Deprecated public hudson.FilePath[] getModuleRoots(hudson.FilePath workspace)
getModuleRoots in class hudson.scm.SCM
public hudson.FilePath[] getModuleRoots(hudson.FilePath workspace,
hudson.model.AbstractBuild build)
getModuleRoots in class hudson.scm.SCM
public boolean repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
public boolean repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener,
hudson.EnvVars env)
public static void init()
public static void enableSshDebug(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 | |||||||||