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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubversionSCM.ModuleLocation.DescriptorImpl
-
Field Summary
Fields Modifier and Type Field Description boolean
cancelProcessOnExternalsFail
Flag to cancel the process when checkout/update svn:externals failed.String
credentialsId
The credentials to checkout with.String
depthOption
Subversion remote depth.boolean
ignoreExternalsOption
Flag to ignore subversion externals definitions.String
local
Deprecated.Code should usegetLocalDir()
.String
remote
Subversion URL to check out.
-
Constructor Summary
Constructors Constructor Description ModuleLocation(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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getDepthOption()
Returns the value of remote depth option.SubversionSCM.ModuleLocation
getExpandedLocation(EnvVars env)
Expand location value based on environment variables.SubversionSCM.ModuleLocation
getExpandedLocation(AbstractBuild<?,?> build)
Deprecated.UsegetExpandedLocation(EnvVars)
for vars expansion to be performed on all env vars rather than just build parameters.SubversionSCM.ModuleLocation
getExpandedLocation(Job<?,?> project)
If a subversion remote uses $VAR or ${VAR} as a parameterized build, we expand the url.String
getLocalDir()
Local directory to place the file to.org.tmatesoft.svn.core.SVNURL
getRepositoryRoot(AbstractProject context)
Deprecated.org.tmatesoft.svn.core.SVNURL
getRepositoryRoot(Job context, SCM scm)
org.tmatesoft.svn.core.wc.SVNRevision
getRevision(org.tmatesoft.svn.core.wc.SVNRevision defaultValue)
Figures out which revision to check out.org.tmatesoft.svn.core.SVNDepth
getSvnDepthForCheckout()
Returns the SVNDepth to use for checking out the module.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 everythingorg.tmatesoft.svn.core.SVNDepth
getSvnDepthForUpdate()
Returns the SVNDepth to use for updating the module.org.tmatesoft.svn.core.SVNURL
getSVNURL()
Getsremote
asSVNURL
.String
getURL()
Returns the pure URL portion ofremote
by removing possible "@NNN" suffix.UUID
getUUID(AbstractProject context)
Deprecated.UUID
getUUID(Job context, SCM scm)
Repository UUID.boolean
isCancelProcessOnExternalsFail()
Determines if the process should be cancelled when checkout/update svn:externals failed.boolean
isIgnoreExternalsOption()
Determines if subversion externals definitions should be ignored.org.tmatesoft.svn.core.io.SVNRepository
openRepository(AbstractProject context)
Deprecated.org.tmatesoft.svn.core.io.SVNRepository
openRepository(AbstractProject context, boolean keepConnection)
Deprecated.org.tmatesoft.svn.core.io.SVNRepository
openRepository(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)
String
toString()
SubversionSCM.ModuleLocation
withCancelProcessOnExternalsFailed(boolean cancelProcessOnExternalsFailed)
SubversionSCM.ModuleLocation
withCredentialsId(String credentialsId)
SubversionSCM.ModuleLocation
withDepthOption(String depthOption)
SubversionSCM.ModuleLocation
withIgnoreExternalsOption(boolean ignoreExternalsOption)
SubversionSCM.ModuleLocation
withLocal(String local)
SubversionSCM.ModuleLocation
withRemote(String remote)
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Field Detail
-
remote
@Exported public final String remote
Subversion URL to check out. This may include "@NNN" at the end to indicate a fixed revision.
-
credentialsId
public String credentialsId
The credentials to checkout with.
-
local
@Exported public final String local
Deprecated.Code should usegetLocalDir()
. This field is only intended for form binding.Remembers the user-given value. Can be null.
-
depthOption
@Exported public final String depthOption
Subversion remote depth. Used as "--depth" option for checkout and update commands. Default value is "infinity".
-
ignoreExternalsOption
@Exported public boolean ignoreExternalsOption
Flag to ignore subversion externals definitions.
-
cancelProcessOnExternalsFail
@Exported public boolean cancelProcessOnExternalsFail
Flag to cancel the process when checkout/update svn:externals failed.
-
-
Constructor Detail
-
ModuleLocation
@Deprecated public ModuleLocation(String remote, String local)
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.
-
-
Method Detail
-
withRemote
public SubversionSCM.ModuleLocation withRemote(String remote)
-
withCredentialsId
public SubversionSCM.ModuleLocation withCredentialsId(String credentialsId)
-
withLocal
public SubversionSCM.ModuleLocation withLocal(String local)
-
withDepthOption
public SubversionSCM.ModuleLocation withDepthOption(String depthOption)
-
withIgnoreExternalsOption
public SubversionSCM.ModuleLocation withIgnoreExternalsOption(boolean ignoreExternalsOption)
-
withCancelProcessOnExternalsFailed
public SubversionSCM.ModuleLocation withCancelProcessOnExternalsFailed(boolean cancelProcessOnExternalsFailed)
-
getLocalDir
public String getLocalDir()
Local directory to place the file to. Relative to the workspace root.
-
getURL
public String getURL()
Returns the pure URL portion ofremote
by removing possible "@NNN" suffix.
-
getSVNURL
public org.tmatesoft.svn.core.SVNURL getSVNURL() throws org.tmatesoft.svn.core.SVNException
Getsremote
asSVNURL
.- Throws:
org.tmatesoft.svn.core.SVNException
-
getUUID
public UUID getUUID(Job context, SCM scm) throws org.tmatesoft.svn.core.SVNException
Repository UUID. Lazy computed and cached.- Throws:
org.tmatesoft.svn.core.SVNException
-
getUUID
@Deprecated public UUID getUUID(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) 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. Ifremote
isurl@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
public String 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:
SVNDepth
value.
-
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:
SVNDepth
value.
-
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:
SVNDepth
value.
-
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
public SubversionSCM.ModuleLocation getExpandedLocation(AbstractBuild<?,?> build)
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
public SubversionSCM.ModuleLocation getExpandedLocation(EnvVars env)
Expand location value based on environment variables.- Returns:
- Output ModuleLocation expanded according to specified env vars.
-
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
public static List<SubversionSCM.ModuleLocation> parse(String[] remoteLocations, String[] credentialIds, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals, boolean[] cancelProcessOnExternalsFails)
-
getExpandedLocation
public SubversionSCM.ModuleLocation getExpandedLocation(Job<?,?> project)
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.
-
-