Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-11-04 16:53:14 -0500
committerMichael Valenta2003-11-04 16:53:14 -0500
commit3be91ff27f99b5624501748e6605a81c74afe3af (patch)
treed358c7de39731715554eb938cdcd288007801b62
parentce05ee60f57519fb1bc479322c7c7477f10efd2d (diff)
downloadeclipse.platform.team-branch_20031103_SyncViewRefresh.tar.gz
eclipse.platform.team-branch_20031103_SyncViewRefresh.tar.xz
eclipse.platform.team-branch_20031103_SyncViewRefresh.zip
*** empty log message ***branch_20031103_SyncViewRefresh
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java21
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionOnBranchCompareCriteria.java32
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java6
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java59
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java52
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch48
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java3
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java9
8 files changed, 148 insertions, 82 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java
index fef08e05f..916c8a619 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionNumberCompareCriteria.java
@@ -75,14 +75,14 @@ import org.eclipse.team.internal.ccvs.core.Policy;
}
ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)e1);
try {
- byte[] syncBytes1 = cvsFile.getSyncBytes();
- byte[] syncBytes2 = ((ICVSRemoteFile)e2).getSyncBytes();
+ byte[] localBytes = cvsFile.getSyncBytes();
+ byte[] remoteBytes = ((ICVSRemoteFile)e2).getSyncBytes();
- if(syncBytes1 != null) {
- if(ResourceSyncInfo.isDeletion(syncBytes1) || ResourceSyncInfo.isMerge(syncBytes1) || cvsFile.isModified(null)) {
+ if(localBytes != null) {
+ if(ResourceSyncInfo.isDeletion(localBytes) || ResourceSyncInfo.isMerge(localBytes) || cvsFile.isModified(null)) {
return false;
}
- return ResourceSyncInfo.getRevision(syncBytes1).equals(ResourceSyncInfo.getRevision(syncBytes2));
+ return compare(localBytes, remoteBytes);
}
return false;
} catch(CVSException e) {
@@ -91,6 +91,17 @@ import org.eclipse.team.internal.ccvs.core.Policy;
}
}
+ /**
+ * Compare the localBytes with the remoteBytes for revision number equality
+ * @param localBytes
+ * @param remoteBytes
+ * @return
+ * @throws CVSException
+ */
+ protected boolean compare(byte[] localBytes, byte[] remoteBytes) throws CVSException {
+ return ResourceSyncInfo.getRevision(localBytes).equals(ResourceSyncInfo.getRevision(remoteBytes));
+ }
+
/* (non-Javadoc)
* @see org.eclipse.team.core.subscribers.ComparisonCriteria#usesFileContents()
*/
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionOnBranchCompareCriteria.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionOnBranchCompareCriteria.java
new file mode 100644
index 000000000..9ab97e319
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSRevisionOnBranchCompareCriteria.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ccvs.core;
+
+import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
+
+/**
+ * Specialized revision comparison that only fails the comparison when the remote revision is a later
+ * revision on the same branch as the local resource.
+ */
+public class CVSRevisionOnBranchCompareCriteria extends CVSRevisionNumberCompareCriteria {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.core.CVSRevisionNumberCompareCriteria#compare(byte[], byte[])
+ */
+ protected boolean compare(byte[] localBytes, byte[] remoteBytes) throws CVSException {
+ // First, check if the revisions are the same
+ if (super.compare(localBytes, remoteBytes)) return true;
+ // Only fail the compare if the remote bytes are on the same branch but a later revision.
+ // This is done to ignore stale sync bytes in the cache
+ return !ResourceSyncInfo.isLaterRevisionOnSameBranch(remoteBytes, localBytes);
+ }
+
+}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
index 52817436b..44857a579 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSSyncTreeSubscriber.java
@@ -65,7 +65,7 @@ public abstract class CVSSyncTreeSubscriber extends TeamSubscriber {
*/
protected void initializeComparisonCriteria() {
// setup comparison criteria
- ComparisonCriteria revisionNumberComparator = new CVSRevisionNumberCompareCriteria();
+ ComparisonCriteria revisionNumberComparator = createRevisionNumberCompareCriteria();
ComparisonCriteria contentsComparator = new ContentComparisonCriteria(new ComparisonCriteria[] {revisionNumberComparator}, false /*consider whitespace */);
ComparisonCriteria contentsComparatorIgnoreWhitespace = new ContentComparisonCriteria(new ComparisonCriteria[] {revisionNumberComparator}, true /* ignore whitespace */);
@@ -77,6 +77,10 @@ public abstract class CVSSyncTreeSubscriber extends TeamSubscriber {
defaultCriteria = revisionNumberComparator.getId();
}
+ protected CVSRevisionNumberCompareCriteria createRevisionNumberCompareCriteria() {
+ return new CVSRevisionNumberCompareCriteria();
+ }
+
/**
* Add the comparison criteria to the subscriber
*
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java
index 73d98bbe3..c24b031bc 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSWorkspaceSubscriber.java
@@ -31,7 +31,6 @@ import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.syncinfo.OptimizedRemoteSynchronizer;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
import org.eclipse.team.internal.ccvs.core.util.ResourceStateChangeListeners;
-import org.eclipse.team.internal.ccvs.core.util.Util;
/**
* CVSWorkspaceSubscriber
@@ -126,63 +125,15 @@ public class CVSWorkspaceSubscriber extends CVSSyncTreeSubscriber implements IRe
fireTeamResourceChange(TeamDelta.asSyncChangedDeltas(this, changedResources));
}
- /**
- * Return <code>true</code> if the remoteBytes represents a later revision on the same
- * branch as localBytes. Return <code>false</code> if remoteBytes is the same or an earlier
- * revision or if the bytes are on a separate branch (or tag)
- * @param remoteBytes
- * @param localBytes
- * @return
- */
private boolean isLaterRevision(byte[] remoteBytes, byte[] localBytes) {
try {
- // If the two byte arrays are the same, then the remote isn't a later revision
- if (remoteBytes == localBytes) return false;
- // If the tags differ, then the remote isn't a later revision
- byte[] remoteTag = ResourceSyncInfo.getTagBytes(remoteBytes);
- byte[] localTag = ResourceSyncInfo.getTagBytes(localBytes);
- if (!Util.equals(remoteTag, localTag)) return false;
- // If the revisions are the same, the remote isn't later
- String remoteRevision = ResourceSyncInfo.getRevision(remoteBytes);
- String localRevision = ResourceSyncInfo.getRevision(localBytes);
- if (remoteRevision.equals(localRevision)) return false;
- return isLaterRevision(remoteRevision, localRevision);
+ return ResourceSyncInfo.isLaterRevisionOnSameBranch(remoteBytes, localBytes);
} catch (CVSException e) {
CVSProviderPlugin.log(e);
return false;
}
}
- /**
- * Return true if the remoteRevision represents a later revision than the local revision
- * on the same branch.
- * @param remoteRevision
- * @param localRevision
- * @return
- */
- private boolean isLaterRevision(String remoteRevision, String localRevision) {
- int localDigits[] = Util.convertToDigits(localRevision);
- if (localDigits.length == 0) return false;
- int remoteDigits[] = Util.convertToDigits(remoteRevision);
- if (remoteDigits.length == 0) return false;
- if (localDigits.length > remoteDigits.length) {
- // If there are more digits in the local revision then there is
- // no way that the remote is later on the same branch
- return false;
- }
- // For the remote to be later, at least one of the remote digits must
- // be larger or, if all the remote and local digits are equals, there
- // must be more remote digits
- for (int i = 0; i < localDigits.length; i++) {
- int localDigit = localDigits[i];
- int remoteDigit = remoteDigits[i];
- if (remoteDigit > localDigit) return true;
- if (remoteDigit < localDigit) return false;
- }
- // All the leading digits are equals so the remote is later if it is longer
- return remoteDigits.length > localDigits.length;
- }
-
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.core.IResourceStateChangeListener#externalSyncInfoChange(org.eclipse.core.resources.IResource[])
*/
@@ -315,4 +266,12 @@ public class CVSWorkspaceSubscriber extends CVSSyncTreeSubscriber implements IRe
private boolean hasIncomingChange(IResource resource) throws TeamException {
return remoteSynchronizer.isRemoteKnown(resource);
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber#getRevisionNumberCompareCriteria()
+ */
+ protected CVSRevisionNumberCompareCriteria createRevisionNumberCompareCriteria() {
+ return new CVSRevisionOnBranchCompareCriteria();
+ }
+
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
index 25eae8468..b41ec508c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
@@ -887,4 +887,56 @@ public class ResourceSyncInfo {
return syncType == TYPE_MERGED_WITH_CONFLICTS;
}
+
+ /**
+ * Return <code>true</code> if the remoteBytes represents a later revision on the same
+ * branch as localBytes. Return <code>false</code> if remoteBytes is the same or an earlier
+ * revision or if the bytes are on a separate branch (or tag)
+ * @param remoteBytes
+ * @param localBytes
+ * @return
+ */
+ public static boolean isLaterRevisionOnSameBranch(byte[] remoteBytes, byte[] localBytes) throws CVSException {
+ // If the two byte arrays are the same, then the remote isn't a later revision
+ if (remoteBytes == localBytes) return false;
+ // If the tags differ, then the remote isn't a later revision
+ byte[] remoteTag = ResourceSyncInfo.getTagBytes(remoteBytes);
+ byte[] localTag = ResourceSyncInfo.getTagBytes(localBytes);
+ if (!Util.equals(remoteTag, localTag)) return false;
+ // If the revisions are the same, the remote isn't later
+ String remoteRevision = ResourceSyncInfo.getRevision(remoteBytes);
+ String localRevision = ResourceSyncInfo.getRevision(localBytes);
+ if (remoteRevision.equals(localRevision)) return false;
+ return isLaterRevision(remoteRevision, localRevision);
+ }
+
+ /**
+ * Return true if the remoteRevision represents a later revision than the local revision
+ * on the same branch.
+ * @param remoteRevision
+ * @param localRevision
+ * @return
+ */
+ public static boolean isLaterRevision(String remoteRevision, String localRevision) {
+ int localDigits[] = Util.convertToDigits(localRevision);
+ if (localDigits.length == 0) return false;
+ int remoteDigits[] = Util.convertToDigits(remoteRevision);
+ if (remoteDigits.length == 0) return false;
+ if (localDigits.length > remoteDigits.length) {
+ // If there are more digits in the local revision then there is
+ // no way that the remote is later on the same branch
+ return false;
+ }
+ // For the remote to be later, at least one of the remote digits must
+ // be larger or, if all the remote and local digits are equals, there
+ // must be more remote digits
+ for (int i = 0; i < localDigits.length; i++) {
+ int localDigit = localDigits[i];
+ int remoteDigit = remoteDigits[i];
+ if (remoteDigit > localDigit) return true;
+ if (remoteDigit < localDigit) return false;
+ }
+ // All the leading digits are equals so the remote is later if it is longer
+ return remoteDigits.length > localDigits.length;
+ }
} \ No newline at end of file
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
index 0ff1ccdfc..823c76e87 100644
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
+++ b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
@@ -1,50 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.subscriber.CVSWorkspaceSubscriberTest"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.ui.CompareOperationTests"/>
<booleanAttribute key="tracing" value="true"/>
+<stringAttribute key="vmargs" value="-Declipse.cvs.properties=/home/mvalenta/dev/repository.properties -Declipse.cvs.testName2=testProjectClose"/>
<booleanAttribute key="default" value="true"/>
-<stringAttribute key="vmargs" value="-Declipse.cvs.properties=/home/mvalenta/dev/repository.properties -Declipse.cvs.testName2=testFileAdditions"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<mapAttribute key="tracingOptions">
-<mapEntry key="org.eclipse.core.boot/trace/filters" value="trace.properties"/>
-<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore/syncinfo" value="false"/>
+<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/>
+<mapEntry key="org.eclipse.core.boot/trace/filters" value="trace.properties"/>
<mapEntry key="org.eclipse.team.cvs.core/cvsprotocol" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/postaction" value="false"/>
<mapEntry key="org.eclipse.core.runtime/url/debug/cachelookup" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
<mapEntry key="org.eclipse.team.cvs.ui/debug" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/reconciler" value="false"/>
<mapEntry key="org.eclipse.help.webapp/debug/workingsets" value="false"/>
<mapEntry key="org.eclipse.core.resources/save/snapshots" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/loader" value="*"/>
<mapEntry key="org.eclipse.help/debug/context" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/loader" value="*"/>
<mapEntry key="org.eclipse.jdt.core/debug/builder" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/actions" value="false"/>
<mapEntry key="org.eclipse.core.runtime/timing/shutdown" value="false"/>
<mapEntry key="org.eclipse.core.resources/save/syncinfo" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/resource" value="*"/>
+<mapEntry key="org.eclipse.core.runtime/url/debug/connect" value="false"/>
<mapEntry key="org.eclipse.team.ftp/debug" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore/markers" value="false"/>
<mapEntry key="org.eclipse.core.boot/trace/filename" value="runtime.traces"/>
<mapEntry key="org.eclipse.core.resources/build/needbuild" value="false"/>
<mapEntry key="org.eclipse.team.ftp/list" value="true"/>
-<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/activateplugin" value="false"/>
+<mapEntry key="org.eclipse.team.cvs.ssh/debug" value="false"/>
<mapEntry key="org.eclipse.ui/trace/graphics" value="false"/>
<mapEntry key="org.eclipse.team.cvs.ssh/ssh_protocol" value="false"/>
<mapEntry key="org.eclipse.core.resources/monitor/builders" value="false"/>
<mapEntry key="org.eclipse.core.resources/save/markers" value="false"/>
-<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
<mapEntry key="org.eclipse.help/debug/search" value="false"/>
+<mapEntry key="org.eclipse.update.core/debug/installhandler" value="false"/>
<mapEntry key="org.eclipse.core.runtime/registry/debug" value="false"/>
<mapEntry key="org.eclipse.team.ftp/requests" value="true"/>
-<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/javadelta" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/workbench.restore" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/loader/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/selection" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore/tree" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/workbench.restore" value="false"/>
<mapEntry key="org.eclipse.core.resources/monitor/listeners" value="false"/>
<mapEntry key="org.eclipse.ui/trace/part.create" value="false"/>
<mapEntry key="org.eclipse.ant.core/debug" value="true"/>
@@ -55,18 +55,18 @@
<mapEntry key="org.eclipse.core.resources/natures" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/dirtycaching" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/native" value="*"/>
-<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
<mapEntry key="org.eclipse.core.runtime/url/debug" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/loader/debug/properties" value="false"/>
+<mapEntry key="org.eclipse.jdt.core/debug/zipaccess" value="false"/>
<mapEntry key="org.eclipse.core.runtime/url/debug/cachecopy" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/loader/debug/properties" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/create" value="false"/>
<mapEntry key="org.eclipse.update.core/debug" value="true"/>
<mapEntry key="org.eclipse.core.runtime/debug/context" value="false"/>
<mapEntry key="org.eclipse.core.runtime/jobs/beginend" value="false"/>
-<mapEntry key="org.eclipse.help.ui/debug/ieadapter" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/metafiles" value="false"/>
-<mapEntry key="org.eclipse.team.core/debug" value="false"/>
+<mapEntry key="org.eclipse.help.ui/debug/ieadapter" value="false"/>
<mapEntry key="org.eclipse.team.ftp/responses" value="true"/>
+<mapEntry key="org.eclipse.team.core/debug" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/javamodel" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/success" value="false"/>
<mapEntry key="org.eclipse.core.runtime/jobs" value="false"/>
@@ -107,30 +107,30 @@
<mapEntry key="org.eclipse.core.resources/build/failure" value="false"/>
<mapEntry key="org.eclipse.jface/trace/actions" value="false"/>
<mapEntry key="org.eclipse.core.resources/save/tree" value="false"/>
-<mapEntry key="org.eclipse.core.runtime/registry/debug/events/extension" value="false"/>
<mapEntry key="org.eclipse.core.runtime/config/debug" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/registry/debug/events/extension" value="false"/>
<mapEntry key="org.eclipse.help.ui/debug" value="true"/>
<mapEntry key="org.eclipse.core.resources/restore/metainfo" value="false"/>
-<mapEntry key="org.eclipse.debug.ui/debug" value="true"/>
<mapEntry key="org.eclipse.core.resources/save/mastertable" value="false"/>
-<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
+<mapEntry key="org.eclipse.debug.ui/debug" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/hierarchy" value="false"/>
-<mapEntry key="org.eclipse.jdt.debug/debug" value="true"/>
+<mapEntry key="org.eclipse.help.webapp/debug" value="true"/>
<mapEntry key="org.eclipse.team.cvs.core/debug" value="true"/>
-<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
+<mapEntry key="org.eclipse.jdt.debug/debug" value="true"/>
<mapEntry key="org.eclipse.jdt.core/debug/cpresolution" value="false"/>
+<mapEntry key="org.eclipse.core.runtime/debug" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/threading" value="false"/>
<mapEntry key="org.eclipse.jdt.core/debug/buffermanager" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/warning" value="false"/>
-<mapEntry key="org.eclipse.ui/trace/part.listeners" value="false"/>
<mapEntry key="org.eclipse.core.resources/save" value="false"/>
+<mapEntry key="org.eclipse.ui/trace/part.listeners" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/success" value="false"/>
<mapEntry key="org.eclipse.core.resources/restore/mastertable" value="false"/>
-<mapEntry key="org.eclipse.ui/debug/internalerror/openDialog" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/install" value="false"/>
+<mapEntry key="org.eclipse.ui/debug/internalerror/openDialog" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/filter/class" value="*"/>
-<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
<mapEntry key="org.eclipse.core.runtime/preferences/debug" value="false"/>
+<mapEntry key="org.eclipse.core.resources/debug" value="false"/>
<mapEntry key="org.eclipse.core.runtime/jobs/timing" value="false"/>
<mapEntry key="org.eclipse.update.core/debug/parsing" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/failure" value="false"/>
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
index 6f2b84905..78097a939 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
@@ -31,6 +31,7 @@ import org.eclipse.team.core.subscribers.TeamSubscriber;
import org.eclipse.team.core.sync.RemoteSyncElement;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
+import org.eclipse.team.tests.ccvs.ui.SynchronizeViewTestAdapter;
/**
* Provides test methods common to CVS sync subscribers
@@ -39,7 +40,7 @@ public abstract class CVSSyncSubscriberTest extends EclipseTest {
private ITeamResourceChangeListener listener;
private List accumulatedTeamDeltas = new ArrayList();
- private static SyncInfoSource source = new SyncInfoSource();
+ private static SyncInfoSource source = new SynchronizeViewTestAdapter();
public CVSSyncSubscriberTest() {
super();
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
index 6275451f0..2d0b5e282 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSWorkspaceSubscriberTest.java
@@ -1197,8 +1197,15 @@ public class CVSWorkspaceSubscriberTest extends CVSSyncSubscriberTest {
public void testProjectClose() throws TeamException, CoreException {
IProject project = createProject(new String[] { "file1.txt", "folder1/", "folder1/a.txt", "folder1/b.txt"});
+
+ setContentsAndEnsureModified(project.getFile("file1.txt"));
+ assertSyncEquals("testProjectClose sync check", project,
+ new String[] { "file1.txt"},
+ true, new int[] {
+ SyncInfo.OUTGOING | SyncInfo.CHANGE,
+ });
+
project.close(null);
- // TODO: dirty some resources and some incoming and ensure entries are removed
assertProjectRemoved(getWorkspaceSubscriber(), project);
}
}

Back to the top