Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-06-24 17:04:43 -0400
committerMichael Valenta2002-06-24 17:04:43 -0400
commitbbcdb3aab8d38d8a7c6edde91d15210aab8a06f9 (patch)
treed1d09aefa6e3dc2f82678af83ef3a3063e1da076
parent8325a20321adcb512973c9ef8fac66cd2b475b21 (diff)
downloadeclipse.platform.team-bbcdb3aab8d38d8a7c6edde91d15210aab8a06f9.tar.gz
eclipse.platform.team-bbcdb3aab8d38d8a7c6edde91d15210aab8a06f9.tar.xz
eclipse.platform.team-bbcdb3aab8d38d8a7c6edde91d15210aab8a06f9.zip
Committing fix for bug 20715 to branch pending approvalbug20715
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
index 8a793f20e..b893e20a4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSSyncCompareInput.java
@@ -22,6 +22,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -38,6 +39,7 @@ import org.eclipse.team.core.sync.IRemoteSyncElement;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.ICVSFile;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
+import org.eclipse.team.internal.ccvs.core.ICVSResource;
import org.eclipse.team.internal.ccvs.core.ICVSRunnable;
import org.eclipse.team.internal.ccvs.core.client.Session;
import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
@@ -170,9 +172,17 @@ public class CVSSyncCompareInput extends SyncCompareInput {
try {
ICVSFolder folder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)resource);
if (folder.isCVSFolder()) {
+ // Check for outgoing file deletions (bug 20715)
+ ICVSResource[] files = folder.members(ICVSFolder.FILE_MEMBERS | ICVSFolder.MANAGED_MEMBERS);
+ for (int j = 0; j < files.length; j++) {
+ if (!files[j].exists()) {
+ outgoing.add(((IContainer)resource).getFile(new Path(files[j].getName())));
+ }
+ }
return true;
} else {
- outgoing.add(resource);
+ if (resource.exists())
+ outgoing.add(resource);
return false;
}
} catch (CVSException e) {
@@ -182,7 +192,7 @@ public class CVSSyncCompareInput extends SyncCompareInput {
}
return true;
}
- });
+ }, IResource.DEPTH_INFINITE, true);
}
} catch (CoreException e) {
ErrorDialog.openError(getShell(), Policy.bind("simpleInternal"), Policy.bind("internal"), e.getStatus()); //$NON-NLS-1$ //$NON-NLS-2$

Back to the top