Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-05-04 14:28:34 -0400
committerMichael Valenta2004-05-04 14:28:34 -0400
commit18d5ed57be3aee1b5933bf62d30c718b40fac80d (patch)
treec044fc83a76e2bf6e408cc77637db4e65a8ebf06
parent0da3050e6a660690866ffda2978170acb0e02dfd (diff)
downloadeclipse.platform.team-18d5ed57be3aee1b5933bf62d30c718b40fac80d.tar.gz
eclipse.platform.team-18d5ed57be3aee1b5933bf62d30c718b40fac80d.tar.xz
eclipse.platform.team-18d5ed57be3aee1b5933bf62d30c718b40fac80d.zip
Fixes for test cases
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java5
3 files changed, 9 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java
index 2af0e6d00..05df19b62 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/BranchOperation.java
@@ -52,6 +52,12 @@ public class BranchOperation extends RepositoryProviderOperation {
super(part, resources);
}
+ public void setTags(CVSTag rootVersionTag, CVSTag branchTag, boolean updateToBranch) {
+ this.rootVersionTag = rootVersionTag;
+ this.branchTag = branchTag;
+ this.update = updateToBranch;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.TeamOperation#shouldRun()
*/
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
index 605082e83..6bc819f9d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
@@ -388,7 +388,7 @@ public abstract class CheckoutProjectOperation extends CheckoutOperation {
// There is no custom location. However, still prompt
// if the project directory in the workspace directory
// would be overwritten.
- if (!project.exists() || project.getDescription().getLocation() != null) {
+ if (!project.exists() || !project.isOpen() || project.getDescription().getLocation() != null) {
localLocation = getFileLocation(project);
}
} catch (CoreException e) {
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
index aa75eb0dd..c052f739c 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/EclipseTest.java
@@ -288,9 +288,8 @@ public class EclipseTest extends EclipseWorkspaceTest {
}
}
public void makeBranch(IResource[] resources, CVSTag version, CVSTag branch, boolean update) throws CVSException {
- BranchOperation op = new BranchOperation(null, resources) {
-
- };
+ BranchOperation op = new BranchOperation(null, resources);
+ op.setTags(version, branch, update);
executeHeadless(op);
}
/**

Back to the top