hudson.scm
クラス SubversionSCM

java.lang.Object
  上位を拡張 hudson.scm.SCM
      上位を拡張 hudson.scm.SubversionSCM
すべての実装されたインタフェース:
hudson.ExtensionPoint, hudson.model.Describable<hudson.scm.SCM>, java.io.Serializable

public class SubversionSCM
extends hudson.scm.SCM
implements java.io.Serializable

Subversion SCM.

Plugin Developer Notes

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.

Implementation Notes

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.

作成者:
Kohsuke Kawaguchi
関連項目:
直列化された形式

入れ子のクラスの概要
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
           
 
インタフェース hudson.ExtensionPoint から継承された入れ子のクラス/インタフェース
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
フィールドの概要
static int DEFAULT_TIMEOUT
          Network timeout in milliseconds.
 
クラス hudson.scm.SCM から継承されたフィールド
PERMISSIONS, TAG
 
コンストラクタの概要
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)
          推奨されていません。 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)
          推奨されていません。 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)
          推奨されていません。 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)
          推奨されていません。 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)
          推奨されていません。 as of 1.286
SubversionSCM(java.lang.String[] remoteLocations, java.lang.String[] localLocations, boolean useUpdate, SubversionRepositoryBrowser browser, java.lang.String excludedRegions)
          推奨されていません。 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)
          推奨されていません。 as of 1.315
SubversionSCM(java.lang.String svnUrl, java.lang.String local)
          Convenience constructor, especially during testing.
 
メソッドの概要
 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()
          推奨されていません。 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.
 
クラス hudson.scm.SCM から継承されたメソッド
_calcRevisionsFromBuild, _for, all, createEmptyChangeLog, getApi, getEffectiveBrowser, getType, nullify, poll, pollChanges, processWorkspaceBeforeDeletion, supportsPolling
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

DEFAULT_TIMEOUT

public static int DEFAULT_TIMEOUT
Network timeout in milliseconds. The main point of this is to prevent infinite hang, so it should be a rather long value to avoid accidental time out problem.

コンストラクタの詳細

SubversionSCM

public SubversionSCM(java.lang.String[] remoteLocations,
                     java.lang.String[] localLocations,
                     boolean useUpdate,
                     SubversionRepositoryBrowser browser)
推奨されていません。 as of 1.286


SubversionSCM

public SubversionSCM(java.lang.String[] remoteLocations,
                     java.lang.String[] localLocations,
                     boolean useUpdate,
                     SubversionRepositoryBrowser browser,
                     java.lang.String excludedRegions)
推奨されていません。 as of 1.311


SubversionSCM

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)
推奨されていません。 as of 1.315


SubversionSCM

public SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
                     boolean useUpdate,
                     SubversionRepositoryBrowser browser,
                     java.lang.String excludedRegions)
推奨されていません。 as of 1.315


SubversionSCM

public SubversionSCM(java.util.List<SubversionSCM.ModuleLocation> locations,
                     boolean useUpdate,
                     SubversionRepositoryBrowser browser,
                     java.lang.String excludedRegions,
                     java.lang.String excludedUsers,
                     java.lang.String excludedRevprop)
推奨されていません。 as of 1.324


SubversionSCM

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)
推奨されていません。 as of 1.328


SubversionSCM

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)
推奨されていません。 as of 1.xxx


SubversionSCM

@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)

SubversionSCM

public SubversionSCM(java.lang.String svnUrl)
Convenience constructor, especially during testing.


SubversionSCM

public SubversionSCM(java.lang.String svnUrl,
                     java.lang.String local)
Convenience constructor, especially during testing.

メソッドの詳細

getModules

public java.lang.String getModules()
推奨されていません。 as of 1.91. Use getLocations() instead.


getLocations

@Exported
public SubversionSCM.ModuleLocation[] getLocations()
list of all configured svn locations

導入されたバージョン:
1.91

getLocations

public SubversionSCM.ModuleLocation[] getLocations(hudson.model.AbstractBuild<?,?> build)
list of all configured svn locations, expanded according to build parameters values;

パラメータ:
build - If non-null, variable expansions are performed against the build parameters.
導入されたバージョン:
1.252

isUseUpdate

@Exported
public boolean isUseUpdate()

isDoRevert

@Exported
public boolean isDoRevert()

getBrowser

@Exported
public SubversionRepositoryBrowser getBrowser()
オーバーライド:
クラス hudson.scm.SCM 内の getBrowser

getExcludedRegions

@Exported
public java.lang.String getExcludedRegions()

getExcludedRegionsNormalized

public java.lang.String[] getExcludedRegionsNormalized()

getIncludedRegions

@Exported
public java.lang.String getIncludedRegions()

getIncludedRegionsNormalized

public java.lang.String[] getIncludedRegionsNormalized()

getExcludedUsers

@Exported
public java.lang.String getExcludedUsers()

getExcludedUsersNormalized

public java.util.Set<java.lang.String> getExcludedUsersNormalized()

getExcludedRevprop

@Exported
public java.lang.String getExcludedRevprop()

getExcludedCommitMessages

@Exported
public java.lang.String getExcludedCommitMessages()

getExcludedCommitMessagesNormalized

public java.lang.String[] getExcludedCommitMessagesNormalized()

buildEnvVars

public 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.SCM 内の buildEnvVars

requiresWorkspaceForPolling

public boolean requiresWorkspaceForPolling()
Polling can happen on the master and does not require a workspace.

オーバーライド:
クラス hudson.scm.SCM 内の requiresWorkspaceForPolling

checkout

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
定義:
クラス hudson.scm.SCM 内の checkout
例外:
java.io.IOException
java.lang.InterruptedException

createSvnClientManager

public static org.tmatesoft.svn.core.wc.SVNClientManager createSvnClientManager(org.tmatesoft.svn.core.auth.ISVNAuthenticationProvider authProvider)
Creates 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.)

createSvnClientManager

public static org.tmatesoft.svn.core.wc.SVNClientManager createSvnClientManager()
Creates 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.


getRevisionFile

public static java.io.File getRevisionFile(hudson.model.AbstractBuild build)
Gets the file that stores the revision.


calcRevisionsFromBuild

public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build,
                                                          hudson.Launcher launcher,
                                                          hudson.model.TaskListener listener)
                                                   throws java.io.IOException,
                                                          java.lang.InterruptedException
定義:
クラス hudson.scm.SCM 内の calcRevisionsFromBuild
例外:
java.io.IOException
java.lang.InterruptedException

compareRemoteRevisionWith

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
定義:
クラス hudson.scm.SCM 内の compareRemoteRevisionWith
例外:
java.io.IOException
java.lang.InterruptedException

createChangeLogParser

public hudson.scm.ChangeLogParser createChangeLogParser()
定義:
クラス hudson.scm.SCM 内の createChangeLogParser

getDescriptor

public SubversionSCM.DescriptorImpl getDescriptor()
定義:
インタフェース hudson.model.Describable<hudson.scm.SCM> 内の getDescriptor
オーバーライド:
クラス hudson.scm.SCM 内の getDescriptor

getModuleRoot

public hudson.FilePath getModuleRoot(hudson.FilePath workspace)
オーバーライド:
クラス hudson.scm.SCM 内の getModuleRoot

getModuleRoots

public hudson.FilePath[] getModuleRoots(hudson.FilePath workspace)
オーバーライド:
クラス hudson.scm.SCM 内の getModuleRoots

repositoryLocationsNoLongerExist

public boolean repositoryLocationsNoLongerExist(hudson.model.AbstractBuild<?,?> build,
                                                hudson.model.TaskListener listener)

init

public static void init()

enableSshDebug

public static void enableSshDebug(java.util.logging.Level level)
Enables trace logging of Ganymed SSH library.

Intended to be invoked from Groovy console.



Copyright © 2010. All Rights Reserved.