Package hudson.scm
Class SubversionSCM.ModuleLocation
java.lang.Object
hudson.model.AbstractDescribableImpl<SubversionSCM.ModuleLocation>
hudson.scm.SubversionSCM.ModuleLocation
- All Implemented Interfaces:
Describable<SubversionSCM.ModuleLocation>,Serializable
- Enclosing class:
- SubversionSCM
@ExportedBean
public static final class SubversionSCM.ModuleLocation
extends AbstractDescribableImpl<SubversionSCM.ModuleLocation>
implements Serializable
small structure to store local and remote (repository) location
information of the repository. As a addition it holds the invalid field
to make failure messages when doing a checkout possible
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanFlag to cancel the process when checkout/update svn:externals failed.The credentials to checkout with.final StringSubversion remote depth.booleanFlag to ignore subversion externals definitions.final StringDeprecated.final StringSubversion URL to check out. -
Constructor Summary
ConstructorsConstructorDescriptionModuleLocation(String remote, String local) Deprecated.ModuleLocation(String remote, String local, String depthOption, boolean ignoreExternalsOption) Deprecated.ModuleLocation(String remote, String credentialsId, String local, String depthOption, boolean ignoreExternalsOption) Deprecated.ModuleLocation(String remote, String credentialsId, String local, String depthOption, boolean ignoreExternalsOption, boolean cancelProcessOnExternalsFail) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of remote depth option.Expand location value based on environment variables.getExpandedLocation(AbstractBuild<?, ?> build) Deprecated.UsegetExpandedLocation(EnvVars)for vars expansion to be performed on all env vars rather than just build parameters.getExpandedLocation(Job<?, ?> project) If a subversion remote uses $VAR or ${VAR} as a parameterized build, we expand the url.Local directory to place the file to.org.tmatesoft.svn.core.SVNURLgetRepositoryRoot(AbstractProject context) Deprecated.org.tmatesoft.svn.core.SVNURLgetRepositoryRoot(Job context, SCM scm) org.tmatesoft.svn.core.wc.SVNRevisiongetRevision(org.tmatesoft.svn.core.wc.SVNRevision defaultValue) Figures out which revision to check out.org.tmatesoft.svn.core.SVNDepthReturns the SVNDepth to use for checking out the module.org.tmatesoft.svn.core.SVNDepthReturns the SVNDepth to use for reverting the module if svn up with revert before is selected This is normally the requested SVN depth except when the user has requested as-it-is and then we use infinity to actually revert everythingorg.tmatesoft.svn.core.SVNDepthReturns the SVNDepth to use for updating the module.org.tmatesoft.svn.core.SVNURLGetsremoteasSVNURL.getURL()Returns the pure URL portion ofremoteby removing possible "@NNN" suffix.getUUID(AbstractProject context) Deprecated.Repository UUID.booleanDetermines if the process should be cancelled when checkout/update svn:externals failed.booleanDetermines if subversion externals definitions should be ignored.org.tmatesoft.svn.core.io.SVNRepositoryopenRepository(AbstractProject context) Deprecated.org.tmatesoft.svn.core.io.SVNRepositoryopenRepository(AbstractProject context, boolean keepConnection) Deprecated.org.tmatesoft.svn.core.io.SVNRepositoryopenRepository(Job context, SCM scm, boolean keepConnection) static List<SubversionSCM.ModuleLocation>parse(String[] remoteLocations, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals) Deprecated.static List<SubversionSCM.ModuleLocation>parse(String[] remoteLocations, String[] credentialIds, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals) Deprecated.static List<SubversionSCM.ModuleLocation>parse(String[] remoteLocations, String[] credentialIds, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals, boolean[] cancelProcessOnExternalsFails) toString()withCancelProcessOnExternalsFailed(boolean cancelProcessOnExternalsFailed) withCredentialsId(String credentialsId) withDepthOption(String depthOption) withIgnoreExternalsOption(boolean ignoreExternalsOption) withRemote(String remote) Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
remote
Subversion URL to check out. This may include "@NNN" at the end to indicate a fixed revision. -
credentialsId
The credentials to checkout with. -
local
Deprecated.Code should usegetLocalDir(). This field is only intended for form binding.Remembers the user-given value. Can be null. -
depthOption
Subversion remote depth. Used as "--depth" option for checkout and update commands. Default value is "infinity". -
ignoreExternalsOption
@Exported public boolean ignoreExternalsOptionFlag to ignore subversion externals definitions. -
cancelProcessOnExternalsFail
@Exported public boolean cancelProcessOnExternalsFailFlag to cancel the process when checkout/update svn:externals failed.
-
-
Constructor Details
-
ModuleLocation
Deprecated.Constructor to support backwards compatibility. -
ModuleLocation
@Deprecated public ModuleLocation(String remote, String local, String depthOption, boolean ignoreExternalsOption) Deprecated.Constructor to support backwards compatibility. -
ModuleLocation
@Deprecated public ModuleLocation(String remote, String credentialsId, String local, String depthOption, boolean ignoreExternalsOption) Deprecated.Constructor to support backwards compatibility. -
ModuleLocation
-
-
Method Details
-
withRemote
-
withCredentialsId
-
withLocal
-
withDepthOption
-
withIgnoreExternalsOption
-
withCancelProcessOnExternalsFailed
public SubversionSCM.ModuleLocation withCancelProcessOnExternalsFailed(boolean cancelProcessOnExternalsFailed) -
getLocalDir
Local directory to place the file to. Relative to the workspace root. -
getURL
Returns the pure URL portion ofremoteby removing possible "@NNN" suffix. -
getSVNURL
public org.tmatesoft.svn.core.SVNURL getSVNURL() throws org.tmatesoft.svn.core.SVNExceptionGetsremoteasSVNURL.- Throws:
org.tmatesoft.svn.core.SVNException
-
getUUID
Repository UUID. Lazy computed and cached.- Throws:
org.tmatesoft.svn.core.SVNException
-
getUUID
Deprecated.- Throws:
org.tmatesoft.svn.core.SVNException
-
openRepository
@Deprecated public org.tmatesoft.svn.core.io.SVNRepository openRepository(AbstractProject context) throws org.tmatesoft.svn.core.SVNException Deprecated.- Throws:
org.tmatesoft.svn.core.SVNException
-
openRepository
@Deprecated public org.tmatesoft.svn.core.io.SVNRepository openRepository(AbstractProject context, boolean keepConnection) throws org.tmatesoft.svn.core.SVNException Deprecated.- Throws:
org.tmatesoft.svn.core.SVNException
-
openRepository
public org.tmatesoft.svn.core.io.SVNRepository openRepository(Job context, SCM scm, boolean keepConnection) throws org.tmatesoft.svn.core.SVNException - Throws:
org.tmatesoft.svn.core.SVNException
-
getRepositoryRoot
@Deprecated public org.tmatesoft.svn.core.SVNURL getRepositoryRoot(AbstractProject context) throws org.tmatesoft.svn.core.SVNException Deprecated.- Throws:
org.tmatesoft.svn.core.SVNException
-
getRepositoryRoot
@NonNull public org.tmatesoft.svn.core.SVNURL getRepositoryRoot(Job context, SCM scm) throws org.tmatesoft.svn.core.SVNException - Throws:
org.tmatesoft.svn.core.SVNException
-
getRevision
public org.tmatesoft.svn.core.wc.SVNRevision getRevision(org.tmatesoft.svn.core.wc.SVNRevision defaultValue) Figures out which revision to check out. Ifremoteisurl@rev, then this method returns that specific revision.- Parameters:
defaultValue- If "@NNN" portion is not in the URL, this value will be returned. Normally, this is the SVN revision timestamped at the build date.
-
getDepthOption
Returns the value of remote depth option.- Returns:
- the value of remote depth option.
-
getSvnDepthForUpdate
public org.tmatesoft.svn.core.SVNDepth getSvnDepthForUpdate()Returns the SVNDepth to use for updating the module. This is just mapping the depthOption to an SVN Depth- Returns:
SVNDepthvalue.
-
getSvnDepthForCheckout
public org.tmatesoft.svn.core.SVNDepth getSvnDepthForCheckout()Returns the SVNDepth to use for checking out the module. This is normally the requested SVN depth except when the user has requested as-it-is and then we use files so that we don't check everything out.- Returns:
SVNDepthvalue.
-
getSvnDepthForRevert
public org.tmatesoft.svn.core.SVNDepth getSvnDepthForRevert()Returns the SVNDepth to use for reverting the module if svn up with revert before is selected This is normally the requested SVN depth except when the user has requested as-it-is and then we use infinity to actually revert everything- Returns:
SVNDepthvalue.
-
isIgnoreExternalsOption
public boolean isIgnoreExternalsOption()Determines if subversion externals definitions should be ignored.- Returns:
- true if subversion externals definitions should be ignored.
-
isCancelProcessOnExternalsFail
public boolean isCancelProcessOnExternalsFail()Determines if the process should be cancelled when checkout/update svn:externals failed.- Returns:
- true if the process should be cancelled when checkout/update svn:externals failed.
-
getExpandedLocation
Deprecated.UsegetExpandedLocation(EnvVars)for vars expansion to be performed on all env vars rather than just build parameters.Expand location value based on Build parametric execution.- Parameters:
build- Build instance for expanding parameters into their values- Returns:
- Output ModuleLocation expanded according to Build parameters values.
-
getExpandedLocation
Expand location value based on environment variables.- Returns:
- Output ModuleLocation expanded according to specified env vars.
-
toString
-
parse
@Deprecated public static List<SubversionSCM.ModuleLocation> parse(String[] remoteLocations, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals) Deprecated. -
parse
@Deprecated public static List<SubversionSCM.ModuleLocation> parse(String[] remoteLocations, String[] credentialIds, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals) Deprecated. -
parse
-
getExpandedLocation
If a subversion remote uses $VAR or ${VAR} as a parameterized build, we expand the url. This will expand using the DEFAULT item. If there is a choice parameter, it will expand with the FIRST item.
-
getLocalDir().