Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-09-09 13:27:02 -0400
committerMichael Valenta2003-09-09 13:27:02 -0400
commite5973d02d15e12e68f0a75d7ca8990c643933831 (patch)
treea784117600caa3af553e1b6c0b480f68a565498c
parentf8d4f18b6a9a9615bf9dfa7c332a4485e6302a88 (diff)
downloadeclipse.platform.team-e5973d02d15e12e68f0a75d7ca8990c643933831.tar.gz
eclipse.platform.team-e5973d02d15e12e68f0a75d7ca8990c643933831.tar.xz
eclipse.platform.team-e5973d02d15e12e68f0a75d7ca8990c643933831.zip
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties1
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java18
2 files changed, 18 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties
index 3e08ef595..66a55176e 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties
@@ -328,3 +328,4 @@ CVSProviderPlugin.21=Synchronizes the CVS managed resources in your workspace wi
CVSSyncTreeSubscriber.0={0} is not a valid comparison criteria for subscriber {1}
CVSRevisionNumberCompareCriteria.1=Revision number comparison
RemoteTagSynchronizer.0=Refreshing {0}
+ReentrantLock.9=An error occurred writting CVS synchronization information to disk. Some information may be lost.
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
index 50ea9def7..1a43bfd86 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ReentrantLock.java
@@ -18,9 +18,12 @@ import java.util.Set;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.team.internal.ccvs.core.CVSException;
+import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
+import org.eclipse.team.internal.ccvs.core.CVSStatus;
import org.eclipse.team.internal.ccvs.core.Policy;
import org.eclipse.team.internal.ccvs.core.util.Assert;
@@ -75,10 +78,23 @@ public class ReentrantLock {
return (IContainer[]) changedFolders.toArray(new IContainer[changedFolders.size()]);
}
public void flush(IProgressMonitor monitor) throws CVSException {
- operation.flush(this, monitor);
+ try {
+ operation.flush(this, monitor);
+ } catch (OutOfMemoryError e) {
+ throw e;
+ } catch (Error e) {
+ handleAbortedFlush(e);
+ throw e;
+ } catch (RuntimeException e) {
+ handleAbortedFlush(e);
+ throw e;
+ }
changedResources.clear();
changedFolders.clear();
}
+ private void handleAbortedFlush(Throwable t) {
+ CVSProviderPlugin.log(new CVSStatus(IStatus.ERROR, Policy.bind("ReentrantLock.9"), t)); //$NON-NLS-1$
+ }
}
public interface IFlushOperation {

Back to the top