Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-05-02 12:13:38 +0000
committerMichael Valenta2002-05-02 12:13:38 +0000
commitcea0135f93ee32b1f652ad546e468bffbec4b6b7 (patch)
tree96b022990f0c50063b3d8feb4821c70a84c063dc /bundles
parentfd1650c8ef1d375a5a6ea8b85bd0e360d9fd5b65 (diff)
downloadeclipse.platform.team-cea0135f93ee32b1f652ad546e468bffbec4b6b7.tar.gz
eclipse.platform.team-cea0135f93ee32b1f652ad546e468bffbec4b6b7.tar.xz
eclipse.platform.team-cea0135f93ee32b1f652ad546e468bffbec4b6b7.zip
14968: cvs repository: Interrupted IO: Timeout while reading from input stream
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Command.java23
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java17
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties3
3 files changed, 27 insertions, 16 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 bc4514779..0f46695bb 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
@@ -700,14 +700,7 @@ public abstract class Command extends Request {
public final IStatus execute(GlobalOption[] globalOptions, LocalOption[] localOptions, ICVSResource[] arguments,
ICommandOutputListener listener, IProgressMonitor pm) throws CVSException {
- // We assume that all the passed resources have the same root
- Session openSession;
- if (arguments.length == 0) {
- // If there are no arguments to the command, assume that the command is rooted at the workspace root
- openSession = Session.getOpenSession(CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()));
- } else {
- openSession = Session.getOpenSession(arguments[0]);
- }
+ Session openSession = getOpenSession(arguments);
if (openSession == null) {
throw new CVSException(Policy.bind("Command.noOpenSession")); //$NON-NLS-1$
} else {
@@ -718,7 +711,17 @@ public abstract class Command extends Request {
}
return execute(openSession, globalOptions, localOptions, (String[]) stringArguments.toArray(new String[stringArguments.size()]), listener, pm);
}
-
-
+ }
+
+ protected Session getOpenSession(ICVSResource[] arguments) {
+ // We assume that all the passed resources have the same root
+ Session openSession;
+ if (arguments == null || arguments.length == 0) {
+ // If there are no arguments to the command, assume that the command is rooted at the workspace root
+ openSession = Session.getOpenSession(CVSWorkspaceRoot.getCVSFolderFor(ResourcesPlugin.getWorkspace().getRoot()));
+ } else {
+ openSession = Session.getOpenSession(arguments[0]);
+ }
+ return openSession;
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java
index af1ca8917..c0e25833b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Version.java
@@ -43,6 +43,17 @@ public class Version extends RemoteCommand {
public IStatus execute(Session session, final ICVSRepositoryLocation location, IProgressMonitor monitor) throws CVSException {
+ // The server may not support the version request
+ if (session == null) {
+ session = getOpenSession(null);
+ }
+ if ( ! session.isValidRequest(getRequestId())) {
+ IStatus status = new CVSStatus(IStatus.WARNING, CVSStatus.SERVER_IS_UNKNOWN, Policy.bind("Version.versionNotValidRequest", location.getHost()));//$NON-NLS-1$
+ ((CVSRepositoryLocation)location).setServerPlaform(status);
+ CVSProviderPlugin.log(status);
+ return status;
+ }
+
ICommandOutputListener listener = new ICommandOutputListener() {
public IStatus messageLine(String line, ICVSFolder commandRoot, IProgressMonitor monitor) {
String knownPrefix = null;
@@ -75,10 +86,6 @@ public class Version extends RemoteCommand {
}
};
- if (session == null) {
- return execute(NO_GLOBAL_OPTIONS, NO_LOCAL_OPTIONS, new ICVSResource[] {}, listener, monitor);
- } else {
- return execute(session, NO_GLOBAL_OPTIONS, NO_LOCAL_OPTIONS, new String[] {}, listener, monitor);
- }
+ return execute(session, NO_GLOBAL_OPTIONS, NO_LOCAL_OPTIONS, new String[] {}, listener, monitor);
}
}
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 7113dba42..08425247d 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
@@ -261,4 +261,5 @@ PruneFolderVisitor.caseVariantExists=Resource ''{0}'' could not be created becau
Version.unsupportedVersion=Host ''{0}'' is running unsupported CVS version {1}
Version.unsupportedCVSNT=Host ''{0}'' is running CVS NT (version {1}) which is not fully supported
-Version.unknownVersionFormat=Host ''{0}'' is running ''{1}'' which is an unknown version to the workbench. \ No newline at end of file
+Version.unknownVersionFormat=Host ''{0}'' is running ''{1}'' which is an unknown version to the workbench.
+Version.versionNotValidRequest=Unable to determine server version. Host ''{0}'' does not support the ''cvs version'' command. \ No newline at end of file

Back to the top