14578: Synchronize does not work for one class
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 fe32867..6c41d16 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 @@ // 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 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()); + } } /**