# HG changeset patch
# User Pavel.Sher
# Date 1216050256 -14400
# Node ID 56e7f34ca8879f297eca94fe1d019593615ce587
# Parent a530ea876f55030039b0e80a0708d4c32b1feb73
added TeamCity libs, fix tests
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/lib/jmock-SNAPSHOT.jar
Binary file mercurial-tests/lib/jmock-SNAPSHOT.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/lib/junit-3.8.1.jar
Binary file mercurial-tests/lib/junit-3.8.1.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/lib/patches-tests.jar
Binary file mercurial-tests/lib/patches-tests.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/lib/test.jar
Binary file mercurial-tests/lib/test.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/lib/testng-5.7-jdk15.jar
Binary file mercurial-tests/lib/testng-5.7-jdk15.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/mercurial-tests.iml
--- a/mercurial-tests/mercurial-tests.iml Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial-tests/mercurial-tests.iml Mon Jul 14 19:44:16 2008 +0400
@@ -9,14 +9,10 @@
-
-
-
-
+
-
-
-
+
+
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Mon Jul 14 19:44:16 2008 +0400
@@ -1,10 +1,5 @@
package jetbrains.buildServer.buildTriggers.vcs.mercurial;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import jetbrains.buildServer.MockSupport;
import jetbrains.buildServer.TempFiles;
import jetbrains.buildServer.serverSide.ServerPaths;
import jetbrains.buildServer.vcs.*;
@@ -16,6 +11,11 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
@Test
public class MercurialVcsSupportTest extends PatchTestCase {
private MercurialVcsSupport myVcs;
@@ -43,13 +43,13 @@
return "mercurial-tests/testData";
}
- public void testGetCurrentVersion() throws VcsException {
+ public void testGetCurrentVersion() throws Exception {
VcsRootImpl vcsRoot = createVcsRoot();
assertEquals("5:1d2cc6f3bc29", myVcs.getCurrentVersion(vcsRoot));
}
- public void testUpdateWorkingDir() throws VcsException {
+ public void testUpdateWorkingDir() throws Exception {
VcsRootImpl vcsRoot = createVcsRoot();
myVcs.getCurrentVersion(vcsRoot);
@@ -57,7 +57,7 @@
assertEquals(3, changes.size());
}
- public void testCollectChanges() throws VcsException {
+ public void testCollectChanges() throws Exception {
VcsRootImpl vcsRoot = createVcsRoot();
List changes = myVcs.collectBuildChanges(vcsRoot, "0:9875b412a788", "3:9522278aa38d", new CheckoutRules(""));
@@ -88,7 +88,7 @@
assertEquals("dir1/file4.txt", normalizePath(files3.get(0).getRelativeFileName()));
}
- public void testCollectChangesWithCheckoutRules() throws VcsException {
+ public void testCollectChangesWithCheckoutRules() throws Exception {
VcsRootImpl vcsRoot = createVcsRoot();
List changes = myVcs.collectBuildChanges(vcsRoot, "0:9875b412a788", "3:9522278aa38d", new CheckoutRules("-:.\n+:dir1/subdir"));
@@ -130,10 +130,11 @@
return path.replace(File.separatorChar, '/');
}
- private VcsRootImpl createVcsRoot() {
+ private VcsRootImpl createVcsRoot() throws IOException {
VcsRootImpl vcsRoot = new VcsRootImpl(1, myVcs.getName());
vcsRoot.addProperty(Constants.HG_COMMAND_PATH_PROP, "mercurial-tests/testData/bin/hg.exe");
- vcsRoot.addProperty(Constants.REPOSITORY_PROP, "mercurial-tests/testData/rep1");
+ File repository = LocalRepositoryUtil.prepareRepository(new File("mercurial-tests/testData/rep1").getAbsolutePath());
+ vcsRoot.addProperty(Constants.REPOSITORY_PROP, repository.getAbsolutePath());
return vcsRoot;
}
}
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/BaseCommandTestCase.java
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/BaseCommandTestCase.java Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/BaseCommandTestCase.java Mon Jul 14 19:44:16 2008 +0400
@@ -1,11 +1,13 @@
package jetbrains.buildServer.buildTriggers.vcs.mercurial.command;
+import jetbrains.buildServer.BaseTestCase;
+import jetbrains.buildServer.TempFiles;
+import jetbrains.buildServer.buildTriggers.vcs.mercurial.LocalRepositoryUtil;
+import jetbrains.buildServer.vcs.VcsException;
+import org.jetbrains.annotations.NotNull;
+
import java.io.File;
import java.io.IOException;
-import jetbrains.buildServer.BaseTestCase;
-import jetbrains.buildServer.TempFiles;
-import jetbrains.buildServer.vcs.VcsException;
-import org.jetbrains.annotations.NotNull;
public class BaseCommandTestCase extends BaseTestCase {
private String myRepository;
@@ -17,7 +19,8 @@
protected T runCommand(CommandExecutor executor) throws IOException, VcsException {
final Settings settings = new Settings();
settings.setHgCommandPath("mercurial-tests/testData/bin/hg.exe");
- settings.setRepository(new File(myRepository).getAbsolutePath());
+ File repository = LocalRepositoryUtil.prepareRepository(new File(myRepository).getAbsolutePath());
+ settings.setRepository(repository.getAbsolutePath());
TempFiles tf = new TempFiles();
File parentDir = tf.createTempDir();
settings.setWorkingDir(new File(parentDir, "rep").getAbsolutePath());
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/00changelog.i
Binary file mercurial-tests/testData/rep1/hg/00changelog.i has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/branch.cache
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/rep1/hg/branch.cache Mon Jul 14 19:44:16 2008 +0400
@@ -0,0 +1,2 @@
+1d2cc6f3bc29b996373c0335d0cefe7e303fc59a 5
+1d2cc6f3bc29b996373c0335d0cefe7e303fc59a default
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/requires
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/rep1/hg/requires Mon Jul 14 19:44:16 2008 +0400
@@ -0,0 +1,2 @@
+revlogv1
+store
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/store/00changelog.i
Binary file mercurial-tests/testData/rep1/hg/store/00changelog.i has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/store/00manifest.i
Binary file mercurial-tests/testData/rep1/hg/store/00manifest.i has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/store/data/dir1/file1.txt.i
Binary file mercurial-tests/testData/rep1/hg/store/data/dir1/file1.txt.i has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/store/data/dir1/file3.txt.i
Binary file mercurial-tests/testData/rep1/hg/store/data/dir1/file3.txt.i has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/store/data/dir1/file4.txt.i
Binary file mercurial-tests/testData/rep1/hg/store/data/dir1/file4.txt.i has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/store/data/dir1/subdir/file2.txt.i
Binary file mercurial-tests/testData/rep1/hg/store/data/dir1/subdir/file2.txt.i has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/store/undo
Binary file mercurial-tests/testData/rep1/hg/store/undo has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial-tests/testData/rep1/hg/undo.branch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/rep1/hg/undo.branch Mon Jul 14 19:44:16 2008 +0400
@@ -0,0 +1,1 @@
+default
\ No newline at end of file
diff -r a530ea876f55 -r 56e7f34ca887 mercurial.ipr
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial.ipr Mon Jul 14 19:44:16 2008 +0400
@@ -0,0 +1,564 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/annotations.jar
Binary file mercurial/lib/annotations.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/common.jar
Binary file mercurial/lib/common.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/log4j-1.2.12.jar
Binary file mercurial/lib/log4j-1.2.12.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/openapi.jar
Binary file mercurial/lib/openapi.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/patches-impl.jar
Binary file mercurial/lib/patches-impl.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/patches.jar
Binary file mercurial/lib/patches.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/server-model.jar
Binary file mercurial/lib/server-model.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/server-openapi.jar
Binary file mercurial/lib/server-openapi.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/src/openApi-source.jar
Binary file mercurial/lib/src/openApi-source.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/trove4j.jar
Binary file mercurial/lib/trove4j.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/util.jar
Binary file mercurial/lib/util.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/utils.jar
Binary file mercurial/lib/utils.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/lib/web-openapi.jar
Binary file mercurial/lib/web-openapi.jar has changed
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/mercurial.iml
--- a/mercurial/mercurial.iml Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial/mercurial.iml Mon Jul 14 19:44:16 2008 +0400
@@ -18,6 +18,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -30,10 +54,6 @@
-
-
-
-
@@ -70,10 +90,6 @@
-
-
-
-
@@ -82,10 +98,6 @@
-
-
-
-
@@ -118,10 +130,6 @@
-
-
-
-
@@ -151,11 +159,6 @@
-
- jar://$APPLICATION_HOME_DIR$/lib/j2ee.jar!/
-
-
-
jar://$MODULE_DIR$/../web/lib/jstl.jar!/
@@ -167,6 +170,15 @@
+
+
+
+
+
+
+
+
+
@@ -176,21 +188,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java
--- a/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java Mon Jul 14 19:44:16 2008 +0400
@@ -1,10 +1,5 @@
package jetbrains.buildServer.buildTriggers.vcs.mercurial;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.*;
import jetbrains.buildServer.CollectChangesByIncludeRule;
import jetbrains.buildServer.Used;
import jetbrains.buildServer.buildTriggers.vcs.AbstractVcsPropertiesProcessor;
@@ -19,6 +14,12 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.*;
+
public class MercurialVcsSupport extends VcsSupport implements CollectChangesByIncludeRule {
private ServerPaths myServerPaths;
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CatCommand.java
--- a/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CatCommand.java Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CatCommand.java Mon Jul 14 19:44:16 2008 +0400
@@ -1,15 +1,15 @@
package jetbrains.buildServer.buildTriggers.vcs.mercurial.command;
import com.intellij.execution.configurations.GeneralCommandLine;
-import java.io.File;
-import java.io.IOException;
-import java.util.List;
-import jetbrains.buildServer.ExecResult;
import jetbrains.buildServer.SimpleCommandLineProcessRunner;
import jetbrains.buildServer.util.FileUtil;
import jetbrains.buildServer.vcs.VcsException;
import org.jetbrains.annotations.NotNull;
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
public class CatCommand {
private Settings mySettings;
private String myRevId;
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/ChangeSet.java
--- a/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/ChangeSet.java Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/ChangeSet.java Mon Jul 14 19:44:16 2008 +0400
@@ -1,7 +1,8 @@
package jetbrains.buildServer.buildTriggers.vcs.mercurial.command;
+import org.jetbrains.annotations.NotNull;
+
import java.util.Date;
-import org.jetbrains.annotations.NotNull;
public class ChangeSet {
private int myRevNumber;
diff -r a530ea876f55 -r 56e7f34ca887 mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java
--- a/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java Mon Jul 14 18:22:05 2008 +0400
+++ b/mercurial/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/command/CloneCommand.java Mon Jul 14 19:44:16 2008 +0400
@@ -1,12 +1,13 @@
package jetbrains.buildServer.buildTriggers.vcs.mercurial.command;
import com.intellij.execution.configurations.GeneralCommandLine;
-import java.io.File;
+import jetbrains.buildServer.ExecResult;
import jetbrains.buildServer.SimpleCommandLineProcessRunner;
-import jetbrains.buildServer.ExecResult;
import jetbrains.buildServer.vcs.VcsException;
import org.jetbrains.annotations.NotNull;
+import java.io.File;
+
public class CloneCommand {
private Settings mySettings;
private String myDestDir;