Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-02-08 17:20:22 +0000
committerMichael Valenta2002-02-08 17:20:22 +0000
commit080db4a434c6723fc722a456693c90665700fef7 (patch)
tree463a1695e3118ed98991bc988a54538fff7a60fc
parent829f8833844a628352f75e1eb65cc1fc7b74019f (diff)
downloadeclipse.platform.team-080db4a434c6723fc722a456693c90665700fef7.tar.gz
eclipse.platform.team-080db4a434c6723fc722a456693c90665700fef7.tar.xz
eclipse.platform.team-080db4a434c6723fc722a456693c90665700fef7.zip
*** empty log message ***
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java9
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java6
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java1
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java1
4 files changed, 17 insertions, 0 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java
index f3d588b95..231ef9469 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/BasicTest.java
@@ -33,6 +33,7 @@ public class BasicTest extends JUnitTestCase {
public static Test suite() {
TestSuite suite = new TestSuite(BasicTest.class);
return new CompatibleTestSetup(suite);
+ //return new CompatibleTestSetup(new BasicTest("testBranchingWithLocalChanges"));
}
public void setUp() throws Exception {
env1.setUp();
@@ -228,7 +229,15 @@ public class BasicTest extends JUnitTestCase {
env2.execute("ci",new String[]{"-m","branch"},new String[]{"proj2"});
env2.deleteFile("proj2");
env2.execute("co",new String[]{"-r","tag2"},new String[]{"proj2"});
+ }
+ public void testBranchingWithLocalChanges() throws Exception {
+ // Try to branch of a workspace with local changes
+ env1.execute("co",EMPTY_ARGS,new String[]{"proj2"});
+ JUnitTestCase.waitMsec(1500);
+ env1.appendToFile("proj2/f1/b.txt","AppendIt");
+ env1.execute("tag",new String[]{"-b"},new String[]{"branch-with-changes","proj2"});
+ env1.execute("update",new String[]{"-r", "branch-with-changes"},new String[]{"proj2"});
}
public void testTag() throws Exception {
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java
index c016ed441..d63e80442 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/compatible/CompatibleTestSetup.java
@@ -4,6 +4,7 @@ package org.eclipse.team.tests.ccvs.core.compatible;
* All Rights Reserved.
*/
import junit.framework.Test;
+import org.eclipse.team.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
@@ -31,9 +32,14 @@ public class CompatibleTestSetup extends CVSTestSetup {
* For compatibility testing, we need to set up two repositories
*/
public void setUp() throws CVSException {
+ CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(false);
if ((referenceClientRepository != null) && (eclipseClientRepository != null))
return;
referenceClientRepository = setupRepository(REFERENCE_CLIENT_REPOSITORY);
eclipseClientRepository = setupRepository(ECLIPSE_CLIENT_REPOSITORY);
}
+
+ public void tearDown() throws CVSException {
+ CVSProviderPlugin.getPlugin().setPruneEmptyDirectories(true);
+ }
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java
index ccbf96c41..662fc3326 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/RemoteResourceTest.java
@@ -208,6 +208,7 @@ public class RemoteResourceTest extends EclipseTest {
// Create a project with an empty file
IProject project = createProject("testEmptyFile", new String[] { "file.txt"});
IFile file = project.getFile("file.txt");
+ JUnitTestCase.waitMsec(1500);
file.setContents(new ByteArrayInputStream(new byte[0]), false, false, DEFAULT_MONITOR);
commitResources(project, new String[] {"file.txt"});
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java
index 5fb3cbe59..21dc6569b 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/provider/SyncElementTest.java
@@ -290,6 +290,7 @@ public class SyncElementTest extends EclipseTest {
JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
appendText(file, "\npostfix", false); // This will test merges (M)
file = project.getFile("folder1/a.txt");
+ JUnitTestCase.waitMsec(1500); // Wait so that timestamp of modified file differs from original
file.setContents(getRandomContents(), false, false, null); // This will test conflicts (C)
// Get the sync tree for the project

Back to the top