Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-03-19 18:33:41 +0000
committerMichael Valenta2002-03-19 18:33:41 +0000
commitc5c32cc7e6dac5e905f2f88e8af008ad5ef5cea7 (patch)
tree045b870522950f25396f1293661cdb0b3e435d12
parent8cddfe185a609e071cb86189decddc33fdd7f2e2 (diff)
downloadeclipse.platform.team-c5c32cc7e6dac5e905f2f88e8af008ad5ef5cea7.tar.gz
eclipse.platform.team-c5c32cc7e6dac5e905f2f88e8af008ad5ef5cea7.tar.xz
eclipse.platform.team-c5c32cc7e6dac5e905f2f88e8af008ad5ef5cea7.zip
11607: Change auto-discovery to use .project
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
index f21b5c278..560a0fd56 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/RepositoryManager.java
@@ -95,9 +95,10 @@ public class RepositoryManager {
public CVSTag[] getKnownVersionTags(ICVSRemoteResource resource, IProgressMonitor monitor) throws TeamException {
// Find tags in .vcm_meta file, optimization for Eclipse users
Set result = new HashSet();
- ICVSRemoteFile vcmMeta = getVCMMeta(resource);
- if (vcmMeta != null) {
- CVSTag[] tags = getTags(vcmMeta, new NullProgressMonitor());
+ ICVSRemoteFile[] vcmMeta = getVCMMeta(resource);
+ for (int j = 0; j < vcmMeta.length; j++) {
+ ICVSRemoteFile iCVSRemoteFile = vcmMeta[j];
+ CVSTag[] tags = getTags(iCVSRemoteFile, new NullProgressMonitor());
for (int i = 0; i < tags.length; i++) {
if (tags[i].getType() == CVSTag.VERSION) {
result.add(tags[i]);
@@ -116,15 +117,17 @@ public class RepositoryManager {
result.addAll(set);
return (CVSTag[])result.toArray(new CVSTag[0]);
}
- private ICVSRemoteFile getVCMMeta(ICVSRemoteResource resource) throws TeamException {
+ private ICVSRemoteFile[] getVCMMeta(ICVSRemoteResource resource) throws TeamException {
// There should be a better way of doing this.
+ List files = new ArrayList();
IRemoteResource[] resources = resource.members(new NullProgressMonitor());
for (int i = 0; i < resources.length; i++) {
- if (resources[i] instanceof ICVSRemoteFile && resources[i].getName().equals(".vcm_meta")) {
- return (ICVSRemoteFile)resources[i];
+ if (resources[i] instanceof ICVSRemoteFile &&
+ (resources[i].getName().equals(".vcm_meta") || resources[i].getName().equals(".project"))) {
+ files.add(resources[i]);
}
}
- return null;
+ return (ICVSRemoteFile[]) files.toArray(new ICVSRemoteFile[files.size()]);
}
/**
* Add the given branch tags to the list of known tags for the given

Back to the top