Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-04-01 15:18:12 +0000
committerMichael Valenta2004-04-01 15:18:12 +0000
commit435a225750a4764bfa36e0bd1ee07e9f1a560e0d (patch)
tree2c85c25ce08759b9f92166489e0c62b0e4d56fc2
parent31a38dcf5416ac4a747f227ab6c5383205787d34 (diff)
downloadeclipse.platform.team-435a225750a4764bfa36e0bd1ee07e9f1a560e0d.tar.gz
eclipse.platform.team-435a225750a4764bfa36e0bd1ee07e9f1a560e0d.tar.xz
eclipse.platform.team-435a225750a4764bfa36e0bd1ee07e9f1a560e0d.zip
57037: CVS checkout of module fails in M8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
index 0c2366984..89c0b62fb 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
@@ -24,6 +24,7 @@ import org.eclipse.team.internal.ccvs.core.client.*;
import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer;
+import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.ui.IWorkbenchPart;
/**
@@ -171,13 +172,23 @@ public abstract class CheckoutProjectOperation extends CheckoutOperation {
}
}
- // Determine if the target project is the same name as the remote folder
- // in which case we'll use -d to flatten the directory structure
- IProject project;
- if (targetProjects.length == 1 && (sendModuleName || targetProjects[0].getName().equals(resource.getName()))) {
- project = targetProjects[0];
- } else {
- project = null;
+ // Determine if t
+ // in which case we'll use -d to flatten the directory structure.
+ // Only flatten the directory structure if the folder is not a root folder
+ IProject project = null;
+ if (targetProjects.length == 1) {
+ if (sendModuleName) {
+ project = targetProjects[0];
+ } else if (targetProjects[0].getName().equals(resource.getName())) {
+ // The target project has the same name as the remote folder.
+ // If the repository relative path has multiple segments
+ // we will want to flatten the directory structure
+ String path = resource.getRepositoryRelativePath();
+ if (!path.equals(FolderSyncInfo.VIRTUAL_DIRECTORY)
+ && new Path(path).segmentCount() > 1) {
+ project = targetProjects[0];
+ }
+ }
}
// Build the local options

Back to the top