Skip to content
Permalink
Browse files

[FIXED JENKINS-13624] Allow checkout of submodules

  • Loading branch information...
mc1arke committed Jun 4, 2012
1 parent 64d4473 commit de148b371160423c943a719219204e09ae5718d3
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/main/java/hudson/scm/CVSSCM.java
@@ -708,9 +708,14 @@ public boolean checkout(final AbstractBuild<?, ?> build, final Launcher launcher

for (CvsModule cvsModule : item.getModules()) {

final FilePath targetWorkspace = flatten ? workspace.getParent() : workspace;
boolean localSubModule = cvsModule.getCheckoutName().contains("/");
int lastSlash = cvsModule.getCheckoutName().lastIndexOf("/");

final String moduleName= flatten ? workspace.getName() : cvsModule.getCheckoutName();
final FilePath targetWorkspace = flatten ? workspace.getParent() :
localSubModule ? workspace.child(cvsModule.getCheckoutName().substring(0, lastSlash)) : workspace;

final String moduleName = flatten ? workspace.getName() :
localSubModule ? cvsModule.getCheckoutName().substring(lastSlash + 1) : cvsModule.getCheckoutName();

final FilePath module = targetWorkspace.child(moduleName);

0 comments on commit de148b3

Please sign in to comment.
You can’t perform that action at this time.