public class SubversionSCM extends hudson.scm.SCM implements Serializable
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
SubversionSCM.AdditionalCredentials |
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 |
| Modifier and Type | Field and Description |
|---|---|
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.
|
| Constructor and Description |
|---|
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,
List<SubversionSCM.AdditionalCredentials> additionalCredentials) |
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[] svnUrls,
String[] credentialIds,
String[] locals)
Convenience constructor, especially during testing.
|
SubversionSCM(String svnUrl,
String local)
Convenience constructor, especially during testing.
|
SubversionSCM(String svnUrl,
String credentialId,
String local)
Convenience constructor, especially during testing.
|
| Modifier and Type | Method and Description |
|---|---|
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.Run<?,?> build,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
void |
checkout(hudson.model.Run build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
File changelogFile,
hudson.scm.SCMRevisionState baseline) |
hudson.scm.PollingResult |
compareRemoteRevisionWith(hudson.model.Job<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState _baseline) |
org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider |
createAuthenticationProvider(hudson.model.Job<?,?> inContextOf,
SubversionSCM.ModuleLocation location)
Creates
ISVNAuthenticationProvider. |
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.
|
List<SubversionSCM.AdditionalCredentials> |
getAdditionalCredentials() |
SubversionRepositoryBrowser |
getBrowser() |
SubversionSCM.DescriptorImpl |
getDescriptor() |
String |
getExcludedCommitMessages() |
String[] |
getExcludedCommitMessagesNormalized() |
String |
getExcludedRegions() |
String[] |
getExcludedRegionsNormalized() |
String |
getExcludedRevprop() |
String |
getExcludedUsers() |
Set<String> |
getExcludedUsersNormalized() |
String |
getIncludedRegions() |
String[] |
getIncludedRegionsNormalized() |
String |
getKey() |
SubversionSCM.ModuleLocation[] |
getLocations()
list of all configured svn locations
|
SubversionSCM.ModuleLocation[] |
getLocations(hudson.model.AbstractBuild<?,?> build)
Deprecated.
Use
getLocations(EnvVars, Run) for vars
expansion to be performed on all env vars rather than just
build parameters. |
SubversionSCM.ModuleLocation[] |
getLocations(hudson.EnvVars env,
hudson.model.Run<?,?> 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.Job project)
Get the list of every checked-out location.
|
static File |
getRevisionFile(hudson.model.AbstractBuild build)
Deprecated.
use
getRevisionFile(hudson.model.Run) instead.
Gets the file that stores the revision. |
static File |
getRevisionFile(hudson.model.Run build)
Gets the file that stores the revision.
|
WorkspaceUpdater |
getWorkspaceUpdater() |
static void |
init() |
boolean |
isFilterChangelog() |
boolean |
isIgnoreDirPropChanges() |
static void |
perJobCredentialsMigration() |
boolean |
repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
Deprecated.
1.34
|
boolean |
repositoryLocationsNoLongerExist(hudson.model.Run<?,?> 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) |
_calcRevisionsFromBuild, _for, _for, all, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getEffectiveBrowser, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion, supportsPollingpublic static int DEFAULT_TIMEOUT
public static String CONFIG_DIR
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, List<SubversionSCM.AdditionalCredentials> additionalCredentials)
public SubversionSCM(String svnUrl)
public SubversionSCM(String svnUrl, String local)
public SubversionSCM(String svnUrl, String credentialId, String local)
public SubversionSCM(String[] svnUrls, String[] locals)
public String getModules()
getLocations() instead.@Exported public SubversionSCM.ModuleLocation[] getLocations()
public String getKey()
getKey in class hudson.scm.SCMpublic List<SubversionSCM.AdditionalCredentials> getAdditionalCredentials()
@Exported public WorkspaceUpdater getWorkspaceUpdater()
public void setWorkspaceUpdater(WorkspaceUpdater workspaceUpdater)
public SubversionSCM.ModuleLocation[] getLocations(hudson.model.AbstractBuild<?,?> build)
getLocations(EnvVars, Run) for vars
expansion to be performed on all env vars rather than just
build parameters.public SubversionSCM.ModuleLocation[] getLocations(hudson.EnvVars env, hudson.model.Run<?,?> build)
env - If non-null, variable expansions are performed against these varsbuild - If non-null, variable expansions are
performed against the build parameterspublic SubversionSCM.ModuleLocation[] getProjectLocations(hudson.model.Job 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()
@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.SCMpublic void checkout(hudson.model.Run build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
File changelogFile,
hudson.scm.SCMRevisionState baseline)
throws IOException,
InterruptedException
checkout in class hudson.scm.SCMIOExceptionInterruptedExceptionpublic 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 createAuthenticationProvider(Job,ModuleLocation).
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 org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider createAuthenticationProvider(hudson.model.Job<?,?> inContextOf,
SubversionSCM.ModuleLocation location)
ISVNAuthenticationProvider.
This method must be invoked on the master, but the returned object is remotable.
Therefore, to access ISVNAuthenticationProvider, you need to call this method
on the master, then pass the object to the slave side, then call
createSvnClientManager(ISVNAuthenticationProvider) on the slave.
public static File getRevisionFile(hudson.model.Run build)
@Deprecated public static File getRevisionFile(hudson.model.AbstractBuild build)
getRevisionFile(hudson.model.Run) instead.
Gets the file that stores the revision.public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.Run<?,?> build,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
throws IOException,
InterruptedException
calcRevisionsFromBuild in class hudson.scm.SCMIOExceptionInterruptedExceptionpublic hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.Job<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState _baseline)
throws IOException,
InterruptedException
compareRemoteRevisionWith in class hudson.scm.SCMIOExceptionInterruptedExceptionpublic 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.SCMpublic 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.SCMpublic hudson.FilePath[] getModuleRoots(hudson.FilePath workspace,
hudson.model.AbstractBuild build)
getModuleRoots in class hudson.scm.SCM@Initializer(after=JOB_LOADED,
before=COMPLETED)
public static void perJobCredentialsMigration()
public boolean repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
hudson.model.TaskListener listener)
public boolean repositoryLocationsNoLongerExist(hudson.model.Run<?,?> 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.
Copyright © 2004–2015. All rights reserved.