Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
index 814986e48..c4bdcbfdd 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java
@@ -280,14 +280,17 @@ public class CVSResourceVariantTree extends ResourceVariantTree {
protected IResource[] refresh(IResource resource, int depth, IProgressMonitor monitor) throws TeamException {
IResource[] changedResources = null;
monitor.beginTask(null, 100);
- // Wait indefinitely until buidl is done
- while (isJobInFamilyRunning(ResourcesPlugin.FAMILY_AUTO_BUILD)
- || isJobInFamilyRunning(ResourcesPlugin.FAMILY_MANUAL_BUILD)) {
+ // Wait up to 10 seconds for build to finish
+ int count = 0;
+ while (count < 10
+ && (isJobInFamilyRunning(ResourcesPlugin.FAMILY_AUTO_BUILD)
+ || isJobInFamilyRunning(ResourcesPlugin.FAMILY_MANUAL_BUILD))) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// Conitinue
}
+ count++;
Policy.checkCanceled(monitor);
}
ISchedulingRule rule = getSchedulingRule(resource);

Back to the top