You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/28 13:28:38 UTC
svn commit: r1536328 - in
/subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl: ./
README native/OperationContext.cpp
tests/org/apache/subversion/javahl/BasicTests.java
tests/org/apache/subversion/javahl/UtilTests.java
Author: brane
Date: Mon Oct 28 12:28:38 2013
New Revision: 1536328
URL: http://svn.apache.org/r1536328
Log:
On the javahl-1.8-extensions branch: Sync JavaHL with trunk up to r1536324.
Modified:
subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/ (props changed)
subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/README
subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/native/OperationContext.cpp
subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
Propchange: subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/bindings/javahl:r1534961-1536324
Modified: subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/README
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/README?rev=1536328&r1=1536327&r2=1536328&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/README (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/README Mon Oct 28 12:28:38 2013
@@ -33,10 +33,9 @@ javahl build javahl
install-javahl install javahl
check-javahl run javahl tests
-(In order to run check-javahl, you must have already installed JavaHL,
-and you must have specified a path to a JUnit jar file with
---with-junit when running configure; JUnit version 3.8.1 has been
-tested. JUnit can be downloaded from http://junit.sf.net/ .)
+(In order to run check-javahl, you must have specified a path to a JUnit
+jar file with --with-junit when running configure; JUnit version 3.8.1
+has been tested. JUnit can be downloaded from http://junit.org/ .)
MacOS X:
Modified: subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/native/OperationContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/native/OperationContext.cpp?rev=1536328&r1=1536327&r2=1536328&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/native/OperationContext.cpp (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/native/OperationContext.cpp Mon Oct 28 12:28:38 2013
@@ -147,10 +147,10 @@ OperationContext::getAuthBaton(SVN::Pool
/* Use the prompter (if available) to prompt for password and cert
* caching. */
- svn_auth_plaintext_prompt_func_t plaintext_prompt_func = NULL;
- void *plaintext_prompt_baton = NULL;
+ svn_auth_plaintext_prompt_func_t plaintext_prompt_func;
+ void *plaintext_prompt_baton;
svn_auth_plaintext_passphrase_prompt_func_t plaintext_passphrase_prompt_func;
- void *plaintext_passphrase_prompt_baton = NULL;
+ void *plaintext_passphrase_prompt_baton;
if (m_prompter != NULL)
{
@@ -159,6 +159,13 @@ OperationContext::getAuthBaton(SVN::Pool
plaintext_passphrase_prompt_func = Prompter::plaintext_passphrase_prompt;
plaintext_passphrase_prompt_baton = m_prompter;
}
+ else
+ {
+ plaintext_prompt_func = NULL;
+ plaintext_prompt_baton = NULL;
+ plaintext_passphrase_prompt_func = NULL;
+ plaintext_passphrase_prompt_baton = NULL;
+ }
/* The main disk-caching auth providers, for both
* 'username/password' creds and 'username' creds. */
Modified: subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1536328&r1=1536327&r2=1536328&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java Mon Oct 28 12:28:38 2013
@@ -1055,6 +1055,37 @@ public class BasicTests extends SVNTests
}
/**
+ * Check that half a move cannot be committed.
+ * @since 1.9
+ */
+ public void testCommitPartialMove() throws Throwable
+ {
+ OneTest thisTest = new OneTest();
+ String root = thisTest.getWorkingCopy().getAbsolutePath();
+ ClientException caught = null;
+
+ Set<String> srcPaths = new HashSet<String>(1);
+ srcPaths.add(root + "/A/B/E/alpha");
+ client.move(srcPaths, root + "/moved-alpha",
+ false, false, false, false, false, null, null, null);
+
+ try {
+ client.commit(srcPaths, Depth.infinity, false, false, null, null,
+ new ConstMsg("Commit half of a move"), null);
+ } catch (ClientException ex) {
+ caught = ex;
+ }
+
+ assertNotNull("Commit of partial move did not fail", caught);
+
+ List<ClientException.ErrorMessage> msgs = caught.getAllMessages();
+ assertTrue(msgs.size() >= 3);
+ assertTrue(msgs.get(0).getMessage().startsWith("Illegal target"));
+ assertTrue(msgs.get(1).getMessage().startsWith("Commit failed"));
+ assertTrue(msgs.get(2).getMessage().startsWith("Cannot commit"));
+ }
+
+ /**
* Assert that the first merge source suggested for
* <code>destPath</code> at {@link Revision#WORKING} and {@link
* Revision#HEAD} is equivalent to <code>expectedSrc</code>.
Modified: subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java?rev=1536328&r1=1536327&r2=1536328&view=diff
==============================================================================
--- subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java (original)
+++ subversion/branches/javahl-1.8-extensions/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java Mon Oct 28 12:28:38 2013
@@ -28,8 +28,6 @@ import java.io.FileOutputStream;
import java.io.ByteArrayOutputStream;
import java.util.Arrays;
-import org.junit.Assert;
-
/**
* Tests the JavaHL SVNUtil APIs.
*/
@@ -100,7 +98,7 @@ public class UtilTests extends SVNTests
"-original\n" +
"+modified\n" +
" \n N-3\n N-2\n").getBytes();
- Assert.assertArrayEquals(expected, result.toByteArray());
+ assertTrue(Arrays.equals(expected, result.toByteArray()));
}
public void testFileMerge() throws Throwable
@@ -135,6 +133,6 @@ public class UtilTests extends SVNTests
"latest\n" +
">>>>>>> local\n" +
"\nN-3\nN-2\nN-1\nN\n").getBytes();
- Assert.assertArrayEquals(expected, result.toByteArray());
+ assertTrue(Arrays.equals(expected, result.toByteArray()));
}
}