Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-05-07 14:41:28 +0000
committerMichael Valenta2007-05-07 14:41:28 +0000
commitf74e1ba82ef735bed5bd1997356572c97e9ec288 (patch)
tree0bbe5a4ae91614eecbcac6dea27de20575578c4a /bundles/org.eclipse.team.cvs.core
parent9dd7c54f8e4f35d70ee6ec1e6cf047a8cf4d257f (diff)
downloadeclipse.platform.team-f74e1ba82ef735bed5bd1997356572c97e9ec288.tar.gz
eclipse.platform.team-f74e1ba82ef735bed5bd1997356572c97e9ec288.tar.xz
eclipse.platform.team-f74e1ba82ef735bed5bd1997356572c97e9ec288.zip
Bug 185087 [Sync Info] Problems reported while synchronizing CVS Workspace.
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/CVSResourceVariantTree.java10
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java9
4 files changed, 19 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java
index c32216830..077fc350f 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSMessages.java
@@ -14,6 +14,8 @@ import org.eclipse.osgi.util.NLS;
public class CVSMessages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.team.internal.ccvs.core.messages";//$NON-NLS-1$
+ public static String CVSResourceVariantTree_GettingSyncInfoError;
+ public static String FolderSyncInfo_InvalidSyncInfoBytes;
public static String LogEntry_0;
public static String ok;
public static String AbstractStructureVisitor_sendingFolder;
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 55ea78733..79637a784 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
@@ -19,6 +19,7 @@ CVSAuthenticationException_detail=Authentication error: {0}
CVSCommunicationException_io=CVS communication error: {0}
CVSCommunicationException_interruptCause=The most likely cause of the interrupt is either an intermittent network failure or a communications timeout.
CVSCommunicationException_interruptSolution=The CVS communications timeout can be adjusted in the Team/CVS preferences.
+CVSResourceVariantTree_GettingSyncInfoError=An error occurred processing the remote meta-data for folder {0}
CVSCommunicationException_alternateInterruptCause=Another possible cause is the improper configuration of the "ext" connection method.
CVSCommunicationException_alternateInterruptSolution=The "ext" connection method can be configured on the Team/CVS/EXT Connection Method preference page
CVSStatus_messageWithRoot={0}: {1}
@@ -172,6 +173,7 @@ Malformed_entry_line___11=Malformed entry line:
Malformed_entry_line__missing_name___12=Malformed entry line, missing name:
Malformed_entry_line__missing_revision___13=Malformed entry line, missing revision:
FolderSyncInfo_Maleformed_root_4=Malformed root
+FolderSyncInfo_InvalidSyncInfoBytes=Invalid folder sync info bytes: ''{0}''
SyncFileWriter_baseNotAvailable=Could not restore the base contents of ''{0}'' from the local cache.
BaseRevInfo_malformedEntryLine=Malformed entry line ''{0}'' for base revision information file.
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 20a9266e9..39ececcfa 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
@@ -210,7 +210,15 @@ public class CVSResourceVariantTree extends ResourceVariantTree {
// Manage the folder locally since folders exist in all versions, etc
// Use the info from the remote except get the tag from the local parent
CVSTag tag = CVSWorkspaceRoot.getCVSFolderFor(local.getParent()).getFolderSyncInfo().getTag();
- FolderSyncInfo info = FolderSyncInfo.getFolderSyncInfo(remote.asBytes());
+ FolderSyncInfo info = null;
+ try{
+ info = FolderSyncInfo.getFolderSyncInfo(remote.asBytes());
+ } catch (CVSException e){
+ Status status = new Status(Status.ERROR, CVSProviderPlugin.ID,
+ NLS.bind(CVSMessages.CVSResourceVariantTree_GettingSyncInfoError, local.getProjectRelativePath().toString()),
+ e);
+ throw new CVSException(status);
+ }
MutableFolderSyncInfo newInfo = info.cloneMutable();
newInfo.setTag(tag);
ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor((IFolder)local);
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java
index 6d128d64e..8daa85681 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java
@@ -13,8 +13,8 @@ package org.eclipse.team.internal.ccvs.core.syncinfo;
import java.io.*;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.*;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
import org.eclipse.team.internal.ccvs.core.resources.CVSEntryLineTag;
@@ -286,6 +286,7 @@ public class FolderSyncInfo {
* into a FolderSyncInfo
*/
public static FolderSyncInfo getFolderSyncInfo(byte[] bytes) throws CVSException {
+ Assert.isNotNull(bytes, "getFolderSyncInfo cannot be called with null parameter"); //$NON-NLS-1$
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
DataInputStream dis = new DataInputStream(in);
String root;
@@ -303,7 +304,9 @@ public class FolderSyncInfo {
}
isStatic = dis.readBoolean();
} catch (IOException e) {
- throw CVSException.wrapException(e);
+ Status status = new Status(Status.ERROR, CVSProviderPlugin.ID, NLS.bind(CVSMessages.FolderSyncInfo_InvalidSyncInfoBytes, new String(bytes)), e);
+ CVSException ex = new CVSException(status);
+ throw ex;
}
return new FolderSyncInfo(repository, root, tag, isStatic);
}

Back to the top