Package hudson.scm

Class SubversionSCM.ModuleLocation

    • 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 use getLocalDir(). 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.
      • ModuleLocation

        @DataBoundConstructor
        public ModuleLocation​(String remote,
                              String credentialsId,
                              String local,
                              String depthOption,
                              boolean ignoreExternalsOption,
                              boolean cancelProcessOnExternalsFail)
    • Method Detail

      • 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 of remote by removing possible "@NNN" suffix.
      • getSVNURL

        public org.tmatesoft.svn.core.SVNURL getSVNURL()
                                                throws org.tmatesoft.svn.core.SVNException
        Gets remote as SVNURL.
        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. If remote is url@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.
        Use getExpandedLocation(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.
      • 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.