You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/12/28 17:06:33 UTC

svn commit: r1553859 - in /subversion/trunk/subversion/mod_dav_svn: ./ reports/

Author: rhuijben
Date: Sat Dec 28 16:06:32 2013
New Revision: 1553859

URL: http://svn.apache.org/r1553859
Log:
Rename the common mod_dav_svn error creation function to declare that it
makes Subversion specific errors. Also remove two arguments that must remain
constant in order not to break libsvn_ra_neon compatibility.

* subversion/mod_dav_svn/dav_svn.h
  (dav_svn__new_error_tag): Rename to ...
  (dav_svn__new_error_svn): ... this and remove tag specifiers as they must
    remain constant anyway (at least without client knowledge).

* subversion/mod_dav_svn/reports/deleted-rev.c
* subversion/mod_dav_svn/reports/file-revs.c
* subversion/mod_dav_svn/reports/get-location-segments.c
* subversion/mod_dav_svn/reports/get-locations.c
* subversion/mod_dav_svn/reports/inherited-props.c
* subversion/mod_dav_svn/reports/log.c
* subversion/mod_dav_svn/reports/mergeinfo.c
* subversion/mod_dav_svn/reports/replay.c
* subversion/mod_dav_svn/reports/update.c
* subversion/mod_dav_svn/repos.c
* subversion/mod_dav_svn/util.c
* subversion/mod_dav_svn/version.c
  Update all usages. Removing final '.' from errors when applicable.

Modified:
    subversion/trunk/subversion/mod_dav_svn/dav_svn.h
    subversion/trunk/subversion/mod_dav_svn/reports/deleted-rev.c
    subversion/trunk/subversion/mod_dav_svn/reports/file-revs.c
    subversion/trunk/subversion/mod_dav_svn/reports/get-location-segments.c
    subversion/trunk/subversion/mod_dav_svn/reports/get-locations.c
    subversion/trunk/subversion/mod_dav_svn/reports/inherited-props.c
    subversion/trunk/subversion/mod_dav_svn/reports/log.c
    subversion/trunk/subversion/mod_dav_svn/reports/mergeinfo.c
    subversion/trunk/subversion/mod_dav_svn/reports/replay.c
    subversion/trunk/subversion/mod_dav_svn/reports/update.c
    subversion/trunk/subversion/mod_dav_svn/repos.c
    subversion/trunk/subversion/mod_dav_svn/util.c
    subversion/trunk/subversion/mod_dav_svn/version.c

Modified: subversion/trunk/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/dav_svn.h?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/trunk/subversion/mod_dav_svn/dav_svn.h Sat Dec 28 16:06:32 2013
@@ -792,12 +792,10 @@ dav_svn__authz_read_func(dav_svn__authz_
    default value for the error code.
 */
 dav_error *
-dav_svn__new_error_tag(apr_pool_t *pool,
+dav_svn__new_error_svn(apr_pool_t *pool,
                        int status,
                        int error_id,
-                       const char *desc,
-                       const char *xmlns,
-                       const char *tagname);
+                       const char *desc);
 
 
 /* A wrapper around mod_dav's dav_new_error, mod_dav_svn uses this

Modified: subversion/trunk/subversion/mod_dav_svn/reports/deleted-rev.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/deleted-rev.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/deleted-rev.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/deleted-rev.c Sat Dec 28 16:06:32 2013
@@ -58,12 +58,10 @@ dav_svn__get_deleted_rev_report(const da
   /* Sanity check. */
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
-    return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                   "The request does not contain the 'svn:' "
                                   "namespace, so it is not going to have "
-                                  "certain required elements.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "certain required elements");
 
   for (child = doc->root->first_child; child != NULL; child = child->next)
     {
@@ -101,10 +99,8 @@ dav_svn__get_deleted_rev_report(const da
          && SVN_IS_VALID_REVNUM(peg_rev)
          && SVN_IS_VALID_REVNUM(end_rev)))
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
-                                    "Not all parameters passed.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+                                    "Not all parameters passed");
     }
 
   /* Do what we actually came here for: Find the rev abs_path was deleted. */

Modified: subversion/trunk/subversion/mod_dav_svn/reports/file-revs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/file-revs.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/file-revs.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/file-revs.c Sat Dec 28 16:06:32 2013
@@ -259,12 +259,10 @@ dav_svn__file_revs_report(const dav_reso
      in this namespace, so is this necessary at all? */
   if (ns == -1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                     "The request does not contain the 'svn:' "
                                     "namespace, so it is not going to have "
-                                    "certain required elements.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "certain required elements");
     }
 
   /* Get request information. */
@@ -299,10 +297,8 @@ dav_svn__file_revs_report(const dav_reso
 
   /* Check that all parameters are present and valid. */
   if (! abs_path)
-    return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
-                                  "Not all parameters passed.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+                                  "Not all parameters passed");
 
   frb.bb = apr_brigade_create(resource->pool,
                               output->c->bucket_alloc);

Modified: subversion/trunk/subversion/mod_dav_svn/reports/get-location-segments.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/get-location-segments.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/get-location-segments.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/get-location-segments.c Sat Dec 28 16:06:32 2013
@@ -126,12 +126,10 @@ dav_svn__get_location_segments_report(co
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                     "The request does not contain the 'svn:' "
                                     "namespace, so it is not going to have "
-                                    "certain required elements.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "certain required elements");
     }
 
   /* Gather the parameters. */
@@ -174,26 +172,20 @@ dav_svn__get_location_segments_report(co
 
   /* Check that all parameters are present and valid. */
   if (! abs_path)
-    return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
-                                  "Not all parameters passed.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+                                  "Not all parameters passed");
   if (SVN_IS_VALID_REVNUM(start_rev)
       && SVN_IS_VALID_REVNUM(end_rev)
       && (end_rev > start_rev))
-    return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                   "End revision must not be younger than "
-                                  "start revision",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "start revision");
   if (SVN_IS_VALID_REVNUM(peg_revision)
       && SVN_IS_VALID_REVNUM(start_rev)
       && (start_rev > peg_revision))
-    return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                   "Start revision must not be younger than "
-                                  "peg revision",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "peg revision");
 
   /* Build an authz read baton. */
   arb.r = resource->info->r;

Modified: subversion/trunk/subversion/mod_dav_svn/reports/get-locations.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/get-locations.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/get-locations.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/get-locations.c Sat Dec 28 16:06:32 2013
@@ -109,12 +109,10 @@ dav_svn__get_locations_report(const dav_
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                     "The request does not contain the 'svn:' "
                                     "namespace, so it is not going to have "
-                                    "certain required elements.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "certain required elements");
     }
 
   /* Gather the parameters. */
@@ -151,10 +149,8 @@ dav_svn__get_locations_report(const dav_
 
   /* Check that all parameters are present and valid. */
   if (! (abs_path && SVN_IS_VALID_REVNUM(peg_revision)))
-    return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
-                                  "Not all parameters passed.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
+                                  "Not all parameters passed");
 
   /* Build an authz read baton */
   arb.r = resource->info->r;

Modified: subversion/trunk/subversion/mod_dav_svn/reports/inherited-props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/inherited-props.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/inherited-props.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/inherited-props.c Sat Dec 28 16:06:32 2013
@@ -66,12 +66,10 @@ dav_svn__get_inherited_props_report(cons
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                     "The request does not contain the 'svn:' "
                                     "namespace, so it is not going to have "
-                                    "certain required elements.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "certain required elements");
     }
 
   iterpool = svn_pool_create(resource->pool);

Modified: subversion/trunk/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/log.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/log.c Sat Dec 28 16:06:32 2013
@@ -327,12 +327,10 @@ dav_svn__log_report(const dav_resource *
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                     "The request does not contain the 'svn:' "
                                     "namespace, so it is not going to have "
-                                    "certain required elements.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "certain required elements");
     }
 
   /* If this is still FALSE after the loop, we haven't seen either of

Modified: subversion/trunk/subversion/mod_dav_svn/reports/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/mergeinfo.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/mergeinfo.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/mergeinfo.c Sat Dec 28 16:06:32 2013
@@ -70,12 +70,10 @@ dav_svn__get_mergeinfo_report(const dav_
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                     "The request does not contain the 'svn:' "
                                     "namespace, so it is not going to have "
-                                    "certain required elements.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "certain required elements");
     }
 
   for (child = doc->root->first_child; child != NULL; child = child->next)

Modified: subversion/trunk/subversion/mod_dav_svn/reports/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/replay.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/replay.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/replay.c Sat Dec 28 16:06:32 2013
@@ -401,13 +401,12 @@ make_editor(const svn_delta_editor_t **e
 static dav_error *
 malformed_element_error(const char *tagname, apr_pool_t *pool)
 {
-  return dav_svn__new_error_tag(pool, HTTP_BAD_REQUEST, 0,
+  return dav_svn__new_error_svn(pool, HTTP_BAD_REQUEST, 0,
                                 apr_pstrcat(pool,
                                             "The request's '", tagname,
                                             "' element is malformed; there "
                                             "is a problem with the client.",
-                                            SVN_VA_NULL),
-                                SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
+                                            SVN_VA_NULL));
 }
 
 
@@ -456,13 +455,11 @@ dav_svn__replay_report(const dav_resourc
 
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
-    return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+    return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                   "The request does not contain the 'svn:' "
                                   "namespace, so it is not going to have an "
                                   "svn:revision element. That element is "
-                                  "required.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "required");
 
   for (child = doc->root->first_child; child != NULL; child = child->next)
     {
@@ -521,16 +518,14 @@ dav_svn__replay_report(const dav_resourc
     }
 
   if (! SVN_IS_VALID_REVNUM(rev))
-    return dav_svn__new_error_tag
+    return dav_svn__new_error_svn
              (resource->pool, HTTP_BAD_REQUEST, 0,
-              "Request was missing the revision argument.",
-              SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
+              "Request was missing the revision argument");
 
   if (! SVN_IS_VALID_REVNUM(low_water_mark))
-    return dav_svn__new_error_tag
+    return dav_svn__new_error_svn
              (resource->pool, HTTP_BAD_REQUEST, 0,
-              "Request was missing the low-water-mark argument.",
-              SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
+              "Request was missing the low-water-mark argument");
 
   if (! base_dir)
     base_dir = "";

Modified: subversion/trunk/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/update.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/update.c Sat Dec 28 16:06:32 2013
@@ -914,8 +914,7 @@ malformed_element_error(const char *tagn
                                    "' element is malformed; there "
                                    "is a problem with the client.",
                                    SVN_VA_NULL);
-  return dav_svn__new_error_tag(pool, HTTP_BAD_REQUEST, 0, errstr,
-                                SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
+  return dav_svn__new_error_svn(pool, HTTP_BAD_REQUEST, 0, errstr);
 }
 
 
@@ -999,22 +998,18 @@ dav_svn__update_report(const dav_resourc
 
   if ((resource->info->restype != DAV_SVN_RESTYPE_VCC)
       && (resource->info->restype != DAV_SVN_RESTYPE_ME))
-    return dav_svn__new_error_tag(resource->pool, HTTP_CONFLICT, 0,
+    return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT, 0,
                                   "This report can only be run against "
-                                  "a VCC or root-stub URI.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "a VCC or root-stub URI");
 
   ns = dav_svn__find_ns(doc->namespaces, SVN_XML_NAMESPACE);
   if (ns == -1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_BAD_REQUEST, 0,
+      return dav_svn__new_error_svn(resource->pool, HTTP_BAD_REQUEST, 0,
                                     "The request does not contain the 'svn:' "
                                     "namespace, so it is not going to have an "
                                     "svn:target-revision element. That element "
-                                    "is required.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "is required");
     }
 
   /* SVNAllowBulkUpdates On/Prefer: server configuration permits bulk updates
@@ -1200,12 +1195,10 @@ dav_svn__update_report(const dav_resourc
      sending a style of report that we no longer allow. */
   if (! src_path)
     {
-      return dav_svn__new_error_tag
+      return dav_svn__new_error_svn
         (resource->pool, HTTP_BAD_REQUEST, 0,
          "The request did not contain the '<src-path>' element.\n"
-         "This may indicate that your client is too old.",
-         SVN_DAV_ERROR_NAMESPACE,
-         SVN_DAV_ERROR_TAG);
+         "This may indicate that your client is too old");
     }
 
   uc.svndiff_version = resource->info->svndiff_version;

Modified: subversion/trunk/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/repos.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/repos.c Sat Dec 28 16:06:32 2013
@@ -3808,10 +3808,9 @@ copy_resource(const dav_resource *src,
                                         dst->pool));
 
       if (!serr && (strcmp(src_repos_path, dst_repos_path) != 0))
-          return dav_svn__new_error_tag(
+          return dav_svn__new_error_svn(
                 dst->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
-                "Copy source and destination are in different repositories.",
-                SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
+                "Copy source and destination are in different repositories");
     }
   else
       serr = SVN_NO_ERROR;

Modified: subversion/trunk/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/util.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/util.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/util.c Sat Dec 28 16:06:32 2013
@@ -59,26 +59,24 @@ dav_svn__new_error(apr_pool_t *pool,
   return dav_new_error(pool, status, error_id, 0, desc);
 #else
 
-  errno = 0; /* For the same reason as in dav_svn__new_error_tag */
+  errno = 0; /* For the same reason as in dav_svn__new_error_svn */
 
   return dav_new_error(pool, status, error_id, desc);
 #endif
 }
 
 dav_error *
-dav_svn__new_error_tag(apr_pool_t *pool,
+dav_svn__new_error_svn(apr_pool_t *pool,
                        int status,
                        int error_id,
-                       const char *desc,
-                       const char *xmlns,
-                       const char *tagname)
+                       const char *desc)
 {
   if (error_id == 0)
     error_id = SVN_ERR_RA_DAV_REQUEST_FAILED;
 
 #if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
   return dav_new_error_tag(pool, status, error_id, 0,
-                           desc, xmlns, tagname);
+                           desc, SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
 #else
   /* dav_new_error_tag will record errno but Subversion makes no attempt
      to ensure that it is valid.  We reset it to avoid putting incorrect
@@ -86,7 +84,8 @@ dav_svn__new_error_tag(apr_pool_t *pool,
      valid information. */
   errno = 0;
 
-  return dav_new_error_tag(pool, status, error_id, desc, namespace, tagname);
+  return dav_new_error_tag(pool, status, error_id, desc,
+                           SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
 #endif
 }
 
@@ -99,10 +98,8 @@ build_error_chain(apr_pool_t *pool, svn_
   char buffer[128];
   const char *msg = svn_err_best_message(err, buffer, sizeof(buffer));
 
-  dav_error *derr = dav_svn__new_error_tag(pool, status, err->apr_err,
-                                           apr_pstrdup(pool, msg),
-                                           SVN_DAV_ERROR_NAMESPACE,
-                                           SVN_DAV_ERROR_TAG);
+  dav_error *derr = dav_svn__new_error_svn(pool, status, err->apr_err,
+                                           apr_pstrdup(pool, msg));
 
   if (err->child)
     derr->prev = build_error_chain(pool, err->child, status);
@@ -543,12 +540,11 @@ dav_svn__test_canonical(const char *path
     return NULL;
 
   /* Otherwise, generate a generic HTTP_BAD_REQUEST error. */
-  return dav_svn__new_error_tag
-    (pool, HTTP_BAD_REQUEST, 0,
+  return dav_svn__new_error_svn(
+     pool, HTTP_BAD_REQUEST, 0,
      apr_psprintf(pool,
                   "Path '%s' is not canonicalized; "
-                  "there is a problem with the client.", path),
-     SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
+                  "there is a problem with the client.", path));
 }
 
 

Modified: subversion/trunk/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/version.c?rev=1553859&r1=1553858&r2=1553859&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/version.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/version.c Sat Dec 28 16:06:32 2013
@@ -396,11 +396,9 @@ vsn_control(dav_resource *resource, cons
 
   /* Only allow a NULL target, which means an create an 'empty' VCR. */
   if (target != NULL)
-    return dav_svn__new_error_tag(resource->pool, HTTP_NOT_IMPLEMENTED,
+    return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
                                   SVN_ERR_UNSUPPORTED_FEATURE,
-                                  "vsn_control called with non-null target.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "vsn_control called with non-null target");
 
   /* This is kind of silly.  The docstring for this callback says it's
      supposed to "put a resource under version control".  But in
@@ -446,20 +444,16 @@ dav_svn__checkout(dav_resource *resource
         return NULL;
 
       if (resource->type != DAV_RESOURCE_TYPE_REGULAR)
-        return dav_svn__new_error_tag(resource->pool, HTTP_METHOD_NOT_ALLOWED,
+        return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
                                       SVN_ERR_UNSUPPORTED_FEATURE,
                                       "auto-checkout attempted on non-regular "
-                                      "version-controlled resource.",
-                                      SVN_DAV_ERROR_NAMESPACE,
-                                      SVN_DAV_ERROR_TAG);
+                                      "version-controlled resource");
 
       if (resource->baselined)
-        return dav_svn__new_error_tag(resource->pool, HTTP_METHOD_NOT_ALLOWED,
+        return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
                                       SVN_ERR_UNSUPPORTED_FEATURE,
                                       "auto-checkout attempted on baseline "
-                                      "collection, which is not supported.",
-                                      SVN_DAV_ERROR_NAMESPACE,
-                                      SVN_DAV_ERROR_TAG);
+                                      "collection, which is not supported");
 
       /* See if the shared activity already exists. */
       apr_err = apr_pool_userdata_get(&data,
@@ -541,51 +535,41 @@ dav_svn__checkout(dav_resource *resource
 
   if (resource->type != DAV_RESOURCE_TYPE_VERSION)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_METHOD_NOT_ALLOWED,
+      return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
                                     SVN_ERR_UNSUPPORTED_FEATURE,
                                     "CHECKOUT can only be performed on a "
-                                    "version resource [at this time].",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "version resource");
     }
   if (create_activity)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_NOT_IMPLEMENTED,
+      return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
                                     SVN_ERR_UNSUPPORTED_FEATURE,
                                     "CHECKOUT cannot create an activity at "
-                                    "this time. Use MKACTIVITY first.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "this time. Use MKACTIVITY first");
     }
   if (is_unreserved)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_NOT_IMPLEMENTED,
+      return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
                                     SVN_ERR_UNSUPPORTED_FEATURE,
                                     "Unreserved checkouts are not yet "
                                     "available. A version history may not be "
                                     "checked out more than once, into a "
-                                    "specific activity.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "specific activity");
     }
   if (activities == NULL)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_CONFLICT,
+      return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
                                     SVN_ERR_INCOMPLETE_DATA,
                                     "An activity must be provided for "
-                                    "checkout.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "checkout");
     }
   /* assert: nelts > 0.  the below check effectively means > 1. */
   if (activities->nelts != 1)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_CONFLICT,
+      return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
                                     SVN_ERR_INCORRECT_PARAMS,
                                     "Only one activity may be specified within "
-                                    "the CHECKOUT.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "the CHECKOUT");
     }
 
   serr = dav_svn__simple_parse_uri(&parse, resource,
@@ -601,21 +585,17 @@ dav_svn__checkout(dav_resource *resource
     }
   if (parse.activity_id == NULL)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_CONFLICT,
+      return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
                                     SVN_ERR_INCORRECT_PARAMS,
-                                    "The provided href is not an activity URI.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "The provided href is not an activity URI");
     }
 
   if ((txn_name = dav_svn__get_txn(resource->info->repos,
                                    parse.activity_id)) == NULL)
     {
-      return dav_svn__new_error_tag(resource->pool, HTTP_CONFLICT,
+      return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
                                     SVN_ERR_APMOD_ACTIVITY_NOT_FOUND,
-                                    "The specified activity does not exist.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "The specified activity does not exist");
     }
 
   /* verify the specified version resource is the "latest", thus allowing
@@ -643,13 +623,11 @@ dav_svn__checkout(dav_resource *resource
 
       if (resource->info->root.rev != youngest)
         {
-          return dav_svn__new_error_tag(resource->pool, HTTP_CONFLICT,
+          return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
                                         SVN_ERR_APMOD_BAD_BASELINE,
                                         "The specified baseline is not the "
                                         "latest baseline, so it may not be "
-                                        "checked out.",
-                                        SVN_DAV_ERROR_NAMESPACE,
-                                        SVN_DAV_ERROR_TAG);
+                                        "checked out");
         }
 
       /* ### hmm. what if the transaction root's revision is different
@@ -743,11 +721,9 @@ dav_svn__checkout(dav_resource *resource
             {
               /* The item being modified is older than the one in the
                  transaction.  The client is out of date.  */
-              return dav_svn__new_error_tag
+              return dav_svn__new_error_svn
                 (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT,
-                 "resource out of date; try updating",
-                 SVN_DAV_ERROR_NAMESPACE,
-                 SVN_DAV_ERROR_TAG);
+                 "resource out of date; try updating");
             }
           else if (resource->info->root.rev > txn_created_rev)
             {
@@ -761,12 +737,10 @@ dav_svn__checkout(dav_resource *resource
                                          resource->info->repos_path,
                                          resource->pool)))
                 {
-                  err = dav_svn__new_error_tag
+                  err = dav_svn__new_error_svn
                     (resource->pool, HTTP_CONFLICT, serr->apr_err,
                      "Unable to fetch the node revision id of the version "
-                     "resource within the transaction.",
-                     SVN_DAV_ERROR_NAMESPACE,
-                     SVN_DAV_ERROR_TAG);
+                     "resource within the transaction");
                   svn_error_clear(serr);
                   return err;
                 }
@@ -775,22 +749,18 @@ dav_svn__checkout(dav_resource *resource
                                          resource->info->repos_path,
                                          resource->pool)))
                 {
-                  err = dav_svn__new_error_tag
+                  err = dav_svn__new_error_svn
                     (resource->pool, HTTP_CONFLICT, serr->apr_err,
                      "Unable to fetch the node revision id of the version "
-                     "resource within the revision.",
-                     SVN_DAV_ERROR_NAMESPACE,
-                     SVN_DAV_ERROR_TAG);
+                     "resource within the revision");
                   svn_error_clear(serr);
                   return err;
                 }
               if (svn_fs_compare_ids(url_noderev_id, txn_noderev_id) != 0)
                 {
-                  return dav_svn__new_error_tag
+                  return dav_svn__new_error_svn
                     (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT,
-                     "version resource newer than txn (restart the commit)",
-                     SVN_DAV_ERROR_NAMESPACE,
-                     SVN_DAV_ERROR_TAG);
+                     "version resource newer than txn (restart the commit)");
                 }
             }
         }
@@ -807,11 +777,9 @@ static dav_error *
 uncheckout(dav_resource *resource)
 {
   if (resource->type != DAV_RESOURCE_TYPE_WORKING)
-    return dav_svn__new_error_tag(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+    return dav_svn__new_error_svn(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
                                   SVN_ERR_UNSUPPORTED_FEATURE,
-                                  "UNCHECKOUT called on non-working resource.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "UNCHECKOUT called on non-working resource");
 
   /* Try to abort the txn if it exists;  but don't try too hard.  :-)  */
   if (resource->info->root.txn)
@@ -950,11 +918,9 @@ dav_svn__checkin(dav_resource *resource,
      txn?  Many txns?  Etc.) */
 
   if (resource->type != DAV_RESOURCE_TYPE_WORKING)
-    return dav_svn__new_error_tag(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+    return dav_svn__new_error_svn(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
                                   SVN_ERR_UNSUPPORTED_FEATURE,
-                                  "CHECKIN called on non-working resource.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "CHECKIN called on non-working resource");
 
   /* If the global autoversioning activity still exists, that means
      nobody's committed it yet. */
@@ -1189,11 +1155,9 @@ deliver_report(request_rec *r,
     }
 
   /* ### what is a good error for an unknown report? */
-  return dav_svn__new_error_tag(resource->pool, HTTP_NOT_IMPLEMENTED,
+  return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
                                 SVN_ERR_UNSUPPORTED_FEATURE,
-                                "The requested report is unknown.",
-                                SVN_DAV_ERROR_NAMESPACE,
-                                SVN_DAV_ERROR_TAG);
+                                "The requested report is unknown");
 }
 
 
@@ -1220,13 +1184,11 @@ make_activity(dav_resource *resource)
   /* sanity check:  make sure the resource is a valid activity, in
      case an older mod_dav doesn't do the check for us. */
   if (! can_be_activity(resource))
-    return dav_svn__new_error_tag(resource->pool, HTTP_FORBIDDEN,
+    return dav_svn__new_error_svn(resource->pool, HTTP_FORBIDDEN,
                                   SVN_ERR_APMOD_MALFORMED_URI,
                                   "Activities cannot be created at that "
                                   "location; query the "
-                                  "DAV:activity-collection-set property.",
-                                  SVN_DAV_ERROR_NAMESPACE,
-                                  SVN_DAV_ERROR_TAG);
+                                  "DAV:activity-collection-set property");
 
   err = dav_svn__create_txn(resource->info->repos, &txn_name,
                             NULL, resource->pool);
@@ -1465,22 +1427,18 @@ merge(dav_resource *target,
          || (source->type == DAV_RESOURCE_TYPE_PRIVATE
              && source->info->restype == DAV_SVN_RESTYPE_TXN_COLLECTION)))
     {
-      return dav_svn__new_error_tag(pool, HTTP_METHOD_NOT_ALLOWED,
+      return dav_svn__new_error_svn(pool, HTTP_METHOD_NOT_ALLOWED,
                                     SVN_ERR_INCORRECT_PARAMS,
                                     "MERGE can only be performed using an "
                                     "activity or transaction resource as the "
-                                    "source.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "source");
     }
   if (! source->exists)
     {
-      return dav_svn__new_error_tag(pool, HTTP_METHOD_NOT_ALLOWED,
+      return dav_svn__new_error_svn(pool, HTTP_METHOD_NOT_ALLOWED,
                                     SVN_ERR_INCORRECT_PARAMS,
                                     "MERGE activity or transaction resource "
-                                    "does not exist.",
-                                    SVN_DAV_ERROR_NAMESPACE,
-                                    SVN_DAV_ERROR_TAG);
+                                    "does not exist");
     }
 
   /* Before attempting the final commit, we need to push any incoming