You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/03/19 19:24:20 UTC

svn commit: r1667842 - in /subversion/branches/1.9.x: ./ STATUS subversion/include/svn_error_codes.h subversion/libsvn_ra_serf/util.c

Author: svn-role
Date: Thu Mar 19 18:24:20 2015
New Revision: 1667842

URL: http://svn.apache.org/r1667842
Log:
Merge the r1665195 group from trunk:

 * r1665195, r1666096, r1666379
   Produce an easier to understand error when a server sends a HTTP 405 code
   Justification:
     Just reporting out of date doesn't hint a user that he should
     switch/relocate to the location where he is allowed to commit.
   Votes:
     +1: rhuijben, brane, stefan2

Modified:
    subversion/branches/1.9.x/   (props changed)
    subversion/branches/1.9.x/STATUS
    subversion/branches/1.9.x/subversion/include/svn_error_codes.h
    subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c

Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 19 18:24:20 2015
@@ -89,4 +89,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664997,1665164,1665611-1665612,1665845,1665850,1665852,1665886,1666270,1666272,1666690,1666851
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664997,1665164,1665195,1665611-1665612,1665845,1665850,1665852,1665886,1666096,1666270,1666272,1666379,1666690,1666851

Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1667842&r1=1667841&r2=1667842&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Thu Mar 19 18:24:20 2015
@@ -178,14 +178,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1665195, r1666096, r1666379
-   Produce an easier to understand error when a server sends a HTTP 405 code
-   Justification:
-     Just reporting out of date doesn't hint a user that he should
-     switch/relocate to the location where he is allowed to commit.
-   Votes:
-     +1: rhuijben, brane, stefan2
-
  * r1665437, r1665896, r1666449, r1667106
    Fixes to the public FS API declarations and documentation.
    Justification:

Modified: subversion/branches/1.9.x/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_error_codes.h?rev=1667842&r1=1667841&r2=1667842&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_error_codes.h Thu Mar 19 18:24:20 2015
@@ -1066,6 +1066,11 @@ SVN_ERROR_START
              SVN_ERR_RA_DAV_CATEGORY_START + 14,
              "The server state conflicts with the requested preconditions")
 
+  /** @since New in 1.9 */
+  SVN_ERRDEF(SVN_ERR_RA_DAV_METHOD_NOT_ALLOWED,
+             SVN_ERR_RA_DAV_CATEGORY_START + 15,
+             "The URL doesn't allow the requested method")
+
   /* ra_local errors */
 
   SVN_ERRDEF(SVN_ERR_RA_LOCAL_REPOS_NOT_FOUND,
@@ -1590,11 +1595,14 @@ SVN_ERROR_START
              "Diff data source modified unexpectedly")
 
   /* libsvn_ra_serf errors */
-  /** @since New in 1.5. */
+  /** @since New in 1.5.
+      @deprecated SSPI now handled by serf rather than libsvn_ra_serf. */
   SVN_ERRDEF(SVN_ERR_RA_SERF_SSPI_INITIALISATION_FAILED,
              SVN_ERR_RA_SERF_CATEGORY_START + 0,
              "Initialization of SSPI library failed")
-  /** @since New in 1.5. */
+  /** @since New in 1.5.
+      @deprecated Certificate verification now handled by serf rather
+                  than libsvn_ra_serf. */
   SVN_ERRDEF(SVN_ERR_RA_SERF_SSL_CERT_UNTRUSTED,
              SVN_ERR_RA_SERF_CATEGORY_START + 1,
              "Server SSL certificate untrusted")

Modified: subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c?rev=1667842&r1=1667841&r2=1667842&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_ra_serf/util.c Thu Mar 19 18:24:20 2015
@@ -1762,8 +1762,9 @@ svn_ra_serf__error_on_status(serf_status
         return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
                                  _("'%s' path not found"), path);
       case 405:
-        return svn_error_createf(SVN_ERR_FS_OUT_OF_DATE, NULL,
-                                 _("'%s' is out of date"), path);
+        return svn_error_createf(SVN_ERR_RA_DAV_METHOD_NOT_ALLOWED, NULL,
+                                 _("HTTP method is not allowed on '%s'"),
+                                 path);
       case 409:
         return svn_error_createf(SVN_ERR_FS_CONFLICT, NULL,
                                  _("'%s' conflicts"), path);
@@ -1802,9 +1803,10 @@ svn_error_t *
 svn_ra_serf__unexpected_status(svn_ra_serf__handler_t *handler)
 {
   /* Is it a standard error status? */
-  SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
-                                       handler->path,
-                                       handler->location));
+  if (handler->sline.code != 405)
+    SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
+                                         handler->path,
+                                         handler->location));
 
   switch (handler->sline.code)
     {
@@ -1817,6 +1819,11 @@ svn_ra_serf__unexpected_status(svn_ra_se
                                  _("Path '%s' already exists"),
                                  handler->path);
 
+      case 405:
+        return svn_error_createf(SVN_ERR_RA_DAV_METHOD_NOT_ALLOWED, NULL,
+                                 _("The HTTP method '%s' is not allowed"
+                                   " on '%s'"),
+                                 handler->method, handler->path);
       default:
         return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
                                  _("Unexpected HTTP status %d '%s' on '%s' "