Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-04-25 14:56:03 +0000
committerMichael Valenta2002-04-25 14:56:03 +0000
commit5a95d7088e22a1cd2b28ecb0fa867f9c5fa4ae07 (patch)
tree0e953de2394da780f43bb97a6bf0000da1aa5937 /bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
parent96f6230ca722138483b19a7f52d0960529a38ca8 (diff)
downloadeclipse.platform.team-5a95d7088e22a1cd2b28ecb0fa867f9c5fa4ae07.tar.gz
eclipse.platform.team-5a95d7088e22a1cd2b28ecb0fa867f9c5fa4ae07.tar.xz
eclipse.platform.team-5a95d7088e22a1cd2b28ecb0fa867f9c5fa4ae07.zip
14578: Synchronize does not work for one class
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java14
1 files changed, 14 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 dcda548ba..520b4b63a 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
@@ -128,6 +128,12 @@ 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;
}
@@ -136,6 +142,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