Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-10-17 16:23:01 +0000
committerMichael Valenta2003-10-17 16:23:01 +0000
commit70e2aa9e6a69ef9a7083ce0e514f30f943437ecc (patch)
treee788db140632f72e9216d548c5d68dd6f9c1eed7
parent5e0750f3cb271c2f5a6d3211687899062757f130 (diff)
downloadeclipse.platform.team-70e2aa9e6a69ef9a7083ce0e514f30f943437ecc.tar.gz
eclipse.platform.team-70e2aa9e6a69ef9a7083ce0e514f30f943437ecc.tar.xz
eclipse.platform.team-70e2aa9e6a69ef9a7083ce0e514f30f943437ecc.zip
Handle concurrent deletion during sync info caching
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java8
1 files changed, 6 insertions, 2 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 58fc4d91b..4156ee46d 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
@@ -284,7 +284,7 @@ public class EclipseSynchronizer implements IFlushOperation {
try {
cacheResourceSyncForChildren(parent, false /* cannot modify workspace */);
} catch (CVSException e) {
- if (isCannotModifySynchronizer(e)) {
+ if (isCannotModifySynchronizer(e) || isResourceNotFound(e)) {
// We will resort to loading the sync info for the requested resource from disk
byte[] bytes = getSyncBytesFromDisk(resource);
if (!resource.exists() && bytes != null && !ResourceSyncInfo.isDeletion(bytes)) {
@@ -452,7 +452,7 @@ public class EclipseSynchronizer implements IFlushOperation {
cacheResourceSyncForChildren(folder, false);
}
} catch (CVSException e) {
- if (!isCannotModifySynchronizer(e)) {
+ if (!isCannotModifySynchronizer(e) && !isResourceNotFound(e)) {
throw e;
}
} finally {
@@ -474,6 +474,10 @@ public class EclipseSynchronizer implements IFlushOperation {
|| e.getStatus().getCode() == CVSStatus.FAILED_TO_CACHE_SYNC_INFO);
}
+ private boolean isResourceNotFound(CVSException e) {
+ return e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND;
+ }
+
/**
* Begins a batch of operations in order to optimize sync file writing.
* The provided scheduling rule indicates the resources

Back to the top