Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2006-01-11 14:18:26 +0000
committerMichael Valenta2006-01-11 14:18:26 +0000
commit436d670ed0f867078b7270b5a49f95361629ce05 (patch)
treea856a89ee15d9d5acd499ce2bef2e72e4089c765
parentd5e92f83c285ee4024f9181cf8e064001446a1cb (diff)
downloadeclipse.platform.team-436d670ed0f867078b7270b5a49f95361629ce05.tar.gz
eclipse.platform.team-436d670ed0f867078b7270b5a49f95361629ce05.tar.xz
eclipse.platform.team-436d670ed0f867078b7270b5a49f95361629ce05.zip
Bug 123280 Update removes local delete info
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java16
2 files changed, 17 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
index 0064542d5..da600c3fe 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/mappings/WorkspaceSubscriberContext.java
@@ -104,7 +104,7 @@ public class WorkspaceSubscriberContext extends CVSSubscriberMergeContext {
// First, verify that the provided delta matches the current state
// i.e. it is possible that a concurrent change has occurred
SyncInfo info = getSyncInfo(getDiffTree().getResource(delta));
- if (info == null || info.getKind() == SyncInfo.IN_SYNC || SyncInfo.getDirection(info.getKind()) == SyncInfo.OUTGOING) {
+ if (info == null || info.getKind() == SyncInfo.IN_SYNC || (SyncInfo.getDirection(info.getKind()) == SyncInfo.OUTGOING && !force)) {
// Seems like this one was already merged so return OK
return Status.OK_STATUS;
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java
index fde3b760a..bde782ed3 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/CVSProviderTest.java
@@ -145,6 +145,22 @@ public class CVSProviderTest extends EclipseTest {
assertEquals(project, copy);
}
+ public void testUpdate123280() throws CoreException {
+ IProject project = createProject(new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
+
+ // Make a remote change
+ IProject copy = checkoutCopy(project, "-copy");
+ setContentsAndEnsureModified(copy.getFile("folder1/a.txt"));
+ commitProject(copy);
+
+ // Delete locally and then update
+ project.getFile("deleted.txt").delete(false, null);
+ updateProject(project, null, false);
+ // Ensure that the file is still an outgoing deletion
+ ICVSFile file = CVSWorkspaceRoot.getCVSFileFor(project.getFile("deleted.txt"));
+ assertTrue(!file.exists() && file.isManaged());
+ }
+
public void testVersionTag() throws TeamException, CoreException, IOException {
// Create a test project, import it into cvs and check it out

Back to the top