Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-08-20 14:56:53 +0000
committerMichael Valenta2003-08-20 14:56:53 +0000
commitfc09e816fbdb906077fea0a824c3c5d16c76e7e1 (patch)
treed32890dcc203e5b2d650b2ffa12eb3d7cbcbdfce
parent0c0eb9ee7304e8e2c408d2e479fbe58615934b7b (diff)
downloadeclipse.platform.team-fc09e816fbdb906077fea0a824c3c5d16c76e7e1.tar.gz
eclipse.platform.team-fc09e816fbdb906077fea0a824c3c5d16c76e7e1.tar.xz
eclipse.platform.team-fc09e816fbdb906077fea0a824c3c5d16c76e7e1.zip
Fixed scheduling rule
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java10
1 files changed, 9 insertions, 1 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 0a1d7bc88..96c58f66a 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
@@ -37,6 +37,7 @@ import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.ILock;
+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;
@@ -411,7 +412,14 @@ public class EclipseSynchronizer {
*/
public void beginOperation(IResource resource, IProgressMonitor monitor) throws CVSException {
// ensure locks are acquired in the same order: workspace then cvs
- Platform.getJobManager().beginRule(resource);
+ // The scheduling rule is either the project or the resource's parent
+ ISchedulingRule rule;
+ if (resource.getType() == IResource.PROJECT || resource.getType() == IResource.ROOT) {
+ rule = resource;
+ } else {
+ rule = resource.getParent();
+ }
+ Platform.getJobManager().beginRule(rule);
lock.acquire();
if (lock.getDepth() == 1) {

Back to the top