Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-10-17 17:49:44 +0000
committerMichael Valenta2003-10-17 17:49:44 +0000
commit112376f2a07fc0f9e172ff55d4219e951bed49cd (patch)
tree72b8d8c525d2f71d5f538a73893d162316e5a5b7
parentf4052f29f5b11f5db56d61964760a001441be75e (diff)
downloadeclipse.platform.team-112376f2a07fc0f9e172ff55d4219e951bed49cd.tar.gz
eclipse.platform.team-112376f2a07fc0f9e172ff55d4219e951bed49cd.tar.xz
eclipse.platform.team-112376f2a07fc0f9e172ff55d4219e951bed49cd.zip
43965 CVS: Virtual directories shouldn't be updated
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java5
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/FolderSyncInfo.java11
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java2
4 files changed, 18 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
index b4011085a..cb6310f9c 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/AbstractStructureVisitor.java
@@ -104,6 +104,11 @@ abstract class AbstractStructureVisitor implements ICVSResourceVisitor {
// Do not send the same folder twice
if (isLastSent(mFolder)) return;
+
+ // Do not send virtual directories
+ if (isCVSFolder && mFolder.getFolderSyncInfo().isVirtualDirectory()) {
+ return;
+ }
String localPath = mFolder.getRelativePath(session.getLocalRoot());
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
index d52e995e3..9a0bee1ce 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseResource.java
@@ -132,7 +132,7 @@ abstract class EclipseResource implements ICVSResource, Comparable {
if (parent.isIgnored()) return true;
FolderSyncInfo info = parent.getFolderSyncInfo();
if (info == null) return false;
- return info.getRepository().equals(FolderSyncInfo.VIRTUAL_DIRECTORY);
+ return info.isVirtualDirectory();
}
/*
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 544ee08b0..31ac7d209 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
@@ -301,4 +301,15 @@ public class FolderSyncInfo {
}
return new FolderSyncInfo(repository, root, tag, isStatic);
}
+
+ /**
+ * Return whether the local directory is mapped to an existing remote
+ * directory or is just a local placeholder for child folders. a return type
+ * of <code>true</code> indicates that the local folder is not mapped to a
+ * remote folder.
+ * @return whether the directory is a local placeholder
+ */
+ public boolean isVirtualDirectory() {
+ return getRepository().equals(VIRTUAL_DIRECTORY);
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
index 29ba7d1ab..ceb1d565b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
@@ -400,7 +400,7 @@ public class CVSLightweightDecorator
ICVSFolder cvsFolder = CVSWorkspaceRoot.getCVSFolderFor((IContainer)resource);
try {
FolderSyncInfo folderSyncInfo = cvsFolder.getFolderSyncInfo();
- if (folderSyncInfo != null && folderSyncInfo.getRepository().equals(FolderSyncInfo.VIRTUAL_DIRECTORY)) {
+ if (folderSyncInfo != null && folderSyncInfo.isVirtualDirectory()) {
return noRemoteDir;
}
} catch (CVSException e) {

Back to the top