subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1664613 - in /subversion/trunk/subversion/bindings/javahl: native/JNIUtil.cpp tests/org/apache/subversion/javahl/BasicTests.java tests/org/apache/subversion/javahl/SVNRemoteTests.java tests/org/apache/subversion/javahl/UtilTests.java
Date Fri, 06 Mar 2015 13:19:16 GMT
Author: rhuijben
Date: Fri Mar  6 13:19:16 2015
New Revision: 1664613

URL: http://svn.apache.org/r1664613
Log:
For now revert r1664609.

* subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
* subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
* subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
* subversion/bindings/javahl/native/JNIUtil.cpp
  Revert to pre r1664609 change.

Modified:
    subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
    subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java

Modified: subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1664613&r1=1664612&r2=1664613&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/JNIUtil.cpp Fri Mar  6 13:19:16 2015
@@ -435,24 +435,19 @@ ErrorMessageStack assemble_error_message
 {
   // buffer for a single error message
   char errbuf[1024];
+  apr_status_t parent_apr_err = 0;
   ErrorMessageStack message_stack;
-  apr_status_t last_generic = APR_SUCCESS;
 
   /* Pretty-print the error */
   /* Note: we can also log errors here someday. */
 
-  for (; err; err = err->child)
+  for (int depth = 0; err;
+       ++depth, parent_apr_err = err->apr_err, err = err->child)
     {
-      if (err->message)
-        {
-          message_stack.push_back(
-              MessageStackItem(err->apr_err, err->message));
-        }
-      else if (err->apr_err != last_generic)
+      /* When we're recursing, don't repeat the top-level message if its
+       * the same as before. */
+      if (depth == 0 || err->apr_err != parent_apr_err)
         {
-          /* When we're recursing, don't repeat the generic message if we
-           * just showed it. */
-
           const char *message;
           /* Is this a Subversion-specific error code? */
           if ((err->apr_err > APR_OS_START_USEERR)
@@ -476,8 +471,11 @@ ErrorMessageStack assemble_error_message
 
           message_stack.push_back(
               MessageStackItem(err->apr_err, message, true));
-
-          last_generic = err->apr_err;
+        }
+      if (err->message)
+        {
+          message_stack.push_back(
+              MessageStackItem(err->apr_err, err->message));
         }
     }
 

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=1664613&r1=1664612&r2=1664613&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
Fri Mar  6 13:19:16 2015
@@ -1344,9 +1344,10 @@ public class BasicTests extends SVNTests
         assertNotNull("Commit of partial move did not fail", caught);
 
         List<ClientException.ErrorMessage> msgs = caught.getAllMessages();
-        assertTrue(msgs.size() >= 2);
-        assertTrue(msgs.get(0).getMessage().startsWith("Commit failed"));
-        assertTrue(msgs.get(1).getMessage().startsWith("Cannot commit"));
+        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"));
     }
 
     /**

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1664613&r1=1664612&r2=1664613&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
Fri Mar  6 13:19:16 2015
@@ -963,8 +963,8 @@ public class SVNRemoteTests extends SVNT
                            0, false, false, false, null,
                            receiver);
         } catch (ClientException ex) {
-            assertTrue(ex.getAllMessages().get(0).getMessage().startsWith(
-                       "File not found"));
+            assertEquals("Filesystem has no item",
+                         ex.getAllMessages().get(0).getMessage());
             exception = true;
         }
 

Modified: subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java?rev=1664613&r1=1664612&r2=1664613&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
(original)
+++ subversion/trunk/subversion/bindings/javahl/tests/org/apache/subversion/javahl/UtilTests.java
Fri Mar  6 13:19:16 2015
@@ -176,8 +176,8 @@ public class UtilTests extends SVNTests
                         "propcheck.file", NodeKind.file,
                         "text/plain");
         } catch (ClientException ex) {
-            assertTrue(ex.getAllMessages().get(0).getMessage().startsWith(
-                       "Unrecognized line ending style"));
+            assertEquals("Unrecognized line ending style",
+                         ex.getAllMessages().get(0).getMessage());
             caught_exception = true;
         }
         assertTrue(caught_exception);
@@ -194,7 +194,7 @@ public class UtilTests extends SVNTests
                         "text/plain", new FileInputStream(temp));
         } catch (ClientException ex) {
             assertEquals("Inconsistent line ending style",
-                         ex.getAllMessages().get(1).getMessage());
+                         ex.getAllMessages().get(2).getMessage());
             caught_exception = true;
         }
         assertTrue(caught_exception);



Mime
View raw message