Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-09-25 20:05:53 +0000
committerMichael Valenta2003-09-25 20:05:53 +0000
commit372f6ea10b5c77340711706c1c18898db4e2b678 (patch)
tree6b0b5c476598896b787ef24d9538495d205235b8
parentcbe00b8e31df0e2ec467445e3ef41f065b15402b (diff)
downloadeclipse.platform.team-372f6ea10b5c77340711706c1c18898db4e2b678.tar.gz
eclipse.platform.team-372f6ea10b5c77340711706c1c18898db4e2b678.tar.xz
eclipse.platform.team-372f6ea10b5c77340711706c1c18898db4e2b678.zip
43516: [CVS UI] CheckoutIntoOperation
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java26
1 files changed, 23 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java
index 27d518c72..c5d93abf7 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutIntoOperation.java
@@ -18,6 +18,9 @@ import java.util.Set;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -110,8 +113,25 @@ public class CheckoutIntoOperation extends CheckoutOperation {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.operations.CheckoutOperation#checkout(org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder, org.eclipse.core.runtime.IProgressMonitor)
*/
- protected IStatus checkout(ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException {
- return checkout(folder, getLocalFolder(), isRecursive(), monitor);
+ protected IStatus checkout(final ICVSRemoteFolder folder, IProgressMonitor monitor) throws CVSException {
+ final IStatus[] result = new IStatus[] { null };
+ try {
+ // Wrap in a workspace runnable to avoid auto-build.
+ // This is necessary because CVS has a POST_BUILD
+ // listener that will clear the sync info from
+ // orphaned (i.e. unmanaged) subtrees and we will
+ // purposely create some which we subsequently manage
+ // from their parent (see manageFolders())
+ ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ result[0] = checkout(folder, getLocalFolder(), isRecursive(), monitor);
+
+ }
+ }, getLocalFolder().getIResource().getProject(), monitor);
+ } catch (CoreException e) {
+ result[0] = CVSException.wrapException(e).getStatus();
+ }
+ return result[0];
}
/* (non-Javadoc)
@@ -322,7 +342,7 @@ public class CheckoutIntoOperation extends CheckoutOperation {
return OK;
}
- private IStatus checkout(final ICVSRemoteFolder remoteFolder, ICVSFolder parentFolder, boolean recurse, IProgressMonitor monitor) throws CVSException {
+ /* private */ IStatus checkout(final ICVSRemoteFolder remoteFolder, ICVSFolder parentFolder, boolean recurse, IProgressMonitor monitor) throws CVSException {
// Open a connection session to the repository
monitor.beginTask(null, 100);
ICVSRepositoryLocation repository = remoteFolder.getRepository();

Back to the top