Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-04-05 12:26:04 -0500
committerMichael Valenta2002-04-05 12:26:04 -0500
commite5f453b4c60437155a9364566051777fe0019566 (patch)
treeea2bd57aed9c9f8d64d438b1d5c54741a2910a3e
parentea536e071c2cfd187c45a88dc2907eff1582b5c1 (diff)
downloadeclipse.platform.team-e5f453b4c60437155a9364566051777fe0019566.tar.gz
eclipse.platform.team-e5f453b4c60437155a9364566051777fe0019566.tar.xz
eclipse.platform.team-e5f453b4c60437155a9364566051777fe0019566.zip
12034: Mereg case where incoming folder addition appears as outgoing
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java21
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java3
2 files changed, 21 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
index d241cdc2f..b9a06b4ad 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
@@ -7,7 +7,6 @@ package org.eclipse.team.internal.ccvs.core.resources;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.team.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.ccvs.core.ICVSFolder;
import org.eclipse.team.ccvs.core.ICVSRemoteResource;
@@ -20,7 +19,6 @@ import org.eclipse.team.core.sync.RemoteSyncElement;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.client.Update;
-import org.eclipse.team.internal.ccvs.core.client.Command.KSubstOption;
import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.MutableResourceSyncInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
@@ -301,7 +299,24 @@ public class CVSRemoteSyncElement extends RemoteSyncElement {
// 3. unmanage delete/delete conflicts and return that they are in sync
kind = handleDeletionConflicts(kind);
-
+
+ // 4. Special handling is required for folders
+ if (isContainer()) {
+ // Due to the way CVS works, there's really no such thing as an outgoing folder deletion.
+ // Furthermore, if there's a base and a remote, it's really an incoming folder addition
+ if (kind == (IRemoteSyncElement.OUTGOING | IRemoteSyncElement.DELETION)) {
+ kind = IRemoteSyncElement.INCOMING | IRemoteSyncElement.ADDITION;
+ } else if (kind == IRemoteSyncElement.IN_SYNC
+ || kind == (IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION | IRemoteSyncElement.PSEUDO_CONFLICT)) {
+ // If the folders are in sync, make sure the local is managed
+ ICVSFolder cvsResource = (ICVSFolder)localSync.getCVSResource();
+ if(! cvsResource.isCVSFolder()) {
+ // The local isn't managed so mark it as a conflict
+ kind = IRemoteSyncElement.CONFLICTING | IRemoteSyncElement.ADDITION;
+ }
+ }
+ }
+
return kind;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java
index 7220d792f..8f7cfabe2 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/UpdateMergeAction.java
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.ccvs.core.CVSTag;
+import org.eclipse.team.ccvs.core.ICVSFolder;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.sync.IRemoteResource;
import org.eclipse.team.core.sync.RemoteSyncElement;
@@ -26,6 +27,7 @@ import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.client.Command;
import org.eclipse.team.internal.ccvs.core.client.Update;
import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
+import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.RepositoryManager;
import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
@@ -119,6 +121,7 @@ public class UpdateMergeAction extends UpdateSyncAction {
if(!local.exists()) {
((IFolder)local).create(false /*don't force*/, true /*local*/, monitor);
}
+ CVSWorkspaceRoot.getCVSFolderFor((IContainer)local).setFolderSyncInfo(((ICVSFolder)remote).getFolderSyncInfo());
} else {
monitor.beginTask(null, 200);
try {

Back to the top