Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-03-14 20:27:13 +0000
committerMichael Valenta2002-03-14 20:27:13 +0000
commit0c34bc3c4b5141aaf016d621e8032308763390ce (patch)
tree1e4eee0557c623c1d236e09c54d85dbfa433448d
parent6c2f1ccc9b97184edaef9b0d93d5d05ba86b5aa5 (diff)
downloadeclipse.platform.team-0c34bc3c4b5141aaf016d621e8032308763390ce.tar.gz
eclipse.platform.team-0c34bc3c4b5141aaf016d621e8032308763390ce.tar.xz
eclipse.platform.team-0c34bc3c4b5141aaf016d621e8032308763390ce.zip
11036: "Very quiet" removes ability to catch up with stream?
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java7
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java33
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java6
3 files changed, 32 insertions, 14 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
index 5a23711dc..91490908c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java
@@ -377,7 +377,7 @@ public abstract class Command {
/*** initiate command ***/
// send global and local options by first merging any command specific defaults
- Option[] gOptions = makeAndSendOptions(session, globalOptions, getDefaultGlobalOptions(globalOptions, localOptions));
+ Option[] gOptions = makeAndSendOptions(session, globalOptions, getDefaultGlobalOptions(session, globalOptions, localOptions));
Option[] lOptions = makeAndSendOptions(session, localOptions, getDefaultLocalOptions(globalOptions, localOptions));
// send arguments
@@ -761,7 +761,10 @@ public abstract class Command {
* @param globalOptions are the options already specified by the user.
* @return the default global options that will be sent with every command.
*/
- protected GlobalOption[] getDefaultGlobalOptions(GlobalOption[] globalOptions, LocalOption[] localOptions) {
+ protected GlobalOption[] getDefaultGlobalOptions(Session session, GlobalOption[] globalOptions, LocalOption[] localOptions) {
+ if (session.isNoLocalChanges()) {
+ return Command.NO_GLOBAL_OPTIONS;
+ }
QuietOption option = CVSProviderPlugin.getPlugin().getQuietness();
if (option == null)
return Command.NO_GLOBAL_OPTIONS;
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
index 2af70c0e0..23c28497e 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
@@ -7,22 +7,24 @@ package org.eclipse.team.internal.ccvs.core.resources;
import java.io.InputStream;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
-import org.eclipse.team.ccvs.core.*;
+import org.eclipse.team.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.ccvs.core.CVSStatus;
import org.eclipse.team.ccvs.core.CVSTag;
+import org.eclipse.team.ccvs.core.ICVSFile;
+import org.eclipse.team.ccvs.core.ICVSFolder;
import org.eclipse.team.ccvs.core.ICVSRemoteFile;
import org.eclipse.team.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.ccvs.core.ICVSRemoteResource;
import org.eclipse.team.ccvs.core.ICVSRepositoryLocation;
+import org.eclipse.team.ccvs.core.ICVSResource;
+import org.eclipse.team.ccvs.core.ICVSResourceVisitor;
import org.eclipse.team.ccvs.core.ICVSRunnable;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.sync.IRemoteResource;
@@ -33,6 +35,7 @@ import org.eclipse.team.internal.ccvs.core.client.Session;
import org.eclipse.team.internal.ccvs.core.client.Update;
import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
+import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
import org.eclipse.team.internal.ccvs.core.client.listeners.IStatusListener;
import org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener;
import org.eclipse.team.internal.ccvs.core.client.listeners.StatusListener;
@@ -101,16 +104,22 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
};
// Perform a "cvs status..." with a listener
- IStatus status = Command.STATUS.execute(session,
- Command.NO_GLOBAL_OPTIONS,
- Command.NO_LOCAL_OPTIONS,
- fileNames,
- new StatusListener(listener),
- monitor);
- if (status.getCode() == CVSStatus.SERVER_ERROR) {
- throw new CVSServerException(status);
+ QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
+ try {
+ CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
+ IStatus status = Command.STATUS.execute(session,
+ Command.NO_GLOBAL_OPTIONS,
+ Command.NO_LOCAL_OPTIONS,
+ fileNames,
+ new StatusListener(listener),
+ monitor);
+ if (status.getCode() == CVSStatus.SERVER_ERROR) {
+ throw new CVSServerException(status);
+ }
+ } finally {
+ CVSProviderPlugin.getPlugin().setQuietness(quietness);
}
-
+
if (count[0] != fileNames.length)
throw new CVSException(Policy.bind("RemoteFolder.errorFetchingRevisions")); //$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
index 625da9ee6..d2e020ce8 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolderTreeBuilder.java
@@ -30,6 +30,7 @@ import org.eclipse.team.internal.ccvs.core.client.Session;
import org.eclipse.team.internal.ccvs.core.client.Update;
import org.eclipse.team.internal.ccvs.core.client.Command.GlobalOption;
import org.eclipse.team.internal.ccvs.core.client.Command.LocalOption;
+import org.eclipse.team.internal.ccvs.core.client.Command.QuietOption;
import org.eclipse.team.internal.ccvs.core.client.listeners.IStatusListener;
import org.eclipse.team.internal.ccvs.core.client.listeners.IUpdateMessageListener;
import org.eclipse.team.internal.ccvs.core.client.listeners.StatusListener;
@@ -150,7 +151,11 @@ public class RemoteFolderTreeBuilder {
private RemoteFolderTree buildTree(IProgressMonitor monitor) throws CVSException {
+ // Make sure that the cvs commands are not quiet during this operations
+ QuietOption quietness = CVSProviderPlugin.getPlugin().getQuietness();
try {
+ CVSProviderPlugin.getPlugin().setQuietness(Command.VERBOSE);
+
monitor.beginTask(null, 100);
Policy.checkCanceled(monitor);
@@ -187,6 +192,7 @@ public class RemoteFolderTreeBuilder {
session.close();
}
} finally {
+ CVSProviderPlugin.getPlugin().setQuietness(quietness);
monitor.done();
}
}

Back to the top