diff --git a/src/main/java/hudson/scm/SubversionSCM.java b/src/main/java/hudson/scm/SubversionSCM.java index c01c72297..c2d1e7558 100755 --- a/src/main/java/hudson/scm/SubversionSCM.java +++ b/src/main/java/hudson/scm/SubversionSCM.java @@ -2669,6 +2669,13 @@ public static final class ModuleLocation extends AbstractDescribableImpl build) { */ public ModuleLocation getExpandedLocation(EnvVars env) { return new ModuleLocation(env.expand(remote), credentialsId, env.expand(getLocalDir()), getDepthOption(), - isIgnoreExternalsOption()); + isDepthSticky(), isIgnoreExternalsOption()); } @Override @@ -2955,7 +2977,7 @@ public static List parse(String[] remoteLocations, String[] cred modules.add(new ModuleLocation(remoteLoc, credentialIds != null && credentialIds.length > i ? credentialIds[i] : null, Util.nullify(localLocations[i]), - depthOptions != null ? depthOptions[i] : null, + depthOptions != null ? depthOptions[i] : null, true, isIgnoreExternals != null && isIgnoreExternals[i])); } } @@ -2990,7 +3012,8 @@ public ModuleLocation getExpandedLocation(Job project) { } } - return new ModuleLocation(returnURL, credentialsId, getLocalDir(), getDepthOption(), isIgnoreExternalsOption()); + return new ModuleLocation(returnURL, credentialsId, getLocalDir(), getDepthOption(), + isDepthSticky(), isIgnoreExternalsOption()); } @Extension diff --git a/src/main/java/hudson/scm/subversion/UpdateUpdater.java b/src/main/java/hudson/scm/subversion/UpdateUpdater.java index 0685e6ce9..c4f891b0b 100755 --- a/src/main/java/hudson/scm/subversion/UpdateUpdater.java +++ b/src/main/java/hudson/scm/subversion/UpdateUpdater.java @@ -155,11 +155,11 @@ public List perform() throws IOException, InterruptedException { switch (svnCommand) { case UPDATE: listener.getLogger().println("Updating " + location.remote + " at revision " + revisionName); - svnuc.doUpdate(local.getCanonicalFile(), r, svnDepth, true, true); + svnuc.doUpdate(local.getCanonicalFile(), r, svnDepth, true, location.isDepthSticky()); break; case SWITCH: listener.getLogger().println("Switching to " + location.remote + " at revision " + revisionName); - svnuc.doSwitch(local.getCanonicalFile(), location.getSVNURL(), r, r, svnDepth, true, true, true); + svnuc.doSwitch(local.getCanonicalFile(), location.getSVNURL(), r, r, svnDepth, true, location.isDepthSticky(), true); break; case CHECKOUT: // This case is handled by the (svnCommand == SvnCommandToUse.CHECKOUT) above. diff --git a/src/main/resources/hudson/scm/SubversionSCM/ModuleLocation/config.jelly b/src/main/resources/hudson/scm/SubversionSCM/ModuleLocation/config.jelly index 8a32abcf1..48be45241 100644 --- a/src/main/resources/hudson/scm/SubversionSCM/ModuleLocation/config.jelly +++ b/src/main/resources/hudson/scm/SubversionSCM/ModuleLocation/config.jelly @@ -51,6 +51,9 @@ THE SOFTWARE. as-it-is + + + diff --git a/src/main/resources/hudson/scm/SubversionSCM/ModuleLocation/help-stickyDepth.html b/src/main/resources/hudson/scm/SubversionSCM/ModuleLocation/help-stickyDepth.html new file mode 100644 index 000000000..f382f783d --- /dev/null +++ b/src/main/resources/hudson/scm/SubversionSCM/ModuleLocation/help-stickyDepth.html @@ -0,0 +1,5 @@ +
+ Choose if --set-depth (sticky) or --depth (non-sticky) option should be used for switch and update commands. Default value is sticky. + More information can be found + here. +