# HG changeset patch
# User Pavel.Sher
# Date 1218444961 -14400
# Node ID 6a535d51079a8db8d95069bc02cfdb14e58f387f
# Parent ff95d2f521a2aa3d87dc4872aa3e9838c5121661
new test
diff -r ff95d2f521a2 -r 6a535d51079a main.iml
--- a/main.iml Tue Aug 05 18:45:29 2008 +0400
+++ b/main.iml Mon Aug 11 12:56:01 2008 +0400
@@ -9,7 +9,6 @@
-
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-agent/mercurial-agent.iml
--- a/mercurial-agent/mercurial-agent.iml Tue Aug 05 18:45:29 2008 +0400
+++ b/mercurial-agent/mercurial-agent.iml Mon Aug 11 12:56:01 2008 +0400
@@ -10,7 +10,6 @@
-
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-common/mercurial-common.iml
--- a/mercurial-common/mercurial-common.iml Tue Aug 05 18:45:29 2008 +0400
+++ b/mercurial-common/mercurial-common.iml Mon Aug 11 12:56:01 2008 +0400
@@ -10,7 +10,6 @@
-
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-server/mercurial-server.iml
--- a/mercurial-server/mercurial-server.iml Tue Aug 05 18:45:29 2008 +0400
+++ b/mercurial-server/mercurial-server.iml Mon Aug 11 12:56:01 2008 +0400
@@ -27,7 +27,6 @@
-
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/mercurial-tests.iml
--- a/mercurial-tests/mercurial-tests.iml Tue Aug 05 18:45:29 2008 +0400
+++ b/mercurial-tests/mercurial-tests.iml Mon Aug 11 12:56:01 2008 +0400
@@ -16,7 +16,6 @@
-
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/LocalRepositoryUtil.java
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/LocalRepositoryUtil.java Tue Aug 05 18:45:29 2008 +0400
+++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/LocalRepositoryUtil.java Mon Aug 11 12:56:01 2008 +0400
@@ -44,7 +44,9 @@
if (repository != null) return repository;
final File tempDir = myTempFiles.createTempDir();
FileUtil.copyDir(new File(repPath), tempDir);
- FileUtil.rename(new File(tempDir, "hg"), new File(tempDir, ".hg"));
+ if (new File(tempDir, "hg").isDirectory()) {
+ FileUtil.rename(new File(tempDir, "hg"), new File(tempDir, ".hg"));
+ }
myRepositories.put(repPath, tempDir);
return tempDir;
}
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Tue Aug 05 18:45:29 2008 +0400
+++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java Mon Aug 11 12:56:01 2008 +0400
@@ -130,6 +130,19 @@
checkPatchResult(output.toByteArray());
}
+ public void testBuildIncrementalPatch_FileWithSpaceInChangeSet() throws IOException, VcsException {
+ setName("patch2");
+ VcsRootImpl vcsRoot = createVcsRoot();
+
+ final ByteArrayOutputStream output = new ByteArrayOutputStream();
+ final PatchBuilderImpl builder = new PatchBuilderImpl(output);
+
+ myVcs.buildPatch(vcsRoot, "3:9522278aa38d", "6:b9deb9a1c6f4", builder, new CheckoutRules(""));
+ builder.close();
+
+ checkPatchResult(output.toByteArray());
+ }
+
public void testGetContent() throws IOException, VcsException {
VcsRootImpl vcsRoot = createVcsRoot();
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/testData/patch2/after/dir with space/file with space.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/patch2/after/dir with space/file with space.txt Mon Aug 11 12:56:01 2008 +0400
@@ -0,0 +1,1 @@
+some text
\ No newline at end of file
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/testData/patch2/after/dir1/file1.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/patch2/after/dir1/file1.txt Mon Aug 11 12:56:01 2008 +0400
@@ -0,0 +1,1 @@
+aaa
\ No newline at end of file
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/testData/patch2/after/dir1/file3.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/patch2/after/dir1/file3.txt Mon Aug 11 12:56:01 2008 +0400
@@ -0,0 +1,2 @@
+ccc
+ddd
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/testData/patch2/after/dir1/subdir/file2.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/patch2/after/dir1/subdir/file2.txt Mon Aug 11 12:56:01 2008 +0400
@@ -0,0 +1,2 @@
+modified
+bbb
\ No newline at end of file
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/testData/patch2/before/dir1/file1.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/patch2/before/dir1/file1.txt Mon Aug 11 12:56:01 2008 +0400
@@ -0,0 +1,1 @@
+aaa
\ No newline at end of file
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/testData/patch2/before/dir1/file3.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/patch2/before/dir1/file3.txt Mon Aug 11 12:56:01 2008 +0400
@@ -0,0 +1,1 @@
+ccc
\ No newline at end of file
diff -r ff95d2f521a2 -r 6a535d51079a mercurial-tests/testData/patch2/before/dir1/subdir/file2.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial-tests/testData/patch2/before/dir1/subdir/file2.txt Mon Aug 11 12:56:01 2008 +0400
@@ -0,0 +1,1 @@
+bbb
\ No newline at end of file