Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-02-15 16:57:42 -0500
committerJean Michel-Lemieux2002-02-15 16:57:42 -0500
commit83e2f3969edbe389831e12906d72ee3e06f5a591 (patch)
treef6e882f8bb7076cb1c535440dadaaf4bf2827183
parentb937a54e83d3abaade141f38c2dca3b2db3cfdd0 (diff)
downloadeclipse.platform.team-83e2f3969edbe389831e12906d72ee3e06f5a591.tar.gz
eclipse.platform.team-83e2f3969edbe389831e12906d72ee3e06f5a591.tar.xz
eclipse.platform.team-83e2f3969edbe389831e12906d72ee3e06f5a591.zip
Bugs 8254, 9783: checkout from repo view leaves files from old project.
The checkout from the repo view now deletes the target project first so that the checkout results in a pristine copy of the resources in the repo.
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
index d6b09d5ea..306b1c5fc 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProvider.java
@@ -190,7 +190,17 @@ public class CVSProvider implements ICVSProvider {
RemoteFolder resource = (RemoteFolder)resources[i];
if (projects != null)
project = projects[i];
- checkout(resource.getRepository(), project, resource.getRepositoryRelativePath(), resource.getTag(), Policy.subMonitorFor(pm, 1000));
+
+ // delete the project in the workbench first, this will allow us to retreive a clean
+ // copy of the project.
+ if(project != null && project.exists()) {
+ if(!project.isOpen()) {
+ project.open(Policy.subMonitorFor(pm, 10));
+ }
+ project.delete(true, true, Policy.subMonitorFor(pm, 90));
+ }
+
+ checkout(resource.getRepository(), project, resource.getRepositoryRelativePath(), resource.getTag(), Policy.subMonitorFor(pm, 900));
}
}
catch (TeamException e) {

Back to the top