diff options
author | Michael Valenta | 2003-10-03 19:01:21 +0000 |
---|---|---|
committer | Michael Valenta | 2003-10-03 19:01:21 +0000 |
commit | 4483702148d082d77f3a69d9c0d1c10ed1c04a5e (patch) | |
tree | 0e6f577b4a5c94e61ec2fdd2ed7223b71fe9dd73 | |
parent | 91f051d49759fe7dc3d8bd7609bbeddfd0ef1ef2 (diff) | |
download | eclipse.platform.team-4483702148d082d77f3a69d9c0d1c10ed1c04a5e.tar.gz eclipse.platform.team-4483702148d082d77f3a69d9c0d1c10ed1c04a5e.tar.xz eclipse.platform.team-4483702148d082d77f3a69d9c0d1c10ed1c04a5e.zip |
Modified code so that logs are not printed when caching cannot be performed
2 files changed, 6 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java index 526a96791..4c5e9cd87 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java @@ -451,10 +451,7 @@ public class EclipseSynchronizer implements IFlushOperation { cacheResourceSyncForChildren(folder, false); } } catch (CVSException e) { - if (isCannotModifySynchronizer(e)) { - // Log the problem and continue - CVSProviderPlugin.log(e); - } else { + if (!isCannotModifySynchronizer(e)) { throw e; } } finally { @@ -1289,7 +1286,9 @@ public class EclipseSynchronizer implements IFlushOperation { } /** - * Method ensureSyncInfoLoaded loads all the relevent sync info into the cache + * Method ensureSyncInfoLoaded loads all the relevent sync info into the cache. + * This method can only be invoked when the workspace is open for modification. + * in other words it cannot be invoked from inside a POST_CHANGE delta listener. * @param resources * @param i * @return Object @@ -1305,7 +1304,7 @@ public class EclipseSynchronizer implements IFlushOperation { rule = beginBatching(parent, null); try { beginOperation(); - cacheResourceSyncForChildren(parent, false); + cacheResourceSyncForChildren(parent, true /* can modify workspace */); cacheFolderSync(parent); cacheFolderIgnores(parent); } finally { diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java index 4348156c3..bae83ba6e 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/SessionPropertySyncInfoCache.java @@ -379,7 +379,7 @@ import org.eclipse.team.internal.ccvs.core.util.SyncFileWriter; // Ensure the synchronizer is clear for exiting resources if (canModifyWorkspace) { byte[] oldBytes = synchronizerCache.getCachedSyncBytes(resource); - if (oldBytes != null) { + if (oldBytes != null && canModifyWorkspace) { synchronizerCache.setCachedSyncBytes(resource, null, canModifyWorkspace); if (ResourceSyncInfo.isFolder(syncBytes)) { // Handle gender changes |