Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-04-25 11:19:02 -0400
committerMichael Valenta2002-04-25 11:19:02 -0400
commit954d7ce80e892e27e49d227f142f3220e9373479 (patch)
tree0a8783b964505e86b70ce18fc20182f891cbea8a
parent2e9d385485c9432b2b9430b7000eba8e1482d42b (diff)
downloadeclipse.platform.team-I20020423Path1Branch.tar.gz
eclipse.platform.team-I20020423Path1Branch.tar.xz
eclipse.platform.team-I20020423Path1Branch.zip
14578: Synchronize does not work for one classI20020423Path1Branch
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
index fe3286756..6c41d1614 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
@@ -123,6 +123,13 @@ public class RemoteFile extends RemoteResource implements ICVSRemoteFile {
// forget local contents. Remote contents will be fetched the next time
// the returned handle is used.
file.clearContents();
+
+ // If the revision changed, clear the contents of the original revision in case contents where cached
+ if ( ! info.getRevision().equals(file.getRevision())) {
+ RemoteFile originalRevision = new RemoteFile(parent, info);
+ originalRevision.clearContents();
+ }
+
return file;
}
@@ -131,6 +138,14 @@ public class RemoteFile extends RemoteResource implements ICVSRemoteFile {
*/
public void clearContents() {
contents = null;
+ try {
+ File ioFile = CVSProviderPlugin.getPlugin().getCacheFileFor(getCacheRelativePath());
+ if (ioFile.exists()) {
+ ioFile.delete();
+ }
+ } catch (IOException e) {
+ CVSProviderPlugin.log(CVSException.wrapException(e).getStatus());
+ }
}
/**

Back to the top