subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1204374 [13/29] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/ contrib/client-side/emacs/ notes/ notes/wc-ng/ subversion/bindings/javahl/native...
Date Mon, 21 Nov 2011 07:08:07 GMT
Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_dated_rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_dated_rev.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_dated_rev.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_dated_rev.c Mon Nov 21 07:07:56 2011
@@ -93,7 +93,7 @@ drev_start_element(int *elem, void *bato
     return SVN_NO_ERROR;
 
   if (elm->id == ELEM_version_name)
-    b->cdata = svn_stringbuf_create("", b->pool);
+    b->cdata = svn_stringbuf_create_empty(b->pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_deleted_rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_deleted_rev.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_deleted_rev.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_deleted_rev.c Mon Nov 21 07:07:56 2011
@@ -89,7 +89,7 @@ drev_start_element(int *elem, void *bato
     return SVN_NO_ERROR;
 
   if (elm->id == ELEM_version_name)
-    b->cdata = svn_stringbuf_create("", b->pool);
+    b->cdata = svn_stringbuf_create_empty(b->pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_location_segments.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_location_segments.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_location_segments.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_location_segments.c Mon Nov 21 07:07:56 2011
@@ -150,7 +150,7 @@ svn_ra_neon__get_location_segments(svn_r
   apr_pool_t *subpool = svn_pool_create(pool);
 
   /* Build the request body. */
-  request_body = svn_stringbuf_create("", subpool);
+  request_body = svn_stringbuf_create_empty(subpool);
   svn_stringbuf_appendcstr(request_body,
                            "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
                            DEBUG_CR "<S:get-location-segments xmlns:S=\""

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locations.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locations.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locations.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locations.c Mon Nov 21 07:07:56 2011
@@ -138,7 +138,7 @@ svn_ra_neon__get_locations(svn_ra_sessio
 
   *locations = apr_hash_make(pool);
 
-  request_body = svn_stringbuf_create("", pool);
+  request_body = svn_stringbuf_create_empty(pool);
   svn_stringbuf_appendcstr(request_body,
                            "<?xml version=\"1.0\" encoding=\"utf-8\"?>" DEBUG_CR
                            "<S:get-locations xmlns:S=\"" SVN_XML_NAMESPACE

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locks.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locks.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/get_locks.c Mon Nov 21 07:07:56 2011
@@ -257,13 +257,11 @@ getlocks_end_element(void *userdata, int
       else if ((baton->requested_depth == svn_depth_files) ||
                (baton->requested_depth == svn_depth_immediates))
         {
-          const char *rel_uri = svn_fspath__is_child(baton->path,
-                                                     baton->current_lock->path,
-                                                     baton->scratchpool);
+          const char *rel_uri = svn_fspath__skip_ancestor(
+                                  baton->path, baton->current_lock->path);
           if (rel_uri && (svn_path_component_count(rel_uri) == 1))
             apr_hash_set(baton->lock_hash, baton->current_lock->path,
                          APR_HASH_KEY_STRING, baton->current_lock);
-          svn_pool_clear(baton->scratchpool);
         }
       break;
 
@@ -389,7 +387,7 @@ svn_ra_neon__get_locks(svn_ra_session_t 
   baton.scratchpool = svn_pool_create(pool);
   baton.current_lock = NULL;
   baton.encoding = NULL;
-  baton.cdata_accum = svn_stringbuf_create("", pool);
+  baton.cdata_accum = svn_stringbuf_create_empty(pool);
 
   body = apr_psprintf(pool,
                       "<?xml version=\"1.0\" encoding=\"utf-8\"?>"

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/lock.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/lock.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/lock.c Mon Nov 21 07:07:56 2011
@@ -105,13 +105,13 @@ lock_start_element(int *elem, void *bato
     case ELEM_lock_timeout:
     case ELEM_lock_depth:
     case ELEM_status:
-      b->cdata = svn_stringbuf_create("", b->pool);
+      b->cdata = svn_stringbuf_create_empty(b->pool);
       break;
 
     case ELEM_href:
       if (parent == ELEM_lock_token
           || parent == ELEM_response)
-        b->cdata = svn_stringbuf_create("", b->pool);
+        b->cdata = svn_stringbuf_create_empty(b->pool);
       break;
 
     default:

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/log.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/log.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/log.c Mon Nov 21 07:07:56 2011
@@ -365,7 +365,7 @@ svn_error_t * svn_ra_neon__get_log(svn_r
 
   int i;
   svn_ra_neon__session_t *ras = session->priv;
-  svn_stringbuf_t *request_body = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *request_body = svn_stringbuf_create_empty(pool);
   svn_boolean_t want_custom_revprops;
   struct log_baton lb;
   const char *bc_url;
@@ -491,7 +491,7 @@ svn_error_t * svn_ra_neon__get_log(svn_r
   lb.count = 0;
   lb.nest_level = 0;
   lb.limit_compat_bailout = FALSE;
-  lb.cdata = svn_stringbuf_create("", pool);
+  lb.cdata = svn_stringbuf_create_empty(pool);
   lb.log_entry = svn_log_entry_create(pool);
   lb.want_cdata = NULL;
   reset_log_item(&lb);

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/merge.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/merge.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/merge.c Mon Nov 21 07:07:56 2011
@@ -259,7 +259,7 @@ static svn_error_t * handle_resource(mer
     }
 
   /* a collection or regular resource */
-  if (! svn_urlpath__is_ancestor(mc->base_href, mc->href->data))
+  if (! svn_urlpath__skip_ancestor(mc->base_href, mc->href->data))
     {
       /* ### need something better than APR_EGENERAL */
       return svn_error_createf(APR_EGENERAL, NULL,
@@ -269,9 +269,7 @@ static svn_error_t * handle_resource(mer
     }
 
   /* given HREF of the form: BASE "/" RELATIVE, extract the relative portion */
-  relative = svn_urlpath__is_child(mc->base_href, mc->href->data, NULL);
-  if (! relative) /* the paths are equal */
-    relative = "";
+  relative = svn_urlpath__skip_ancestor(mc->base_href, mc->href->data);
 
   /* bump the resource */
   relative = svn_path_uri_decode(relative, pool);
@@ -704,9 +702,9 @@ svn_error_t * svn_ra_neon__merge_activit
   merge_ctx_t mc = { 0 };
   const char *body;
   apr_hash_t *extra_headers = NULL;
-  svn_stringbuf_t *lockbuf = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *lockbuf = svn_stringbuf_create_empty(pool);
 
-  mc.cdata = svn_stringbuf_create("", pool);
+  mc.cdata = svn_stringbuf_create_empty(pool);
   mc.pool = pool;
   mc.scratchpool = svn_pool_create(pool);
   mc.base_href = repos_url;

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/mergeinfo.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/mergeinfo.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/mergeinfo.c Mon Nov 21 07:07:56 2011
@@ -163,12 +163,11 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
                            const apr_array_header_t *paths,
                            svn_revnum_t revision,
                            svn_mergeinfo_inheritance_t inherit,
-                           svn_boolean_t validate_inherited_mergeinfo,
                            svn_boolean_t include_descendants,
                            apr_pool_t *pool)
 {
   svn_ra_neon__session_t *ras = session->priv;
-  svn_stringbuf_t *request_body = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *request_body = svn_stringbuf_create_empty(pool);
   struct mergeinfo_baton mb;
   const char *bc_url;
   const char *bc_relative;
@@ -195,14 +194,6 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
                                         "</S:inherit>",
                                         svn_inheritance_to_word(inherit)));
 
-  if (validate_inherited_mergeinfo)
-    {
-      /* Send it only if true; server will default to "no". */
-      svn_stringbuf_appendcstr(request_body,
-                               "<S:" SVN_DAV__VALIDATE_INHERITED ">yes"
-                               "</S:" SVN_DAV__VALIDATE_INHERITED ">");
-    }
-
   if (include_descendants)
     {
       /* Send it only if true; server will default to "no". */
@@ -230,8 +221,8 @@ svn_ra_neon__get_mergeinfo(svn_ra_sessio
   svn_stringbuf_appendcstr(request_body, minfo_report_tail);
 
   mb.pool = pool;
-  mb.curr_path = svn_stringbuf_create("", pool);
-  mb.curr_info = svn_stringbuf_create("", pool);
+  mb.curr_path = svn_stringbuf_create_empty(pool);
+  mb.curr_info = svn_stringbuf_create_empty(pool);
   mb.catalog = apr_hash_make(pool);
   mb.err = SVN_NO_ERROR;
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/options.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/options.c Mon Nov 21 07:07:56 2011
@@ -198,16 +198,11 @@ parse_capabilities(ne_request *req,
         apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_DEPTH,
                      APR_HASH_KEY_STRING, capability_yes);
 
-      /* For mergeinfo capabilities, the server doesn't know what repository
-         we're referring to, so it can't just say capability_yes. */
       if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO, vals))
+        /* The server doesn't know what repository we're referring
+           to, so it can't just say capability_yes. */
         apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_MERGEINFO,
                      APR_HASH_KEY_STRING, capability_server_yes);
-      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION,
-                                 vals))
-        apr_hash_set(ras->capabilities,
-                     SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
-                     APR_HASH_KEY_STRING, capability_server_yes);
 
       if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_LOG_REVPROPS, vals))
         apr_hash_set(ras->capabilities, SVN_RA_CAPABILITY_LOG_REVPROPS,
@@ -293,7 +288,7 @@ svn_ra_neon__exchange_capabilities(svn_r
   int status_code;
 
   oc.pool = pool;
-  oc.cdata = svn_stringbuf_create("", pool);
+  oc.cdata = svn_stringbuf_create_empty(pool);
 
   if (youngest_rev)
     *youngest_rev = SVN_INVALID_REVNUM;
@@ -403,9 +398,7 @@ svn_ra_neon__has_capability(svn_ra_sessi
      you change something here, check there as well. */
   if (cap_result == capability_server_yes)
     {
-      if ((strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
-          || (strcmp(capability,
-                     SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO) == 0))
+      if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
         {
           /* Handle mergeinfo specially.  Mergeinfo depends on the
              repository as well as the server, but the server routine
@@ -418,15 +411,12 @@ svn_ra_neon__has_capability(svn_ra_sessi
              support mergeinfo. */
           svn_mergeinfo_catalog_t ignored;
           svn_error_t *err;
-          svn_boolean_t validate_inherited_mergeinfo = FALSE;
           apr_array_header_t *paths = apr_array_make(pool, 1,
                                                      sizeof(char *));
           APR_ARRAY_PUSH(paths, const char *) = "";
 
           err = svn_ra_neon__get_mergeinfo(session, &ignored, paths, 0,
-                                           FALSE,
-                                           validate_inherited_mergeinfo,
-                                           FALSE, pool);
+                                           FALSE, FALSE, pool);
 
           if (err)
             {
@@ -450,14 +440,9 @@ svn_ra_neon__has_capability(svn_ra_sessi
           else
             cap_result = capability_yes;
 
-          if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
-            apr_hash_set(ras->capabilities,
-                         SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
-                         cap_result);
-          else
-            apr_hash_set(ras->capabilities,
-                         SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
-                         APR_HASH_KEY_STRING, cap_result);
+          apr_hash_set(ras->capabilities,
+                       SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
+                       cap_result);
         }
       else
         {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/props.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/props.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/props.c Mon Nov 21 07:07:56 2011
@@ -547,7 +547,7 @@ svn_error_t * svn_ra_neon__get_props(apr
   pc.pool = pool;
   pc.propbuffer = apr_hash_make(pool);
   pc.props = apr_hash_make(pool);
-  pc.cdata = svn_stringbuf_create("", pool);
+  pc.cdata = svn_stringbuf_create_empty(pool);
 
   /* Create and dispatch the request! */
   SVN_ERR(svn_ra_neon__parsed_request(sess, "PROPFIND", url,
@@ -571,7 +571,7 @@ svn_error_t * svn_ra_neon__get_props_res
 {
   apr_hash_t *props;
   char * url_path = apr_pstrdup(pool, url);
-  int len = strlen(url);
+  size_t len = strlen(url);
   /* Clean up any trailing slashes. */
   if (len > 1 && url[len - 1] == '/')
       url_path[len - 1] = '\0';

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/ra_neon.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/ra_neon.h?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/ra_neon.h Mon Nov 21 07:07:56 2011
@@ -302,15 +302,13 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
                                   apr_uint32_t dirent_fields,
                                   apr_pool_t *pool);
 
-svn_error_t * svn_ra_neon__get_mergeinfo(
-  svn_ra_session_t *session,
-  apr_hash_t **mergeinfo,
-  const apr_array_header_t *paths,
-  svn_revnum_t revision,
-  svn_mergeinfo_inheritance_t inherit,
-  svn_boolean_t validate_inherited_mergeinfo,
-  svn_boolean_t include_descendants,
-  apr_pool_t *pool);
+svn_error_t * svn_ra_neon__get_mergeinfo(svn_ra_session_t *session,
+                                         apr_hash_t **mergeinfo,
+                                         const apr_array_header_t *paths,
+                                         svn_revnum_t revision,
+                                         svn_mergeinfo_inheritance_t inherit,
+                                         svn_boolean_t include_descendants,
+                                         apr_pool_t *pool);
 
 svn_error_t * svn_ra_neon__do_update(svn_ra_session_t *session,
                                      const svn_ra_reporter3_t **reporter,
@@ -860,8 +858,7 @@ enum {
   ELEM_has_children,
   ELEM_merged_revision,
   ELEM_deleted_rev_report,
-  ELEM_validate_inherited_mergeinfo,
-  ELEM_subtractive_merge,
+  ELEM_subtractive_merge
 };
 
 /* ### docco */

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/replay.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/replay.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/replay.c Mon Nov 21 07:07:56 2011
@@ -345,7 +345,7 @@ start_element(int *elem, void *baton, in
             if (svn_xml_get_attr_value("del", atts))
               rb->prop_accum = NULL;
             else
-              rb->prop_accum = svn_stringbuf_create("", rb->prop_pool);
+              rb->prop_accum = svn_stringbuf_create_empty(rb->prop_pool);
 
             rb->prop_name = apr_pstrdup(rb->prop_pool, name);
           }
@@ -479,7 +479,7 @@ svn_ra_neon__replay(svn_ra_session_t *se
   rb.pool = pool;
   rb.dirs = apr_array_make(pool, 5, sizeof(dir_item_t));
   rb.prop_pool = svn_pool_create(pool);
-  rb.prop_accum = svn_stringbuf_create("", rb.prop_pool);
+  rb.prop_accum = svn_stringbuf_create_empty(rb.prop_pool);
 
   return svn_ra_neon__parsed_request(ras, "REPORT", ras->url->data, body,
                                      NULL, NULL,

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/session.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/session.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/session.c Mon Nov 21 07:07:56 2011
@@ -1145,19 +1145,13 @@ svn_ra_neon__get_path_relative_to_root(s
   const char *root_url;
 
   SVN_ERR(svn_ra_neon__get_repos_root(session, &root_url, pool));
-  if (strcmp(root_url, url) == 0)
-    {
-      *rel_path = "";
-    }
-  else
-    {
-      *rel_path = svn_uri__is_child(root_url, url, pool);
-      if (! *rel_path)
-        return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
-                                 _("'%s' isn't a child of repository root "
-                                   "URL '%s'"),
-                                 url, root_url);
-    }
+  *rel_path = svn_uri_skip_ancestor(root_url, url, pool);
+  if (! *rel_path)
+    return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+                             _("'%s' isn't a child of repository root "
+                               "URL '%s'"),
+                             url, root_url);
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_neon/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_neon/util.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_neon/util.c Mon Nov 21 07:07:56 2011
@@ -313,12 +313,12 @@ multistatus_parser_create(svn_ra_neon__r
                                  start_207_element,
                                  svn_ra_neon__xml_collect_cdata,
                                  end_207_element, b);
-  b->cdata = svn_stringbuf_create("", req->pool);
-  b->description = svn_stringbuf_create("", req->pool);
+  b->cdata = svn_stringbuf_create_empty(req->pool);
+  b->description = svn_stringbuf_create_empty(req->pool);
   b->req = req;
 
-  b->propname = svn_stringbuf_create("", req->pool);
-  b->propstat_description = svn_stringbuf_create("", req->pool);
+  b->propname = svn_stringbuf_create_empty(req->pool);
+  b->propstat_description = svn_stringbuf_create_empty(req->pool);
 }
 
 
@@ -895,7 +895,7 @@ error_parser_create(svn_ra_neon__request
   b->tmp_err = NULL;
 
   b->want_cdata = NULL;
-  b->cdata = svn_stringbuf_create("", req->pool);
+  b->cdata = svn_stringbuf_create_empty(req->pool);
 
   /* attach a standard <D:error> body parser to the request */
   error_parser = xml_parser_create(req);

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/blame.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/blame.c Mon Nov 21 07:07:56 2011
@@ -54,7 +54,7 @@ typedef enum blame_state_e {
   SET_PROP,
   REMOVE_PROP,
   MERGED_REVISION,
-  TXDELTA,
+  TXDELTA
 } blame_state_e;
 
 typedef struct blame_info_t {
@@ -151,7 +151,7 @@ create_propval(blame_info_t *info)
 
   if (!info->prop_attr)
     {
-      return svn_string_create("", info->pool);
+      return svn_string_create_empty(info->pool);
     }
   else
     {
@@ -159,8 +159,7 @@ create_propval(blame_info_t *info)
                                     info->prop_attr_len + 1);
     }
 
-  /* Include the null term. */
-  s = svn_string_ncreate(info->prop_attr, info->prop_attr_len + 1, info->pool);
+  s = svn_string_ncreate(info->prop_attr, info->prop_attr_len, info->pool);
   if (info->prop_base64)
     {
       s = svn_base64_decode_string(s, info->pool);

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/commit.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/commit.c Mon Nov 21 07:07:56 2011
@@ -94,7 +94,7 @@ typedef struct commit_context_t {
 typedef struct proppatch_context_t {
   apr_pool_t *pool;
 
-  const char *name;
+  const char *relpath;
   const char *path;
 
   commit_context_t *commit;
@@ -146,7 +146,10 @@ typedef struct dir_context_t {
   /* Our parent */
   struct dir_context_t *parent_dir;
 
-  /* The directory name; if NULL, we're the 'root' */
+  /* The directory name; if "", we're the 'root' */
+  const char *relpath;
+
+  /* The basename of the directory. "" for the 'root' */
   const char *name;
 
   /* The base revision of the dir. */
@@ -178,6 +181,7 @@ typedef struct file_context_t {
 
   dir_context_t *parent_dir;
 
+  const char *relpath;
   const char *name;
 
   /* The checked out context for this file. */
@@ -311,44 +315,6 @@ handle_checkout(serf_request_t *request,
   return err;
 }
 
-/* Return the relative path from DIR's topmost parent to DIR, in
-   Subversion's internal path style, allocated in POOL.  Use POOL for
-   temporary work as well.  */
-static const char *
-relative_dir_path(dir_context_t *dir, apr_pool_t *pool)
-{
-  const char *rel_path = "";
-  apr_array_header_t *components;
-  dir_context_t *dir_ptr = dir;
-  int i;
-
-  components = apr_array_make(pool, 1, sizeof(const char *));
-
-  for (dir_ptr = dir; dir_ptr; dir_ptr = dir_ptr->parent_dir)
-    APR_ARRAY_PUSH(components, const char *) = dir_ptr->name;
-
-  for (i = 0; i < components->nelts; i++)
-    {
-      rel_path = svn_relpath_join(rel_path,
-                                  APR_ARRAY_IDX(components, i, const char *),
-                                  pool);
-    }
-
-  return rel_path;
-}
-
-
-/* Return the relative path from FILE's topmost parent to FILE, in
-   Subversion's internal path style, allocated in POOL.  Use POOL for
-   temporary work as well.  */
-static const char *
-relative_file_path(file_context_t *f, apr_pool_t *pool)
-{
-  const char *dir_path = relative_dir_path(f->parent_dir, pool);
-  return svn_relpath_join(dir_path, f->name, pool);
-}
-
-
 static svn_error_t *
 checkout_dir(dir_context_t *dir)
 {
@@ -375,8 +341,7 @@ checkout_dir(dir_context_t *dir)
           dir->checkout->activity_url = dir->commit->activity_url;
           dir->checkout->resource_url =
             svn_path_url_add_component2(dir->parent_dir->checkout->resource_url,
-                                        svn_relpath_basename(dir->name, NULL),
-                                        dir->pool);
+                                        dir->name, dir->pool);
 
           return SVN_NO_ERROR;
         }
@@ -428,8 +393,7 @@ checkout_dir(dir_context_t *dir)
       if (err->apr_err == SVN_ERR_FS_CONFLICT)
         SVN_ERR_W(err, apr_psprintf(dir->pool,
                   _("Directory '%s' is out of date; try updating"),
-                  svn_dirent_local_style(relative_dir_path(dir, dir->pool),
-                                         dir->pool)));
+                  svn_dirent_local_style(dir->relpath, dir->pool)));
       return err;
     }
 
@@ -563,9 +527,8 @@ checkout_file(file_context_t *file)
           file->checkout->activity_url = file->commit->activity_url;
           file->checkout->resource_url =
             svn_path_url_add_component2(parent_dir->checkout->resource_url,
-                                        svn_relpath__is_child(parent_dir->name,
-                                                              file->name,
-                                                              file->pool),
+                                        svn_relpath_skip_ancestor(
+                                          parent_dir->relpath, file->relpath),
                                         file->pool);
           return SVN_NO_ERROR;
         }
@@ -585,7 +548,7 @@ checkout_file(file_context_t *file)
 
   SVN_ERR(get_version_url(&(file->checkout->checkout_url),
                           file->commit->session, file->commit->conn,
-                          file->name, file->base_revision,
+                          file->relpath, file->base_revision,
                           NULL, file->pool));
 
   handler->body_delegate = create_checkout_body;
@@ -611,8 +574,7 @@ checkout_file(file_context_t *file)
       if (err->apr_err == SVN_ERR_FS_CONFLICT)
         SVN_ERR_W(err, apr_psprintf(file->pool,
                   _("File '%s' is out of date; try updating"),
-                  svn_dirent_local_style(relative_file_path(file, file->pool),
-                                         file->pool)));
+                  svn_dirent_local_style(file->relpath, file->pool)));
       return err;
     }
 
@@ -839,11 +801,11 @@ setup_proppatch_headers(serf_bucket_t *h
                                            proppatch->base_revision));
     }
 
-  if (proppatch->name && proppatch->commit->lock_tokens)
+  if (proppatch->relpath && proppatch->commit->lock_tokens)
     {
       const char *token;
 
-      token = apr_hash_get(proppatch->commit->lock_tokens, proppatch->name,
+      token = apr_hash_get(proppatch->commit->lock_tokens, proppatch->relpath,
                            APR_HASH_KEY_STRING);
 
       if (token)
@@ -1061,7 +1023,7 @@ setup_put_headers(serf_bucket_t *headers
     {
       const char *token;
 
-      token = apr_hash_get(ctx->commit->lock_tokens, ctx->name,
+      token = apr_hash_get(ctx->commit->lock_tokens, ctx->relpath,
                            APR_HASH_KEY_STRING);
 
       if (token)
@@ -1118,9 +1080,8 @@ setup_copy_dir_headers(serf_bucket_t *he
   else
     {
       uri.path = (char *)svn_path_url_add_component2(
-        dir->parent_dir->checkout->resource_url,
-        svn_relpath_basename(dir->name, pool),
-        pool);
+                                    dir->parent_dir->checkout->resource_url,
+                                    dir->name, pool);
     }
   absolute_uri = apr_uri_unparse(pool, &uri, 0);
 
@@ -1398,6 +1359,7 @@ open_root(void *edit_baton,
       dir->pool = dir_pool;
       dir->commit = ctx;
       dir->base_revision = base_revision;
+      dir->relpath = "";
       dir->name = "";
       dir->changed_props = apr_hash_make(dir->pool);
       dir->removed_props = apr_hash_make(dir->pool);
@@ -1479,12 +1441,13 @@ open_root(void *edit_baton,
       dir->pool = dir_pool;
       dir->commit = ctx;
       dir->base_revision = base_revision;
+      dir->relpath = "";
       dir->name = "";
       dir->changed_props = apr_hash_make(dir->pool);
       dir->removed_props = apr_hash_make(dir->pool);
 
       SVN_ERR(get_version_url(&dir->url, dir->commit->session,
-                              dir->commit->conn, dir->name,
+                              dir->commit->conn, dir->relpath,
                               dir->base_revision, ctx->checked_in_url,
                               dir->pool));
       ctx->checked_in_url = dir->url;
@@ -1563,7 +1526,7 @@ delete_entry(const char *path,
       SVN_ERR(checkout_dir(dir));
       delete_target = svn_path_url_add_component2(dir->checkout->resource_url,
                                                   svn_relpath_basename(path,
-                                                                       pool),
+                                                                       NULL),
                                                   pool);
     }
 
@@ -1658,7 +1621,8 @@ add_directory(const char *path,
   dir->base_revision = SVN_INVALID_REVNUM;
   dir->copy_revision = copyfrom_revision;
   dir->copy_path = copyfrom_path;
-  dir->name = apr_pstrdup(dir->pool, path);
+  dir->relpath = apr_pstrdup(dir->pool, path);
+  dir->name = svn_relpath_basename(dir->relpath, NULL);
   dir->changed_props = apr_hash_make(dir->pool);
   dir->removed_props = apr_hash_make(dir->pool);
 
@@ -1674,11 +1638,10 @@ add_directory(const char *path,
       SVN_ERR(checkout_dir(parent));
 
       dir->url = svn_path_url_add_component2(parent->commit->checked_in_url,
-                                             path, dir->pool);
+                                             dir->name, dir->pool);
       mkcol_target = svn_path_url_add_component2(
                                parent->checkout->resource_url,
-                               svn_relpath_basename(path, dir->pool),
-                               dir->pool);
+                               dir->name, dir->pool);
     }
 
   handler = apr_pcalloc(dir->pool, sizeof(*handler));
@@ -1772,7 +1735,8 @@ open_directory(const char *path,
 
   dir->added = FALSE;
   dir->base_revision = base_revision;
-  dir->name = apr_pstrdup(dir->pool, path);
+  dir->relpath = apr_pstrdup(dir->pool, path);
+  dir->name = svn_relpath_basename(dir->relpath, NULL);
   dir->changed_props = apr_hash_make(dir->pool);
   dir->removed_props = apr_hash_make(dir->pool);
 
@@ -1785,7 +1749,7 @@ open_directory(const char *path,
     {
       SVN_ERR(get_version_url(&dir->url,
                               dir->commit->session, dir->commit->conn,
-                              dir->name, dir->base_revision,
+                              dir->relpath, dir->base_revision,
                               dir->commit->checked_in_url, dir->pool));
     }
   *child_baton = dir;
@@ -1835,7 +1799,7 @@ change_dir_prop(void *dir_baton,
     }
   else
     {
-      value = svn_string_create("", dir->pool);
+      value = svn_string_create_empty(dir->pool);
       svn_ra_serf__set_prop(dir->removed_props, proppatch_target,
                             ns, name, value, dir->pool);
     }
@@ -1863,7 +1827,7 @@ close_directory(void *dir_baton,
       proppatch_ctx->pool = pool;
       proppatch_ctx->progress.pool = pool;
       proppatch_ctx->commit = dir->commit;
-      proppatch_ctx->name = dir->name;
+      proppatch_ctx->relpath = dir->relpath;
       proppatch_ctx->changed_props = dir->changed_props;
       proppatch_ctx->removed_props = dir->removed_props;
       proppatch_ctx->base_revision = dir->base_revision;
@@ -1902,7 +1866,8 @@ add_file(const char *path,
 
   new_file->parent_dir = dir;
   new_file->commit = dir->commit;
-  new_file->name = apr_pstrdup(new_file->pool, path);
+  new_file->relpath = apr_pstrdup(new_file->pool, path);
+  new_file->name = svn_relpath_basename(new_file->relpath, NULL);
   new_file->added = TRUE;
   new_file->base_revision = SVN_INVALID_REVNUM;
   new_file->copy_path = copy_path;
@@ -1925,8 +1890,7 @@ add_file(const char *path,
 
       new_file->url =
         svn_path_url_add_component2(dir->checkout->resource_url,
-                                    svn_relpath_basename(path, new_file->pool),
-                                    new_file->pool);
+                                    new_file->name, new_file->pool);
     }
 
   while (deleted_parent && deleted_parent[0] != '\0')
@@ -1992,7 +1956,8 @@ open_file(const char *path,
 
   new_file->parent_dir = parent;
   new_file->commit = parent->commit;
-  new_file->name = apr_pstrdup(new_file->pool, path); /* TODO: basename? */
+  new_file->relpath = apr_pstrdup(new_file->pool, path);
+  new_file->name = svn_relpath_basename(new_file->relpath, NULL);
   new_file->added = FALSE;
   new_file->base_revision = base_revision;
   new_file->changed_props = apr_hash_make(new_file->pool);
@@ -2082,7 +2047,7 @@ change_file_prop(void *file_baton,
     }
   else
     {
-      value = svn_string_create("", file->pool);
+      value = svn_string_create_empty(file->pool);
 
       svn_ra_serf__set_prop(file->removed_props, file->url,
                             ns, name, value, file->pool);
@@ -2213,7 +2178,7 @@ close_file(void *file_baton,
       proppatch = apr_pcalloc(ctx->pool, sizeof(*proppatch));
       proppatch->pool = ctx->pool;
       proppatch->progress.pool = pool;
-      proppatch->name = ctx->name;
+      proppatch->relpath = ctx->relpath;
       proppatch->path = ctx->url;
       proppatch->commit = ctx->commit;
       proppatch->changed_props = ctx->changed_props;
@@ -2354,6 +2319,8 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   svn_delta_editor_t *editor;
   commit_context_t *ctx;
   apr_hash_index_t *hi;
+  svn_delta_shim_callbacks_t *shim_callbacks =
+                                    svn_delta_shim_callbacks_default(pool);
 
   ctx = apr_pcalloc(pool, sizeof(*ctx));
 
@@ -2400,6 +2367,9 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   *ret_editor = editor;
   *edit_baton = ctx;
 
+  SVN_ERR(svn_editor__insert_shims(ret_editor, edit_baton, *ret_editor,
+                                   *edit_baton, shim_callbacks, pool, pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -2492,7 +2462,7 @@ svn_ra_serf__change_rev_prop(svn_ra_sess
     }
   else if (old_value_p)
     {
-      svn_string_t *dummy_value = svn_string_create("", proppatch_ctx->pool);
+      svn_string_t *dummy_value = svn_string_create_empty(proppatch_ctx->pool);
 
       svn_ra_serf__set_prop(proppatch_ctx->previous_removed_props,
                             proppatch_ctx->path,
@@ -2506,7 +2476,7 @@ svn_ra_serf__change_rev_prop(svn_ra_sess
     }
   else
     {
-      value = svn_string_create("", proppatch_ctx->pool);
+      value = svn_string_create_empty(proppatch_ctx->pool);
 
       svn_ra_serf__set_prop(proppatch_ctx->removed_props, proppatch_ctx->path,
                             ns, name, value, proppatch_ctx->pool);

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/get_deleted_rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/get_deleted_rev.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/get_deleted_rev.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/get_deleted_rev.c Mon Nov 21 07:07:56 2011
@@ -37,7 +37,7 @@
  */
 typedef enum drev_state_e {
   NONE = 0,
-  VERSION_NAME,
+  VERSION_NAME
 } drev_state_e;
 
 typedef struct drev_context_t {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getdate.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getdate.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getdate.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getdate.c Mon Nov 21 07:07:56 2011
@@ -48,7 +48,7 @@
  */
 typedef enum date_state_e {
   NONE = 0,
-  VERSION_NAME,
+  VERSION_NAME
 } date_state_e;
 
 typedef struct date_info_t {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocations.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocations.c Mon Nov 21 07:07:56 2011
@@ -43,7 +43,7 @@
  */
 typedef enum loc_state_e {
   REPORT,
-  LOCATION,
+  LOCATION
 } loc_state_e;
 
 typedef struct loc_state_list_t {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocks.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/getlocks.c Mon Nov 21 07:07:56 2011
@@ -55,7 +55,7 @@ typedef enum lock_state_e {
   OWNER,
   COMMENT,
   CREATION_DATE,
-  EXPIRATION_DATE,
+  EXPIRATION_DATE
 } lock_state_e;
 
 typedef struct lock_info_t {
@@ -200,9 +200,8 @@ end_getlocks(svn_ra_serf__xml_parser_t *
       else if ((lock_ctx->requested_depth == svn_depth_files) ||
                (lock_ctx->requested_depth == svn_depth_immediates))
         {
-          const char *rel_path = svn_fspath__is_child(lock_ctx->path,
-                                                      info->lock->path,
-                                                      info->pool);
+          const char *rel_path = svn_fspath__skip_ancestor(lock_ctx->path,
+                                                           info->lock->path);
           if (rel_path && (svn_path_component_count(rel_path) == 1))
             apr_hash_set(lock_ctx->hash, info->lock->path,
                          APR_HASH_KEY_STRING, info->lock);

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/locks.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/locks.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/locks.c Mon Nov 21 07:07:56 2011
@@ -55,7 +55,7 @@ typedef enum lock_state_e {
   DEPTH,
   TIMEOUT,
   LOCK_TOKEN,
-  COMMENT,
+  COMMENT
 } lock_state_e;
 
 typedef struct lock_prop_info_t {
@@ -580,6 +580,8 @@ svn_ra_serf__lock(svn_ra_session_t *ra_s
 
   subpool = svn_pool_create(pool);
 
+  /* ### TODO for issue 2263: Send all the locks over the wire at once.  This
+     loop is just a temporary shim. */
   for (hi = apr_hash_first(pool, path_revs); hi; hi = apr_hash_next(hi))
     {
       svn_ra_serf__handler_t *handler;
@@ -683,6 +685,8 @@ svn_ra_serf__unlock(svn_ra_session_t *ra
 
   subpool = svn_pool_create(pool);
 
+  /* ### TODO for issue 2263: Send all the locks over the wire at once.  This
+     loop is just a temporary shim. */
   for (hi = apr_hash_first(pool, path_tokens); hi; hi = apr_hash_next(hi))
     {
       svn_ra_serf__handler_t *handler;

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/log.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/log.c Mon Nov 21 07:07:56 2011
@@ -61,7 +61,7 @@ typedef enum log_state_e {
   REPLACED_PATH,
   DELETED_PATH,
   MODIFIED_PATH,
-  SUBTRACTIVE_MERGE,
+  SUBTRACTIVE_MERGE
 } log_state_e;
 
 typedef struct log_info_t {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/merge.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/merge.c Mon Nov 21 07:07:56 2011
@@ -60,14 +60,14 @@ typedef enum merge_state_e {
   DATE,
   IGNORE_PROP_NAME,
   NEED_PROP_NAME,
-  PROP_VAL,
+  PROP_VAL
 } merge_state_e;
 
 typedef enum resource_type_e {
   UNSET,
   BASELINE,
   COLLECTION,
-  CHECKED_IN,
+  CHECKED_IN
 } resource_type_e;
 
 typedef struct merge_info_t {
@@ -292,7 +292,7 @@ end_merge(svn_ra_serf__xml_parser_t *par
           const char *href;
 
           href = apr_hash_get(info->props, "href", APR_HASH_KEY_STRING);
-          if (! svn_urlpath__is_ancestor(ctx->merge_url, href))
+          if (! svn_urlpath__skip_ancestor(ctx->merge_url, href))
             {
               return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
                                        _("A MERGE response for '%s' is not "
@@ -311,11 +311,9 @@ end_merge(svn_ra_serf__xml_parser_t *par
 
               /* From the above check, we know that CTX->MERGE_URL is
                  an ancestor of HREF.  All that remains is to
-                 determine of HREF is the same as CTX->MERGE_URL, or --
-                 if not -- is relative value as a child thereof. */
-              href = svn_urlpath__is_child(ctx->merge_url, href, NULL);
-              if (! href)
-                href = "";
+                 determine if HREF is the same as CTX->MERGE_URL, or --
+                 if not -- its relative value as a child thereof. */
+              href = svn_urlpath__skip_ancestor(ctx->merge_url, href);
 
               checked_in = apr_hash_get(info->props, "checked-in",
                                         APR_HASH_KEY_STRING);
@@ -447,7 +445,7 @@ svn_ra_serf__merge_lock_token_list(apr_h
       path.data = key;
       path.len = klen;
 
-      if (parent && !svn_relpath__is_ancestor(parent, key))
+      if (parent && !svn_relpath_skip_ancestor(parent, key))
         continue;
 
       svn_ra_serf__add_open_tag_buckets(body, alloc, "S:lock", NULL);

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/mergeinfo.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/mergeinfo.c Mon Nov 21 07:07:56 2011
@@ -61,7 +61,6 @@ typedef struct mergeinfo_context_t {
   const apr_array_header_t *paths;
   svn_revnum_t revision;
   svn_mergeinfo_inheritance_t inherit;
-  svn_boolean_t validate_inherited_mergeinfo;
   svn_boolean_t include_descendants;
 } mergeinfo_context_t;
 
@@ -206,13 +205,6 @@ create_mergeinfo_body(serf_bucket_t **bk
                                    "yes", alloc);
     }
 
-  if (mergeinfo_ctx->validate_inherited_mergeinfo)
-    {
-      svn_ra_serf__add_tag_buckets(body_bkt, "S:"
-                                   SVN_DAV__VALIDATE_INHERITED,
-                                   "yes", alloc);
-    }
-
   if (mergeinfo_ctx->paths)
     {
       int i;
@@ -242,7 +234,6 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
                            const apr_array_header_t *paths,
                            svn_revnum_t revision,
                            svn_mergeinfo_inheritance_t inherit,
-                           svn_boolean_t validate_inherited_mergeinfo,
                            svn_boolean_t include_descendants,
                            apr_pool_t *pool)
 {
@@ -265,14 +256,13 @@ svn_ra_serf__get_mergeinfo(svn_ra_sessio
 
   mergeinfo_ctx = apr_pcalloc(pool, sizeof(*mergeinfo_ctx));
   mergeinfo_ctx->pool = pool;
-  mergeinfo_ctx->curr_path = svn_stringbuf_create("", pool);
-  mergeinfo_ctx->curr_info = svn_stringbuf_create("", pool);
+  mergeinfo_ctx->curr_path = svn_stringbuf_create_empty(pool);
+  mergeinfo_ctx->curr_info = svn_stringbuf_create_empty(pool);
   mergeinfo_ctx->done = FALSE;
   mergeinfo_ctx->result_catalog = apr_hash_make(pool);
   mergeinfo_ctx->paths = paths;
   mergeinfo_ctx->revision = revision;
   mergeinfo_ctx->inherit = inherit;
-  mergeinfo_ctx->validate_inherited_mergeinfo = validate_inherited_mergeinfo;
   mergeinfo_ctx->include_descendants = include_descendants;
 
   handler = apr_pcalloc(pool, sizeof(*handler));

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/options.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/options.c Mon Nov 21 07:07:56 2011
@@ -51,7 +51,7 @@
 typedef enum options_state_e {
   OPTIONS,
   ACTIVITY_COLLECTION,
-  HREF,
+  HREF
 } options_state_e;
 
 typedef struct options_state_list_t {
@@ -299,22 +299,13 @@ capabilities_headers_iterator_callback(v
           apr_hash_set(orc->session->capabilities, SVN_RA_CAPABILITY_DEPTH,
                        APR_HASH_KEY_STRING, capability_yes);
         }
-
-       /* For mergeinfo capabilities, the server doesn't know what repository
-          we're referring to, so it can't just say capability_yes. */
       if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO, vals))
         {
+          /* The server doesn't know what repository we're referring
+             to, so it can't just say capability_yes. */
           apr_hash_set(orc->session->capabilities, SVN_RA_CAPABILITY_MERGEINFO,
                        APR_HASH_KEY_STRING, capability_server_yes);
         }
-      if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION,
-                                 vals))
-        {
-          apr_hash_set(orc->session->capabilities,
-                       SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
-                       APR_HASH_KEY_STRING, capability_server_yes);
-        }
-
       if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_LOG_REVPROPS, vals))
         {
           apr_hash_set(orc->session->capabilities,
@@ -565,9 +556,7 @@ svn_ra_serf__has_capability(svn_ra_sessi
      you change something here, check there as well. */
   if (cap_result == capability_server_yes)
     {
-      if ((strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
-          || (strcmp(capability,
-                     SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO) == 0))
+      if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
         {
           /* Handle mergeinfo specially.  Mergeinfo depends on the
              repository as well as the server, but the server routine
@@ -580,15 +569,12 @@ svn_ra_serf__has_capability(svn_ra_sessi
              support mergeinfo. */
           svn_mergeinfo_catalog_t ignored;
           svn_error_t *err;
-          svn_boolean_t validate_inherited_mergeinfo = FALSE;
           apr_array_header_t *paths = apr_array_make(pool, 1,
                                                      sizeof(char *));
           APR_ARRAY_PUSH(paths, const char *) = "";
 
           err = svn_ra_serf__get_mergeinfo(ra_session, &ignored, paths, 0,
-                                           FALSE,
-                                           validate_inherited_mergeinfo,
-                                           FALSE, pool);
+                                           FALSE, FALSE, pool);
 
           if (err)
             {
@@ -611,14 +597,9 @@ svn_ra_serf__has_capability(svn_ra_sessi
           else
             cap_result = capability_yes;
 
-          if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
-            apr_hash_set(serf_sess->capabilities,
-                         SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
-                         cap_result);
-          else
-            apr_hash_set(serf_sess->capabilities,
-                         SVN_RA_CAPABILITY_VALIDATE_INHERITED_MERGEINFO,
-                         APR_HASH_KEY_STRING, cap_result);
+          apr_hash_set(serf_sess->capabilities,
+                       SVN_RA_CAPABILITY_MERGEINFO, APR_HASH_KEY_STRING,
+                       cap_result);
         }
       else
         {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/property.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/property.c Mon Nov 21 07:07:56 2011
@@ -43,7 +43,7 @@ typedef enum prop_state_e {
   NONE = 0,
   RESPONSE,
   PROP,
-  PROPVAL,
+  PROPVAL
 } prop_state_e;
 
 typedef struct prop_info_t {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/ra_serf.h?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/ra_serf.h Mon Nov 21 07:07:56 2011
@@ -1386,15 +1386,13 @@ svn_ra_serf__get_locks(svn_ra_session_t 
                        svn_depth_t depth,
                        apr_pool_t *pool);
 
-svn_error_t * svn_ra_serf__get_mergeinfo(
-  svn_ra_session_t *ra_session,
-  apr_hash_t **mergeinfo,
-  const apr_array_header_t *paths,
-  svn_revnum_t revision,
-  svn_mergeinfo_inheritance_t inherit,
-  svn_boolean_t validate_inherited_mergeinfo,
-  svn_boolean_t include_descendants,
-  apr_pool_t *pool);
+svn_error_t * svn_ra_serf__get_mergeinfo(svn_ra_session_t *ra_session,
+                                         apr_hash_t **mergeinfo,
+                                         const apr_array_header_t *paths,
+                                         svn_revnum_t revision,
+                                         svn_mergeinfo_inheritance_t inherit,
+                                         svn_boolean_t include_descendants,
+                                         apr_pool_t *pool);
 
 /* Exchange capabilities with the server, by sending an OPTIONS
  * request announcing the client's capabilities, and by filling

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/replay.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/replay.c Mon Nov 21 07:07:56 2011
@@ -55,7 +55,7 @@ typedef enum replay_state_e {
   ADD_FILE,
   DELETE_ENTRY,
   APPLY_TEXTDELTA,
-  CHANGE_PROP,
+  CHANGE_PROP
 } replay_state_e;
 
 typedef struct replay_info_t replay_info_t;

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/update.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/update.c Mon Nov 21 07:07:56 2011
@@ -68,7 +68,7 @@ typedef enum report_state_e {
     ADD_FILE,
     PROP,
     IGNORE_PROP_NAME,
-    NEED_PROP_NAME,
+    NEED_PROP_NAME
 } report_state_e;
 
 
@@ -1604,9 +1604,11 @@ start_report(svn_ra_serf__xml_parser_t *
 
       SVN_ERR(open_dir(info->dir));
 
-      SVN_ERR(ctx->update_editor->absent_directory(file_name,
-                                                   info->dir->dir_baton,
-                                                   info->dir->pool));
+      SVN_ERR(ctx->update_editor->absent_directory(
+                                        svn_relpath_join(info->name, file_name,
+                                                         info->dir->pool),
+                                        info->dir->dir_baton,
+                                        info->dir->pool));
     }
   else if ((state == OPEN_DIR || state == ADD_DIR) &&
            strcmp(name.name, "absent-file") == 0)
@@ -1627,9 +1629,11 @@ start_report(svn_ra_serf__xml_parser_t *
 
       SVN_ERR(open_dir(info->dir));
 
-      SVN_ERR(ctx->update_editor->absent_file(file_name,
-                                              info->dir->dir_baton,
-                                              info->dir->pool));
+      SVN_ERR(ctx->update_editor->absent_file(
+                                        svn_relpath_join(info->name, file_name,
+                                                         info->dir->pool),
+                                        info->dir->dir_baton,
+                                        info->dir->pool));
     }
   else if (state == OPEN_DIR || state == ADD_DIR)
     {

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_serf/util.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_serf/util.c Mon Nov 21 07:07:56 2011
@@ -914,7 +914,7 @@ svn_ra_serf__handle_discard_body(serf_re
               server_err->error = svn_error_create(APR_SUCCESS, NULL, NULL);
               server_err->has_xml_response = TRUE;
               server_err->contains_precondition_error = FALSE;
-              server_err->cdata = svn_stringbuf_create("", pool);
+              server_err->cdata = svn_stringbuf_create_empty(pool);
               server_err->collect_cdata = FALSE;
               server_err->parser.pool = server_err->error->pool;
               server_err->parser.user_data = server_err;
@@ -1182,7 +1182,7 @@ svn_ra_serf__handle_multistatus_only(ser
           server_err->error = svn_error_create(APR_SUCCESS, NULL, NULL);
           server_err->has_xml_response = TRUE;
           server_err->contains_precondition_error = FALSE;
-          server_err->cdata = svn_stringbuf_create("", server_err->error->pool);
+          server_err->cdata = svn_stringbuf_create_empty(server_err->error->pool);
           server_err->collect_cdata = FALSE;
           server_err->parser.pool = server_err->error->pool;
           server_err->parser.user_data = server_err;
@@ -2408,15 +2408,8 @@ svn_ra_serf__get_relative_path(const cha
 
   decoded_root = svn_path_uri_decode(session->repos_root.path, pool);
   decoded_orig = svn_path_uri_decode(orig_path, pool);
-  if (strcmp(decoded_root, decoded_orig) == 0)
-    {
-      *rel_path = "";
-    }
-  else
-    {
-      *rel_path = svn_urlpath__is_child(decoded_root, decoded_orig, pool);
-      SVN_ERR_ASSERT(*rel_path != NULL);
-    }
+  *rel_path = svn_urlpath__skip_ancestor(decoded_root, decoded_orig);
+  SVN_ERR_ASSERT(*rel_path != NULL);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_svn/client.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_svn/client.c Mon Nov 21 07:07:56 2011
@@ -1179,15 +1179,13 @@ optbool_to_tristate(apr_uint64_t v)
 
 /* If REVISION is SVN_INVALID_REVNUM, no value is sent to the
    server, which defaults to youngest. */
-static svn_error_t *ra_svn_get_mergeinfo(
-  svn_ra_session_t *session,
-  svn_mergeinfo_catalog_t *catalog,
-  const apr_array_header_t *paths,
-  svn_revnum_t revision,
-  svn_mergeinfo_inheritance_t inherit,
-  svn_boolean_t validate_inherited_mergeinfo,
-  svn_boolean_t include_descendants,
-  apr_pool_t *pool)
+static svn_error_t *ra_svn_get_mergeinfo(svn_ra_session_t *session,
+                                         svn_mergeinfo_catalog_t *catalog,
+                                         const apr_array_header_t *paths,
+                                         svn_revnum_t revision,
+                                         svn_mergeinfo_inheritance_t inherit,
+                                         svn_boolean_t include_descendants,
+                                         apr_pool_t *pool)
 {
   svn_ra_svn__session_baton_t *sess_baton = session->priv;
   svn_ra_svn_conn_t *conn = sess_baton->conn;
@@ -1202,10 +1200,9 @@ static svn_error_t *ra_svn_get_mergeinfo
       path = APR_ARRAY_IDX(paths, i, const char *);
       SVN_ERR(svn_ra_svn_write_cstring(conn, pool, path));
     }
-  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(?r)wbb)", revision,
+  SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)(?r)wb)", revision,
                                  svn_inheritance_to_word(inherit),
-                                 include_descendants,
-                                 validate_inherited_mergeinfo));
+                                 include_descendants));
 
   SVN_ERR(handle_auth_request(sess_baton, pool));
   SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "l", &mergeinfo_tuple));
@@ -2279,19 +2276,12 @@ static svn_error_t *path_relative_to_roo
   const char *root_url;
 
   SVN_ERR(ra_svn_get_repos_root(session, &root_url, pool));
-  if (strcmp(root_url, url) == 0)
-    {
-      *rel_path = "";
-    }
-  else
-    {
-      *rel_path = svn_uri__is_child(root_url, url, pool);
-      if (! *rel_path)
-        return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
-                                 _("'%s' isn't a child of repository root "
-                                   "URL '%s'"),
-                                 url, root_url);
-    }
+  *rel_path = svn_uri_skip_ancestor(root_url, url, pool);
+  if (! *rel_path)
+    return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+                             _("'%s' isn't a child of repository root "
+                               "URL '%s'"),
+                             url, root_url);
   return SVN_NO_ERROR;
 }
 
@@ -2350,7 +2340,7 @@ static svn_error_t *ra_svn_get_locks(svn
         }
       else if ((depth == svn_depth_files) || (depth == svn_depth_immediates))
         {
-          const char *relpath = svn_fspath__is_child(abs_path, lock->path, pool);
+          const char *relpath = svn_fspath__skip_ancestor(abs_path, lock->path);
           if (relpath && (svn_path_component_count(relpath) == 1))
             apr_hash_set(*locks, lock->path, APR_HASH_KEY_STRING, lock);
         }
@@ -2466,10 +2456,6 @@ static svn_error_t *ra_svn_has_capabilit
     *has = svn_ra_svn_has_capability(sess->conn, SVN_RA_SVN_CAP_DEPTH);
   else if (strcmp(capability, SVN_RA_CAPABILITY_MERGEINFO) == 0)
     *has = svn_ra_svn_has_capability(sess->conn, SVN_RA_SVN_CAP_MERGEINFO);
-  else if (strcmp(capability,
-                  SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO) == 0)
-    *has = svn_ra_svn_has_capability(
-      sess->conn, SVN_RA_SVN_CAP_VALIDATE_INHERITED_MERGEINFO);
   else if (strcmp(capability, SVN_RA_CAPABILITY_LOG_REVPROPS) == 0)
     *has = svn_ra_svn_has_capability(sess->conn, SVN_RA_SVN_CAP_LOG_REVPROPS);
   else if (strcmp(capability, SVN_RA_CAPABILITY_PARTIAL_REPLAY) == 0)

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_svn/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_svn/cyrus_auth.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_svn/cyrus_auth.c Mon Nov 21 07:07:56 2011
@@ -28,8 +28,6 @@
 #include <apr_want.h>
 #include <apr_general.h>
 #include <apr_strings.h>
-#include <apr_atomic.h>
-#include <apr_thread_mutex.h>
 #include <apr_version.h>
 
 #include "svn_types.h"
@@ -42,6 +40,7 @@
 
 #include "private/svn_atomic.h"
 #include "private/ra_svn_sasl.h"
+#include "private/svn_mutex.h"
 
 #include "ra_svn.h"
 
@@ -86,72 +85,90 @@ static apr_status_t sasl_done_cb(void *d
 static apr_array_header_t *free_mutexes = NULL;
 
 /* A mutex to serialize access to the array. */
-static apr_thread_mutex_t *array_mutex = NULL;
+static svn_mutex__t *array_mutex = NULL;
 
 /* Callbacks we pass to sasl_set_mutex(). */
 
+static svn_error_t *
+sasl_mutex_alloc_cb_internal(svn_mutex__t **mutex)
+{
+  if (apr_is_empty_array(free_mutexes))
+    return svn_mutex__init(mutex, TRUE, sasl_pool);
+  else
+    *mutex = *((svn_mutex__t**)apr_array_pop(free_mutexes));
+
+  return SVN_NO_ERROR;
+}
+
 static void *sasl_mutex_alloc_cb(void)
 {
-  apr_thread_mutex_t *mutex;
-  apr_status_t apr_err;
+  svn_mutex__t *mutex = NULL;
+  svn_error_t *err;
 
   if (!svn_ra_svn__sasl_status)
     return NULL;
 
-  apr_err = apr_thread_mutex_lock(array_mutex);
-  if (apr_err != APR_SUCCESS)
-    return NULL;
-
-  if (apr_is_empty_array(free_mutexes))
-    {
-      apr_err = apr_thread_mutex_create(&mutex,
-                                        APR_THREAD_MUTEX_DEFAULT,
-                                        sasl_pool);
-      if (apr_err != APR_SUCCESS)
-        mutex = NULL;
-    }
+  err = svn_mutex__lock(array_mutex);
+  if (err)
+    svn_error_clear(err);
   else
-    mutex = *((apr_thread_mutex_t**)apr_array_pop(free_mutexes));
-
-  apr_err = apr_thread_mutex_unlock(array_mutex);
-  if (apr_err != APR_SUCCESS)
-    return NULL;
+    svn_error_clear(svn_mutex__unlock(array_mutex,
+                                      sasl_mutex_alloc_cb_internal(&mutex)));
 
   return mutex;
 }
 
+static int check_result(svn_error_t *err)
+{
+  if (err)
+    {
+      svn_error_clear(err);
+      return -1;
+    }
+    
+  return 0;
+}
+
 static int sasl_mutex_lock_cb(void *mutex)
 {
   if (!svn_ra_svn__sasl_status)
     return 0;
-  return (apr_thread_mutex_lock(mutex) == APR_SUCCESS) ? 0 : -1;
+  return check_result(svn_mutex__lock(mutex));
 }
 
 static int sasl_mutex_unlock_cb(void *mutex)
 {
   if (!svn_ra_svn__sasl_status)
     return 0;
-  return (apr_thread_mutex_unlock(mutex) == APR_SUCCESS) ? 0 : -1;
+  return check_result(svn_mutex__unlock(mutex, SVN_NO_ERROR));
+}
+
+static svn_error_t *
+sasl_mutex_free_cb_internal(void *mutex)
+{
+  APR_ARRAY_PUSH(free_mutexes, svn_mutex__t*) = mutex;
+  return SVN_NO_ERROR;
 }
 
 static void sasl_mutex_free_cb(void *mutex)
 {
-  if (svn_ra_svn__sasl_status)
-    {
-      apr_status_t apr_err = apr_thread_mutex_lock(array_mutex);
-      if (apr_err == APR_SUCCESS)
-        {
-          APR_ARRAY_PUSH(free_mutexes, apr_thread_mutex_t*) = mutex;
-          apr_thread_mutex_unlock(array_mutex);
-        }
-    }
+  svn_error_t *err;
+
+  if (!svn_ra_svn__sasl_status)
+    return;
+
+  err = svn_mutex__lock(array_mutex);
+  if (err)
+    svn_error_clear(err);
+  else
+    svn_error_clear(svn_mutex__unlock(array_mutex,
+                                      sasl_mutex_free_cb_internal(mutex)));
 }
 #endif /* APR_HAS_THREADS */
 
-apr_status_t svn_ra_svn__sasl_common_init(apr_pool_t *pool)
+svn_error_t *
+svn_ra_svn__sasl_common_init(apr_pool_t *pool)
 {
-  apr_status_t apr_err = APR_SUCCESS;
-
   sasl_pool = svn_pool_create(pool);
   sasl_ctx_count = 1;
   apr_pool_cleanup_register(sasl_pool, NULL, sasl_done_cb,
@@ -161,18 +178,18 @@ apr_status_t svn_ra_svn__sasl_common_ini
                  sasl_mutex_lock_cb,
                  sasl_mutex_unlock_cb,
                  sasl_mutex_free_cb);
-  free_mutexes = apr_array_make(sasl_pool, 0, sizeof(apr_thread_mutex_t *));
-  apr_err = apr_thread_mutex_create(&array_mutex,
-                                    APR_THREAD_MUTEX_DEFAULT,
-                                    sasl_pool);
+  free_mutexes = apr_array_make(sasl_pool, 0, sizeof(svn_mutex__t *));
+  return svn_mutex__init(&array_mutex, TRUE, sasl_pool);
+    
 #endif /* APR_HAS_THREADS */
-  return apr_err;
+  
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *sasl_init_cb(void *baton, apr_pool_t *pool)
 {
-  if (svn_ra_svn__sasl_common_init(pool) != APR_SUCCESS
-      || sasl_client_init(NULL) != SASL_OK)
+  SVN_ERR(svn_ra_svn__sasl_common_init(pool));
+  if (sasl_client_init(NULL) != SASL_OK)
     return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
                             _("Could not initialize the SASL library"));
   return SVN_NO_ERROR;
@@ -321,6 +338,16 @@ get_password_cb(sasl_conn_t *conn, void 
   return SASL_FAIL;
 }
 
+/* Wrap an error message from SASL with a prefix that allows users
+ * to tell that the error message came from SASL. */
+static const char *
+get_sasl_error(sasl_conn_t *sasl_ctx, apr_pool_t *result_pool)
+{
+  return apr_psprintf(result_pool,
+                      _("SASL authentication error: %s"),
+                      sasl_errdetail(sasl_ctx));
+}
+
 /* Create a new SASL context. */
 static svn_error_t *new_sasl_ctx(sasl_conn_t **sasl_ctx,
                                  svn_boolean_t is_tunneled,
@@ -355,7 +382,7 @@ static svn_error_t *new_sasl_ctx(sasl_co
                             SASL_AUTH_EXTERNAL, " ");
       if (result != SASL_OK)
         return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                sasl_errdetail(*sasl_ctx));
+                                get_sasl_error(*sasl_ctx, pool));
     }
 
   /* Set security properties. */
@@ -401,7 +428,7 @@ static svn_error_t *try_auth(svn_ra_svn_
           case SASL_NOMEM:
             /* Fatal error.  Fail the authentication. */
             return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                    sasl_errdetail(sasl_ctx));
+                                    get_sasl_error(sasl_ctx, pool));
           default:
             /* For anything else, delete the mech from the list
                and try again. */
@@ -462,7 +489,7 @@ static svn_error_t *try_auth(svn_ra_svn_
 
       if (result != SASL_OK && result != SASL_CONTINUE)
         return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                sasl_errdetail(sasl_ctx));
+                                get_sasl_error(sasl_ctx, pool));
 
       /* If the server thinks we're done, then don't send any response. */
       if (strcmp(status, "success") == 0)
@@ -518,6 +545,7 @@ typedef struct sasl_baton {
   unsigned int read_len;        /* Its current length. */
   const char *write_buf;        /* The buffer returned by sasl_encode. */
   unsigned int write_len;       /* Its length. */
+  apr_pool_t *scratch_pool;
 } sasl_baton_t;
 
 /* Functions to implement a SASL encrypted svn_ra_svn__stream_t. */
@@ -545,7 +573,8 @@ static svn_error_t *sasl_read_cb(void *b
                            &sasl_baton->read_len);
       if (result != SASL_OK)
         return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                sasl_errdetail(sasl_baton->ctx));
+                                get_sasl_error(sasl_baton->ctx,
+                                               sasl_baton->scratch_pool));
     }
 
   /* The buffer returned by sasl_decode might be larger than what the
@@ -586,7 +615,8 @@ sasl_write_cb(void *baton, const char *b
 
       if (result != SASL_OK)
         return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                sasl_errdetail(sasl_baton->ctx));
+                                get_sasl_error(sasl_baton->ctx,
+                                               sasl_baton->scratch_pool));
     }
 
   do
@@ -642,7 +672,7 @@ svn_error_t *svn_ra_svn__enable_sasl_enc
       result = sasl_getprop(sasl_ctx, SASL_SSF, (void*) &ssfp);
       if (result != SASL_OK)
         return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                sasl_errdetail(sasl_ctx));
+                                get_sasl_error(sasl_ctx, pool));
 
       if (*ssfp > 0)
         {
@@ -655,12 +685,13 @@ svn_error_t *svn_ra_svn__enable_sasl_enc
           /* Create and initialize the stream baton. */
           sasl_baton = apr_pcalloc(conn->pool, sizeof(*sasl_baton));
           sasl_baton->ctx = sasl_ctx;
+          sasl_baton->scratch_pool = conn->pool;
 
           /* Find out the maximum input size for sasl_encode. */
           result = sasl_getprop(sasl_ctx, SASL_MAXOUTBUF, &maxsize);
           if (result != SASL_OK)
             return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                    sasl_errdetail(sasl_ctx));
+                                    get_sasl_error(sasl_ctx, pool));
           sasl_baton->maxsize = *((const unsigned int *) maxsize);
 
           /* If there is any data left in the read buffer at this point,
@@ -673,7 +704,7 @@ svn_error_t *svn_ra_svn__enable_sasl_enc
                                    &sasl_baton->read_len);
               if (result != SASL_OK)
                 return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
-                                        sasl_errdetail(sasl_ctx));
+                                        get_sasl_error(sasl_ctx, pool));
               conn->read_end = conn->read_ptr;
             }
 
@@ -739,10 +770,8 @@ svn_ra_svn__do_cyrus_auth(svn_ra_svn__se
   const char *mechstring = "", *last_err = "", *realmstring;
   const char *local_addrport = NULL, *remote_addrport = NULL;
   svn_boolean_t success;
-  /* Reserve space for 3 callbacks (for the username, password and the
-     array terminator). */
-  sasl_callback_t callbacks[3];
-  cred_baton_t cred_baton;
+  sasl_callback_t *callbacks;
+  cred_baton_t cred_baton = { 0 };
   int i;
 
   if (!sess->is_tunneled)
@@ -772,11 +801,17 @@ svn_ra_svn__do_cyrus_auth(svn_ra_svn__se
   realmstring = apr_psprintf(pool, "%s %s", sess->realm_prefix, realm);
 
   /* Initialize the credential baton. */
-  memset(&cred_baton, 0, sizeof(cred_baton));
   cred_baton.auth_baton = sess->callbacks->auth_baton;
   cred_baton.realmstring = realmstring;
   cred_baton.pool = pool;
 
+  /* Reserve space for 3 callbacks (for the username, password and the
+     array terminator).  These structures must persist until the
+     disposal of the SASL context at pool cleanup, however the
+     callback functions will not be invoked outside this function so
+     other structures can have a shorter lifetime. */
+  callbacks = apr_palloc(sess->conn->pool, sizeof(*callbacks) * 3);
+
   /* Initialize the callbacks array. */
 
   /* The username callback. */
@@ -819,7 +854,7 @@ svn_ra_svn__do_cyrus_auth(svn_ra_svn__se
           return cred_baton.err;
         }
       if (cred_baton.no_more_creds
-          || (! success && ! err && ! cred_baton.was_used))
+          || (! err && ! success && ! cred_baton.was_used))
         {
           svn_error_clear(err);
           /* If we ran out of authentication providers, or if we got a server

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_svn/editorp.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_svn/editorp.c Mon Nov 21 07:07:56 2011
@@ -408,6 +408,8 @@ void svn_ra_svn_get_editor(const svn_del
 {
   svn_delta_editor_t *ra_svn_editor = svn_delta_default_editor(pool);
   ra_svn_edit_baton_t *eb;
+  svn_delta_shim_callbacks_t *shim_callbacks =
+                                    svn_delta_shim_callbacks_default(pool);
 
   eb = apr_palloc(pool, sizeof(*eb));
   eb->conn = conn;
@@ -435,6 +437,10 @@ void svn_ra_svn_get_editor(const svn_del
 
   *editor = ra_svn_editor;
   *edit_baton = eb;
+
+  svn_error_clear(svn_editor__insert_shims(editor, edit_baton, *editor,
+                                           *edit_baton, shim_callbacks,
+                                           pool, pool));
 }
 
 /* --- DRIVING AN EDITOR --- */

Modified: subversion/branches/svn-bisect/subversion/libsvn_ra_svn/protocol
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_ra_svn/protocol?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_ra_svn/protocol (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_ra_svn/protocol Mon Nov 21 07:07:56 2011
@@ -202,11 +202,6 @@ capability and C indicates a client capa
 [S]  atomic-revprops   If the server presents this capability, it
                        supports the change-rev-prop2 command.
                        See section 3.1.1.
-[S]  validate-inherited-mergeinfo If the server presents this capability, it
-                                  understands the optional
-                                  validate-inherited-mergeinfo parameter in
-                                  the get-mergeinfo command.  See section
-                                  3.1.1.
 
 3. Commands
 -----------
@@ -330,8 +325,7 @@ second place for auth-request point as n
 
   get-mergeinfo
     params:   ( ( path:string ... ) [ rev:number ] inherit:word 
-                descendents:bool
-                ? validate-inherited-mergeinfo:bool)
+                descendents:bool)
     response: ( ( ( path:string merge-info:string ) ... ) )
     New in svn 1.5.  If no paths are specified, an empty response is
     returned.  If rev is not specified, the youngest revision is used.

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/authz.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/authz.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/authz.c Mon Nov 21 07:07:56 2011
@@ -723,8 +723,25 @@ static svn_boolean_t authz_validate_sect
     svn_config_enumerate2(b->config, name, authz_validate_alias,
                           baton, pool);
   else
-    svn_config_enumerate2(b->config, name, authz_validate_rule,
-                          baton, pool);
+    {
+      /* Validate the section's name. Skip the optional REPOS_NAME. */
+      const char *fspath = strchr(name, ':');
+      if (fspath)
+        fspath++;
+      else
+        fspath = name;
+      if (! svn_fspath__is_canonical(fspath))
+        {
+          b->err = svn_error_createf(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL,
+                                     "Section name '%s' contains non-canonical "
+                                     "fspath '%s'",
+                                     name, fspath);
+          return FALSE;
+        }
+
+      svn_config_enumerate2(b->config, name, authz_validate_rule,
+                            baton, pool);
+    }
 
   if (b->err)
     return FALSE;
@@ -768,6 +785,9 @@ svn_repos_authz_check_access(svn_authz_t
 {
   const char *current_path;
 
+  if (!repos_name)
+    repos_name = "";
+
   /* If PATH is NULL, check if the user has *any* access. */
   if (!path)
     {

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/commit.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/commit.c Mon Nov 21 07:07:56 2011
@@ -782,6 +782,40 @@ abort_edit(void *edit_baton,
 }
 
 
+static svn_error_t *
+prop_fetch_func(apr_hash_t **props,
+                void *baton,
+                const char *path,
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
+{
+  struct edit_baton *eb = baton;
+  svn_fs_root_t *fs_root;
+
+  SVN_ERR(svn_fs_revision_root(&fs_root, eb->fs,
+                               svn_fs_txn_base_revision(eb->txn),
+                               scratch_pool));
+  SVN_ERR(svn_fs_node_proplist(props, fs_root, path, result_pool));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+kind_fetch_func(svn_kind_t *kind,
+                void *baton,
+                const char *path,
+                apr_pool_t *scratch_pool)
+{
+  struct edit_baton *eb = baton;
+  svn_node_kind_t node_kind;
+
+  SVN_ERR(svn_fs_check_path(&node_kind, eb->txn_root, path, scratch_pool));
+  *kind = svn__kind_from_node_kind(node_kind, FALSE);
+
+  return SVN_NO_ERROR;
+} 
+
+
 
 /*** Public interfaces. ***/
 
@@ -802,6 +836,8 @@ svn_repos_get_commit_editor5(const svn_d
   svn_delta_editor_t *e;
   apr_pool_t *subpool = svn_pool_create(pool);
   struct edit_baton *eb;
+  svn_delta_shim_callbacks_t *shim_callbacks =
+                                    svn_delta_shim_callbacks_default(pool);
 
   /* Do a global authz access lookup.  Users with no write access
      whatsoever to the repository don't get a commit editor. */
@@ -853,5 +889,13 @@ svn_repos_get_commit_editor5(const svn_d
   *edit_baton = eb;
   *editor = e;
 
+  shim_callbacks->fetch_props_func = prop_fetch_func;
+  shim_callbacks->fetch_props_baton = eb;
+  shim_callbacks->fetch_kind_func = kind_fetch_func;
+  shim_callbacks->fetch_kind_baton = eb;
+
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   shim_callbacks, pool, pool));
+
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/deprecated.c Mon Nov 21 07:07:56 2011
@@ -715,6 +715,28 @@ svn_repos_verify_fs(svn_repos_t *repos,
 /*** From load.c ***/
 
 svn_error_t *
+svn_repos_load_fs3(svn_repos_t *repos,
+                   svn_stream_t *dumpstream,
+                   enum svn_repos_load_uuid uuid_action,
+                   const char *parent_dir,
+                   svn_boolean_t use_pre_commit_hook,
+                   svn_boolean_t use_post_commit_hook,
+                   svn_boolean_t validate_props,
+                   svn_repos_notify_func_t notify_func,
+                   void *notify_baton,
+                   svn_cancel_func_t cancel_func,
+                   void *cancel_baton,
+                   apr_pool_t *pool)
+{
+  return svn_repos_load_fs4(repos, dumpstream,
+                            SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+                            uuid_action, parent_dir,
+                            use_pre_commit_hook, use_post_commit_hook,
+                            validate_props, notify_func, notify_baton,
+                            cancel_func, cancel_baton, pool);
+}
+
+svn_error_t *
 svn_repos_load_fs2(svn_repos_t *repos,
                    svn_stream_t *dumpstream,
                    svn_stream_t *feedback_stream,
@@ -803,6 +825,25 @@ svn_repos_load_fs(svn_repos_t *repos,
 }
 
 svn_error_t *
+svn_repos_get_fs_build_parser3(const svn_repos_parse_fns2_t **callbacks,
+                               void **parse_baton,
+                               svn_repos_t *repos,
+                               svn_boolean_t use_history,
+                               svn_boolean_t validate_props,
+                               enum svn_repos_load_uuid uuid_action,
+                               const char *parent_dir,
+                               svn_repos_notify_func_t notify_func,
+                               void *notify_baton,
+                               apr_pool_t *pool)
+{
+  return svn_repos_get_fs_build_parser4(callbacks, parse_baton, repos,
+                                        SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+                                        use_history, validate_props,
+                                        uuid_action, parent_dir,
+                                        notify_func, notify_baton, pool);
+}
+
+svn_error_t *
 svn_repos_get_fs_build_parser2(const svn_repos_parse_fns2_t **parser,
                                void **parse_baton,
                                svn_repos_t *repos,

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/dump.c Mon Nov 21 07:07:56 2011
@@ -385,7 +385,7 @@ dump_node(struct edit_baton *eb,
                      pool,
                      _("Referencing data in revision %ld,"
                        " which is older than the oldest"
-                       " dumped revision (%ld).  Loading this dump"
+                       " dumped revision (r%ld).  Loading this dump"
                        " into an empty repository"
                        " will fail."),
                      cmp_rev, eb->oldest_dumped_rev);
@@ -489,7 +489,7 @@ dump_node(struct edit_baton *eb,
                   notify->warning_str = apr_psprintf(
                     pool,
                     _("Mergeinfo referencing revision(s) prior "
-                      "to the oldest dumped revision (%ld). "
+                      "to the oldest dumped revision (r%ld). "
                       "Loading this dump may result in invalid "
                       "mergeinfo."),
                     eb->oldest_dumped_rev);
@@ -870,6 +870,8 @@ get_dump_editor(const svn_delta_editor_t
      root baton. */
   struct edit_baton *eb = apr_pcalloc(pool, sizeof(*eb));
   svn_delta_editor_t *dump_editor = svn_delta_default_editor(pool);
+  svn_delta_shim_callbacks_t *shim_callbacks =
+                                svn_delta_shim_callbacks_default(pool);
 
   /* Set up the edit baton. */
   eb->stream = stream;
@@ -896,6 +898,9 @@ get_dump_editor(const svn_delta_editor_t
   *edit_baton = eb;
   *editor = dump_editor;
 
+  SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
+                                   shim_callbacks, pool, pool));
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_repos/fs-wrap.c Mon Nov 21 07:07:56 2011
@@ -633,16 +633,15 @@ svn_repos_fs_get_locks2(apr_hash_t **loc
 
 
 svn_error_t *
-svn_repos_fs_get_mergeinfo2(svn_mergeinfo_catalog_t *mergeinfo,
-                            svn_repos_t *repos,
-                            const apr_array_header_t *paths,
-                            svn_revnum_t rev,
-                            svn_mergeinfo_inheritance_t inherit,
-                            svn_boolean_t validate_inherited_mergeinfo,
-                            svn_boolean_t include_descendants,
-                            svn_repos_authz_func_t authz_read_func,
-                            void *authz_read_baton,
-                            apr_pool_t *pool)
+svn_repos_fs_get_mergeinfo(svn_mergeinfo_catalog_t *mergeinfo,
+                           svn_repos_t *repos,
+                           const apr_array_header_t *paths,
+                           svn_revnum_t rev,
+                           svn_mergeinfo_inheritance_t inherit,
+                           svn_boolean_t include_descendants,
+                           svn_repos_authz_func_t authz_read_func,
+                           void *authz_read_baton,
+                           apr_pool_t *pool)
 {
   /* Here we cast away 'const', but won't try to write through this pointer
    * without first allocating a new array. */
@@ -690,9 +689,8 @@ svn_repos_fs_get_mergeinfo2(svn_mergeinf
      the change itself. */
   /* ### TODO(reint): ... but how about descendant merged-to paths? */
   if (readable_paths->nelts > 0)
-    SVN_ERR(svn_fs_get_mergeinfo2(mergeinfo, root, readable_paths, inherit,
-                                  validate_inherited_mergeinfo,
-                                  include_descendants, pool));
+    SVN_ERR(svn_fs_get_mergeinfo(mergeinfo, root, readable_paths, inherit,
+                                 include_descendants, pool));
   else
     *mergeinfo = apr_hash_make(pool);
 
@@ -700,26 +698,6 @@ svn_repos_fs_get_mergeinfo2(svn_mergeinf
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_repos_fs_get_mergeinfo(svn_mergeinfo_catalog_t *mergeinfo,
-                           svn_repos_t *repos,
-                           const apr_array_header_t *paths,
-                           svn_revnum_t rev,
-                           svn_mergeinfo_inheritance_t inherit,
-                           svn_boolean_t include_descendants,
-                           svn_repos_authz_func_t authz_read_func,
-                           void *authz_read_baton,
-                           apr_pool_t *pool)
-{
-  return svn_error_trace(svn_repos_fs_get_mergeinfo2(mergeinfo, repos,
-                                                     paths, rev, inherit,
-                                                     FALSE,
-                                                     include_descendants,
-                                                     authz_read_func,
-                                                     authz_read_baton,
-                                                     pool));
-}
-
 struct pack_notify_baton
 {
   svn_repos_notify_func_t notify_func;



Mime
View raw message