You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/03/18 10:35:29 UTC

svn commit: r1457684 [6/22] - in /subversion/branches/verify-keep-going: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subve...

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c Mon Mar 18 09:35:24 2013
@@ -2361,28 +2361,18 @@ create_missing_parents(patch_target_t *t
     {
       const char *component;
       svn_node_kind_t wc_kind, disk_kind;
-      svn_boolean_t is_deleted;
 
       svn_pool_clear(iterpool);
 
       component = APR_ARRAY_IDX(components, i, const char *);
       local_abspath = svn_dirent_join(local_abspath, component, scratch_pool);
 
-      SVN_ERR(svn_wc_read_kind(&wc_kind, ctx->wc_ctx, local_abspath, TRUE,
-                               iterpool));
+      SVN_ERR(svn_wc_read_kind2(&wc_kind, ctx->wc_ctx, local_abspath,
+                                FALSE, TRUE, iterpool));
 
       SVN_ERR(svn_io_check_path(local_abspath, &disk_kind, iterpool));
 
-      if (wc_kind != svn_node_none)
-        SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted,
-                                               ctx->wc_ctx,
-                                               local_abspath,
-                                               iterpool));
-      else
-        is_deleted = FALSE;
-
-      if (disk_kind == svn_node_file
-          || (wc_kind == svn_node_file && !is_deleted))
+      if (disk_kind == svn_node_file || wc_kind == svn_node_file)
         {
           /* on-disk files and missing files are obstructions */
           target->skipped = TRUE;
@@ -2390,17 +2380,15 @@ create_missing_parents(patch_target_t *t
         }
       else if (disk_kind == svn_node_dir)
         {
-          if (wc_kind == svn_node_dir && !is_deleted)
+          if (wc_kind == svn_node_dir)
             present_components++;
-          else if (is_deleted)
-            break;
           else
             {
               target->skipped = TRUE;
               break;
             }
         }
-      else if (wc_kind != svn_node_none && !is_deleted)
+      else if (wc_kind != svn_node_none)
         {
           /* Node is missing */
           target->skipped = TRUE;
@@ -2513,22 +2501,15 @@ install_patched_target(patch_target_t *t
           /* If the target's parent directory does not yet exist
            * we need to create it before we can copy the patched
            * result in place. */
-          SVN_ERR(svn_wc_read_kind(&parent_db_kind, ctx->wc_ctx,
-                                   parent_abspath, FALSE, pool));
+          SVN_ERR(svn_wc_read_kind2(&parent_db_kind, ctx->wc_ctx,
+                                    parent_abspath, FALSE, FALSE, pool));
 
           /* We can't add targets under nodes scheduled for delete, so add
              a new directory if needed. */
           if (parent_db_kind == svn_node_dir
               || parent_db_kind == svn_node_file)
             {
-              svn_boolean_t is_deleted;
-
-              SVN_ERR(svn_wc__node_is_status_deleted(&is_deleted, ctx->wc_ctx,
-                                                     parent_abspath, pool));
-              if (is_deleted)
-                SVN_ERR(create_missing_parents(target, abs_wc_path, ctx,
-                                               dry_run, pool));
-              else if (parent_db_kind != svn_node_dir)
+              if (parent_db_kind != svn_node_dir)
                 target->skipped = TRUE;
               else
                 {
@@ -2549,8 +2530,9 @@ install_patched_target(patch_target_t *t
           svn_node_kind_t wc_kind;
 
           /* The target should exist */
-          SVN_ERR(svn_wc_read_kind(&wc_kind, ctx->wc_ctx,
-                                   target->local_abspath, FALSE, pool));
+          SVN_ERR(svn_wc_read_kind2(&wc_kind, ctx->wc_ctx,
+                                    target->local_abspath,
+                                    FALSE, FALSE, pool));
 
           if (target->kind_on_disk == svn_node_none
               || wc_kind != target->kind_on_disk)

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c Mon Mar 18 09:35:24 2013
@@ -156,9 +156,8 @@ propset_on_url(const char *propname,
 
   /* Open an RA session for the URL. Note that we don't have a local
      directory, nor a place to put temp files. */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, target,
-                                               NULL, NULL, FALSE, TRUE,
-                                               ctx, pool));
+  SVN_ERR(svn_client_open_ra_session2(&ra_session, target, NULL,
+                                      ctx, pool, pool));
 
   SVN_ERR(svn_ra_check_path(ra_session, "", base_revision_for_url,
                             &node_kind, pool));
@@ -307,7 +306,6 @@ svn_client_propset_local(const char *pro
     {
       svn_node_kind_t kind;
       const char *target_abspath;
-      svn_error_t *err;
       const char *target = APR_ARRAY_IDX(targets, i, const char *);
 
       svn_pool_clear(iterpool);
@@ -318,11 +316,11 @@ svn_client_propset_local(const char *pro
 
       SVN_ERR(svn_dirent_get_absolute(&target_abspath, target, iterpool));
 
-      err = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, FALSE,
-                             iterpool);
+      /* Call prop_set for deleted nodes to have special errors */
+      SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, target_abspath,
+                                FALSE, FALSE, iterpool));
 
-      if ((err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-          || (!err && (kind == svn_node_unknown || kind == svn_node_none)))
+      if (kind == svn_node_unknown || kind == svn_node_none)
         {
           if (ctx->notify_func2)
             {
@@ -335,8 +333,6 @@ svn_client_propset_local(const char *pro
             }
         }
 
-      SVN_ERR(err);
-
       SVN_WC__CALL_WITH_WRITE_LOCK(
         svn_wc_prop_set4(ctx->wc_ctx, target_abspath, propname,
                          propval, depth, skip_checks, changelists,
@@ -471,10 +467,9 @@ svn_client_revprop_set2(const char *prop
     return svn_error_createf(SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
                              _("Bad property name: '%s'"), propname);
 
-  /* Open an RA session for the URL. Note that we don't have a local
-     directory, nor a place to put temp files. */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, URL, NULL,
-                                               NULL, FALSE, TRUE, ctx, pool));
+  /* Open an RA session for the URL. */
+  SVN_ERR(svn_client_open_ra_session2(&ra_session, URL, NULL,
+                                      ctx, pool, pool));
 
   /* Resolve the revision into something real, and return that to the
      caller as well. */
@@ -523,51 +518,6 @@ svn_client_revprop_set2(const char *prop
   return SVN_NO_ERROR;
 }
 
-
-/* Set *PROPS to the pristine (base) properties at LOCAL_ABSPATH, if PRISTINE
- * is true, or else the working value if PRISTINE is false.
- *
- * The keys of *PROPS will be 'const char *' property names, and the
- * values 'const svn_string_t *' property values.  Allocate *PROPS
- * and its contents in RESULT_POOL.  Use SCRATCH_POOL for temporary
- * allocations.
- */
-static svn_error_t *
-pristine_or_working_props(apr_hash_t **props,
-                          svn_wc_context_t *wc_ctx,
-                          const char *local_abspath,
-                          svn_boolean_t pristine,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool)
-{
-  if (pristine)
-    {
-      return svn_error_trace(svn_wc_get_pristine_props(props,
-                                                       wc_ctx,
-                                                       local_abspath,
-                                                       result_pool,
-                                                       scratch_pool));
-    }
-
-  /* ### until svn_wc_prop_list2() returns a NULL value for locally-deleted
-     ### nodes, then let's check manually.  */
-  {
-    svn_boolean_t deleted;
-
-    SVN_ERR(svn_wc__node_is_status_deleted(&deleted, wc_ctx, local_abspath,
-                                           scratch_pool));
-    if (deleted)
-      {
-        *props = NULL;
-        return SVN_NO_ERROR;
-      }
-  }
-
-  return svn_error_trace(svn_wc_prop_list2(props, wc_ctx, local_abspath,
-                                           result_pool, scratch_pool));
-}
-
-
 /* Helper for the remote case of svn_client_propget.
  *
  * If PROPS is not null, then get the value of property PROPNAME in REVNUM,
@@ -873,8 +823,9 @@ svn_client_propget5(apr_hash_t **props,
       pristine = (revision->kind == svn_opt_revision_committed
                   || revision->kind == svn_opt_revision_base);
 
-      SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, target, FALSE,
-                               scratch_pool));
+      SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, target,
+                                pristine, FALSE,
+                                scratch_pool));
 
       if (kind == svn_node_unknown || kind == svn_node_none)
         {
@@ -1039,19 +990,25 @@ svn_client_revprop_get(const char *propn
                        apr_pool_t *pool)
 {
   svn_ra_session_t *ra_session;
+  apr_pool_t *subpool = svn_pool_create(pool);
+  svn_error_t *err;
 
   /* Open an RA session for the URL. Note that we don't have a local
      directory, nor a place to put temp files. */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, URL, NULL,
-                                               NULL, FALSE, TRUE, ctx, pool));
+  SVN_ERR(svn_client_open_ra_session2(&ra_session, URL, NULL,
+                                      ctx, subpool, subpool));
 
   /* Resolve the revision into something real, and return that to the
      caller as well. */
   SVN_ERR(svn_client__get_revision_number(set_rev, NULL, ctx->wc_ctx, NULL,
-                                          ra_session, revision, pool));
+                                          ra_session, revision, subpool));
 
   /* The actual RA call. */
-  return svn_ra_rev_prop(ra_session, *set_rev, propname, propval, pool);
+  err = svn_ra_rev_prop(ra_session, *set_rev, propname, propval, pool);
+
+  /* Close RA session */
+  svn_pool_destroy(subpool);
+  return svn_error_trace(err);
 }
 
 
@@ -1109,12 +1066,12 @@ remote_proplist(const char *target_prefi
                 svn_depth_t depth,
                 svn_proplist_receiver2_t receiver,
                 void *receiver_baton,
-                apr_pool_t *result_pool,
+                svn_cancel_func_t cancel_func,
+                void *cancel_baton,
                 apr_pool_t *scratch_pool)
 {
   apr_hash_t *dirents;
   apr_hash_t *prop_hash = NULL;
-  apr_hash_t *final_hash = NULL;
   apr_hash_index_t *hi;
   const char *target_full_url =
     svn_path_url_add_component2(target_prefix, target_relative, scratch_pool);
@@ -1148,12 +1105,12 @@ remote_proplist(const char *target_prefi
 
       SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
                                          target_relative, revnum,
-                                         result_pool, scratch_pool));
+                                         scratch_pool, scratch_pool));
       SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
                                      scratch_pool));
       SVN_ERR(svn_client__iprop_relpaths_to_urls(inherited_props,
                                                  repos_root_url,
-                                                 result_pool,
+                                                 scratch_pool,
                                                  scratch_pool));
     }
   else
@@ -1161,41 +1118,39 @@ remote_proplist(const char *target_prefi
       inherited_props = NULL;
     }
 
-  if (get_explicit_props)
+  if (!get_explicit_props)
+    prop_hash = NULL;
+  else
     {
       /* Filter out non-regular properties, since the RA layer returns all
          kinds.  Copy regular properties keys/vals from the prop_hash
          allocated in SCRATCH_POOL to the "final" hash allocated in
          RESULT_POOL. */
-      final_hash = apr_hash_make(result_pool);
       for (hi = apr_hash_first(scratch_pool, prop_hash);
            hi;
            hi = apr_hash_next(hi))
         {
           const char *name = svn__apr_hash_index_key(hi);
           apr_ssize_t klen = svn__apr_hash_index_klen(hi);
-          svn_string_t *value = svn__apr_hash_index_val(hi);
           svn_prop_kind_t prop_kind;
-
+    
           prop_kind = svn_property_kind2(name);
-
-          if (prop_kind == svn_prop_regular_kind)
+    
+          if (prop_kind != svn_prop_regular_kind)
             {
-              name = apr_pstrdup(result_pool, name);
-              value = svn_string_dup(value, result_pool);
-              apr_hash_set(final_hash, name, klen, value);
+              apr_hash_set(prop_hash, name, klen, NULL);
             }
-        }  
+        }
     }
 
-  SVN_ERR(call_receiver(target_full_url, final_hash, inherited_props,
-                        receiver, receiver_baton, result_pool));
+  SVN_ERR(call_receiver(target_full_url, prop_hash, inherited_props,
+                        receiver, receiver_baton, scratch_pool));
 
   if (depth > svn_depth_empty
       && get_explicit_props
       && (kind == svn_node_dir) && (apr_hash_count(dirents) > 0))
     {
-      apr_pool_t *subpool = svn_pool_create(scratch_pool);
+      apr_pool_t *iterpool = svn_pool_create(scratch_pool);
 
       for (hi = apr_hash_first(scratch_pool, dirents);
            hi;
@@ -1205,10 +1160,13 @@ remote_proplist(const char *target_prefi
           svn_dirent_t *this_ent = svn__apr_hash_index_val(hi);
           const char *new_target_relative;
 
-          svn_pool_clear(subpool);
+          if (cancel_func)
+            SVN_ERR(cancel_func(cancel_baton));
+
+          svn_pool_clear(iterpool);
 
           new_target_relative = svn_relpath_join(target_relative,
-                                                 this_name, subpool);
+                                                 this_name, iterpool);
 
           if (this_ent->kind == svn_node_file
               || depth > svn_depth_files)
@@ -1223,17 +1181,16 @@ remote_proplist(const char *target_prefi
                                       this_ent->kind,
                                       revnum,
                                       ra_session,
-                                      TRUE,
-                                      FALSE,
+                                      TRUE /* get_explicit_props */,
+                                      FALSE /* get_target_inherited_props */,
                                       depth_below_here,
-                                      receiver,
-                                      receiver_baton,
-                                      result_pool,
-                                      subpool));
+                                      receiver, receiver_baton,
+                                      cancel_func, cancel_baton,
+                                      iterpool));
             }
         }
 
-      svn_pool_destroy(subpool);
+      svn_pool_destroy(iterpool);
     }
 
   return SVN_NO_ERROR;
@@ -1294,7 +1251,6 @@ get_remote_props(const char *path_or_url
                  svn_proplist_receiver2_t receiver,
                  void *receiver_baton,
                  svn_client_ctx_t *ctx,
-                 apr_pool_t *result_pool,
                  apr_pool_t *scratch_pool)
 {
   svn_ra_session_t *ra_session;
@@ -1331,7 +1287,7 @@ get_remote_props(const char *path_or_url
                                           ctx->wc_ctx,
                                           local_abspath,
                                           FALSE, /* scan_deleted */
-                                          result_pool,
+                                          scratch_pool,
                                           scratch_pool));
           if (repos_relpath)
             {
@@ -1384,16 +1340,17 @@ get_remote_props(const char *path_or_url
                                             path_or_url, NULL,
                                             peg_revision,
                                             revision, ctx,
-                                            result_pool));
+                                            scratch_pool));
 
   SVN_ERR(svn_ra_check_path(ra_session, "", loc->rev, &kind,
-                            result_pool));
+                            scratch_pool));
 
   SVN_ERR(remote_proplist(loc->url, "", kind, loc->rev, ra_session,
                           get_explicit_props,
                           get_target_inherited_props,
                           depth, receiver, receiver_baton,
-                          result_pool, scratch_pool));
+                          ctx->cancel_func, ctx->cancel_baton,
+                          scratch_pool));
   return SVN_NO_ERROR;
 }
 
@@ -1409,7 +1366,6 @@ get_local_props(const char *path_or_url,
                 svn_proplist_receiver2_t receiver,
                 void *receiver_baton,
                 svn_client_ctx_t *ctx,
-                apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
   svn_boolean_t pristine;
@@ -1423,8 +1379,8 @@ get_local_props(const char *path_or_url,
   pristine = ((revision->kind == svn_opt_revision_committed)
               || (revision->kind == svn_opt_revision_base));
 
-  SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
-                           scratch_pool));
+  SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, local_abspath,
+                            pristine, FALSE, scratch_pool));
 
   if (kind == svn_node_unknown || kind == svn_node_none)
     {
@@ -1479,18 +1435,38 @@ get_local_props(const char *path_or_url,
       SVN_ERR(svn_wc__prop_list_recursive(ctx->wc_ctx, local_abspath, NULL,
                                           depth, pristine, changelists,
                                           recursive_proplist_receiver, &rb,
-                                          ctx->cancel_func,
-                                          ctx->cancel_baton, result_pool));
+                                          ctx->cancel_func, ctx->cancel_baton,
+                                          scratch_pool));
     }
   else if (svn_wc__changelist_match(ctx->wc_ctx, local_abspath,
                                     changelist_hash, scratch_pool))
     {
-      apr_hash_t *hash;
+      apr_hash_t *props;
 
-      SVN_ERR(pristine_or_working_props(&hash, ctx->wc_ctx, local_abspath,
-                                        pristine, result_pool,
-                                        scratch_pool));
-      SVN_ERR(call_receiver(path_or_url, hash, NULL,
+        if (pristine)
+          SVN_ERR(svn_wc_get_pristine_props(&props,
+                                            ctx->wc_ctx, local_abspath,
+                                            scratch_pool, scratch_pool));
+        else
+          {
+            svn_error_t *err;
+
+            err = svn_wc_prop_list2(&props, ctx->wc_ctx, local_abspath,
+                                    scratch_pool, scratch_pool);
+
+
+            if (err)
+              {
+                if (err->apr_err != SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+                  return svn_error_trace(err);
+                /* As svn_wc_prop_list2() doesn't return NULL for locally-deleted
+                   let's do that here.  */
+                svn_error_clear(err);
+                props = apr_hash_make(scratch_pool);
+              }
+          }
+
+      SVN_ERR(call_receiver(path_or_url, props, NULL,
                             receiver, receiver_baton, scratch_pool));
 
     }
@@ -1507,7 +1483,6 @@ svn_client_proplist4(const char *path_or
                      svn_proplist_receiver2_t receiver,
                      void *receiver_baton,
                      svn_client_ctx_t *ctx,
-                     apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool)
 {
   svn_boolean_t local_explicit_props;
@@ -1526,7 +1501,7 @@ svn_client_proplist4(const char *path_or
      && SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(peg_revision->kind)
      && SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(revision->kind));
 
-  /* If we want iprops are they avaiable locally? */
+  /* If we want iprops are they available locally? */
   local_iprops =
     (get_target_inherited_props /* We want iprops */
      && local_explicit_props /* No local explicit props means no local iprops. */
@@ -1541,15 +1516,14 @@ svn_client_proplist4(const char *path_or
       SVN_ERR(get_remote_props(path_or_url, peg_revision, revision, depth,
                                !local_explicit_props,
                                (get_target_inherited_props && !local_iprops),
-                               receiver, receiver_baton, ctx, result_pool,
-                               scratch_pool));
+                               receiver, receiver_baton, ctx, scratch_pool));
     }
 
   if (local_explicit_props)
     {
       SVN_ERR(get_local_props(path_or_url, revision, depth, changelists,
                               local_iprops, receiver, receiver_baton, ctx,
-                              result_pool, scratch_pool));
+                              scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -1565,20 +1539,23 @@ svn_client_revprop_list(apr_hash_t **pro
 {
   svn_ra_session_t *ra_session;
   apr_hash_t *proplist;
+  apr_pool_t *subpool = svn_pool_create(pool);
+  svn_error_t *err;
 
   /* Open an RA session for the URL. Note that we don't have a local
      directory, nor a place to put temp files. */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, URL, NULL,
-                                               NULL, FALSE, TRUE, ctx, pool));
+  SVN_ERR(svn_client_open_ra_session2(&ra_session, URL, NULL,
+                                      ctx, subpool, subpool));
 
   /* Resolve the revision into something real, and return that to the
      caller as well. */
   SVN_ERR(svn_client__get_revision_number(set_rev, NULL, ctx->wc_ctx, NULL,
-                                          ra_session, revision, pool));
+                                          ra_session, revision, subpool));
 
   /* The actual RA call. */
-  SVN_ERR(svn_ra_rev_proplist(ra_session, *set_rev, &proplist, pool));
+  err = svn_ra_rev_proplist(ra_session, *set_rev, &proplist, pool);
 
   *props = proplist;
-  return SVN_NO_ERROR;
+  svn_pool_destroy(subpool); /* Close RA session */
+  return svn_error_trace(err);
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c Mon Mar 18 09:35:24 2013
@@ -59,6 +59,9 @@ typedef struct callback_baton_t
      happens to work most of the time but is ultimately incorrect.  */
   svn_boolean_t base_dir_isversioned;
 
+  /* Used as wri_abspath for obtaining access to the pristine store */
+  const char *wcroot_abspath;
+
   /* An array of svn_client_commit_item3_t * structures, present only
      during working copy commits. */
   const apr_array_header_t *commit_items;
@@ -250,7 +253,7 @@ get_wc_contents(void *baton,
 {
   callback_baton_t *cb = baton;
 
-  if (! (cb->base_dir_abspath && cb->base_dir_isversioned))
+  if (! cb->wcroot_abspath)
     {
       *contents = NULL;
       return SVN_NO_ERROR;
@@ -259,7 +262,7 @@ get_wc_contents(void *baton,
   return svn_error_trace(
              svn_wc__get_pristine_contents_by_checksum(contents,
                                                        cb->ctx->wc_ctx,
-                                                       cb->base_dir_abspath,
+                                                       cb->wcroot_abspath,
                                                        checksum,
                                                        pool, pool));
 }
@@ -292,42 +295,47 @@ svn_client__open_ra_session_internal(svn
                                      const char *base_url,
                                      const char *base_dir_abspath,
                                      const apr_array_header_t *commit_items,
-                                     svn_boolean_t use_admin,
-                                     svn_boolean_t read_only_wc,
+                                     svn_boolean_t write_dav_props,
+                                     svn_boolean_t read_dav_props,
                                      svn_client_ctx_t *ctx,
-                                     apr_pool_t *pool)
+                                     apr_pool_t *result_pool,
+                                     apr_pool_t *scratch_pool)
 {
   svn_ra_callbacks2_t *cbtable;
-  callback_baton_t *cb = apr_pcalloc(pool, sizeof(*cb));
+  callback_baton_t *cb = apr_pcalloc(result_pool, sizeof(*cb));
   const char *uuid = NULL;
 
-  SVN_ERR_ASSERT(base_dir_abspath != NULL || ! use_admin);
+  SVN_ERR_ASSERT(!write_dav_props || read_dav_props);
+  SVN_ERR_ASSERT(!read_dav_props || base_dir_abspath != NULL);
   SVN_ERR_ASSERT(base_dir_abspath == NULL
                         || svn_dirent_is_absolute(base_dir_abspath));
 
-  SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
+  SVN_ERR(svn_ra_create_callbacks(&cbtable, result_pool));
   cbtable->open_tmp_file = open_tmp_file;
-  cbtable->get_wc_prop = use_admin ? get_wc_prop : NULL;
-  cbtable->set_wc_prop = read_only_wc ? NULL : set_wc_prop;
+  cbtable->get_wc_prop = read_dav_props ? get_wc_prop : NULL;
+  cbtable->set_wc_prop = (write_dav_props && read_dav_props)
+                          ? set_wc_prop : NULL;
   cbtable->push_wc_prop = commit_items ? push_wc_prop : NULL;
-  cbtable->invalidate_wc_props = read_only_wc ? NULL : invalidate_wc_props;
+  cbtable->invalidate_wc_props = (write_dav_props && read_dav_props)
+                                  ? invalidate_wc_props : NULL;
   cbtable->auth_baton = ctx->auth_baton; /* new-style */
   cbtable->progress_func = ctx->progress_func;
   cbtable->progress_baton = ctx->progress_baton;
   cbtable->cancel_func = ctx->cancel_func ? cancel_callback : NULL;
   cbtable->get_client_string = get_client_string;
-  cbtable->get_wc_contents = get_wc_contents;
+  if (base_dir_abspath)
+    cbtable->get_wc_contents = get_wc_contents;
 
-  cb->base_dir_abspath = base_dir_abspath;
   cb->commit_items = commit_items;
   cb->ctx = ctx;
 
-  if (base_dir_abspath)
+  if (base_dir_abspath && (read_dav_props || write_dav_props))
     {
       svn_error_t *err = svn_wc__node_get_repos_info(NULL, NULL, NULL, &uuid,
                                                      ctx->wc_ctx,
                                                      base_dir_abspath,
-                                                     pool, pool);
+                                                     result_pool,
+                                                     scratch_pool);
 
       if (err && (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
                   || err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND
@@ -341,6 +349,25 @@ svn_client__open_ra_session_internal(svn
           SVN_ERR(err);
           cb->base_dir_isversioned = TRUE;
         }
+      cb->base_dir_abspath = apr_pstrdup(result_pool, base_dir_abspath);
+    }
+
+  if (base_dir_abspath)
+    {
+      svn_error_t *err = svn_wc__get_wcroot(&cb->wcroot_abspath,
+                                            ctx->wc_ctx, base_dir_abspath,
+                                            result_pool, scratch_pool);
+
+      if (err)
+        {
+          if (err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY
+              && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
+              && err->apr_err != SVN_ERR_WC_UPGRADE_REQUIRED)
+            return svn_error_trace(err);
+
+          svn_error_clear(err);
+          cb->wcroot_abspath = NULL;
+        }
     }
 
   /* If the caller allows for auto-following redirections, and the
@@ -349,7 +376,7 @@ svn_client__open_ra_session_internal(svn
      attempts.  */
   if (corrected_url)
     {
-      apr_hash_t *attempted = apr_hash_make(pool);
+      apr_hash_t *attempted = apr_hash_make(scratch_pool);
       int attempts_left = SVN_CLIENT__MAX_REDIRECT_ATTEMPTS;
 
       *corrected_url = NULL;
@@ -361,7 +388,8 @@ svn_client__open_ra_session_internal(svn
              don't accept corrected URLs from the RA provider. */
           SVN_ERR(svn_ra_open4(ra_session,
                                attempts_left == 0 ? NULL : &corrected,
-                               base_url, uuid, cbtable, cb, ctx->config, pool));
+                               base_url, uuid, cbtable, cb, ctx->config,
+                               result_pool));
 
           /* No error and no corrected URL?  We're done here. */
           if (! corrected)
@@ -372,8 +400,9 @@ svn_client__open_ra_session_internal(svn
             {
               svn_wc_notify_t *notify =
                 svn_wc_create_notify_url(corrected,
-                                         svn_wc_notify_url_redirect, pool);
-              (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
+                                         svn_wc_notify_url_redirect,
+                                         scratch_pool);
+              (*ctx->notify_func2)(ctx->notify_baton2, notify, scratch_pool);
             }
 
           /* Our caller will want to know what our final corrected URL was. */
@@ -393,7 +422,7 @@ svn_client__open_ra_session_internal(svn
   else
     {
       SVN_ERR(svn_ra_open4(ra_session, NULL, base_url,
-                           uuid, cbtable, cb, ctx->config, pool));
+                           uuid, cbtable, cb, ctx->config, result_pool));
     }
 
   return SVN_NO_ERROR;
@@ -402,15 +431,19 @@ svn_client__open_ra_session_internal(svn
 
 
 svn_error_t *
-svn_client_open_ra_session(svn_ra_session_t **session,
-                           const char *url,
-                           svn_client_ctx_t *ctx,
-                           apr_pool_t *pool)
+svn_client_open_ra_session2(svn_ra_session_t **session,
+                            const char *url,
+                            const char *wri_abspath,
+                            svn_client_ctx_t *ctx,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
 {
   return svn_error_trace(
              svn_client__open_ra_session_internal(session, NULL, url,
-                                                  NULL, NULL, FALSE, TRUE,
-                                                  ctx, pool));
+                                                  wri_abspath, NULL,
+                                                  FALSE, FALSE,
+                                                  ctx, result_pool,
+                                                  scratch_pool));
 }
 
 
@@ -483,6 +516,7 @@ svn_client__ra_session_from_path2(svn_ra
   const char *initial_url;
   const char *corrected_url;
   svn_client__pathrev_t *resolved_loc;
+  const char *wri_abspath;
 
   SVN_ERR(svn_client_url_from_path2(&initial_url, path_or_url, ctx, pool,
                                     pool));
@@ -490,12 +524,20 @@ svn_client__ra_session_from_path2(svn_ra
     return svn_error_createf(SVN_ERR_ENTRY_MISSING_URL, NULL,
                              _("'%s' has no URL"), path_or_url);
 
+  if (base_dir_abspath)
+    wri_abspath = base_dir_abspath;
+  else if (!svn_path_is_url(path_or_url))
+    SVN_ERR(svn_dirent_get_absolute(&wri_abspath, path_or_url, pool));
+  else
+    wri_abspath = NULL;
+
   SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url,
                                                initial_url,
-                                               base_dir_abspath, NULL,
+                                               wri_abspath,
+                                               NULL /* commit_items */,
+                                               base_dir_abspath != NULL,
                                                base_dir_abspath != NULL,
-                                               base_dir_abspath == NULL,
-                                               ctx, pool));
+                                               ctx, pool, pool));
 
   /* If we got a CORRECTED_URL, we'll want to refer to that as the
      URL-ized form of PATH_OR_URL from now on. */
@@ -807,9 +849,8 @@ svn_client__repos_locations(const char *
 
   /* Open a RA session to this URL if we don't have one already. */
   if (! ra_session)
-    SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, url, NULL,
-                                                 NULL, FALSE, TRUE,
-                                                 ctx, subpool));
+    SVN_ERR(svn_client_open_ra_session2(&ra_session, url, NULL,
+                                        ctx, subpool, subpool));
 
   /* Resolve the opt_revision_ts. */
   if (peg_revnum == SVN_INVALID_REVNUM)
@@ -873,7 +914,8 @@ svn_client__get_youngest_common_ancestor
   if (session == NULL)
     {
       sesspool = svn_pool_create(scratch_pool);
-      SVN_ERR(svn_client_open_ra_session(&session, loc1->url, ctx, sesspool));
+      SVN_ERR(svn_client_open_ra_session2(&session, loc1->url, NULL, ctx,
+                                          sesspool, sesspool));
     }
 
   /* We're going to cheat and use history-as-mergeinfo because it
@@ -1089,29 +1131,27 @@ svn_client__ra_provide_props(apr_hash_t 
 
 
 svn_error_t *
-svn_client__ra_get_copysrc_kind(svn_kind_t *kind,
+svn_client__ra_get_copysrc_kind(svn_node_kind_t *kind,
                                 void *baton,
                                 const char *repos_relpath,
                                 svn_revnum_t src_revision,
                                 apr_pool_t *scratch_pool)
 {
   struct ra_ev2_baton *reb = baton;
-  svn_node_kind_t node_kind;
   const char *local_abspath;
 
   local_abspath = apr_hash_get(reb->relpath_map, repos_relpath,
                                APR_HASH_KEY_STRING);
   if (!local_abspath)
     {
-      *kind = svn_kind_unknown;
+      *kind = svn_node_unknown;
       return SVN_NO_ERROR;
     }
 
   /* ### what to do with SRC_REVISION?  */
 
-  SVN_ERR(svn_wc_read_kind(&node_kind, reb->wc_ctx, local_abspath, FALSE,
-                           scratch_pool));
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
+  SVN_ERR(svn_wc_read_kind2(kind, reb->wc_ctx, local_abspath,
+                            FALSE, FALSE, scratch_pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/relocate.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/relocate.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/relocate.c Mon Mar 18 09:35:24 2013
@@ -100,13 +100,13 @@ validator_func(void *baton,
   if (! url_uuid)
     {
       apr_pool_t *sesspool = svn_pool_create(pool);
-      svn_ra_session_t *ra_session;
-      SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, url, NULL,
-                                                   NULL, FALSE, TRUE,
-                                                   b->ctx, sesspool));
+
       url_uuid = &APR_ARRAY_PUSH(uuids, struct url_uuid_t);
-      SVN_ERR(svn_ra_get_uuid2(ra_session, &(url_uuid->uuid), pool));
-      SVN_ERR(svn_ra_get_repos_root2(ra_session, &(url_uuid->root), pool));
+      SVN_ERR(svn_client_get_repos_root(&url_uuid->root,
+                                        &url_uuid->uuid,
+                                        url, b->ctx,
+                                        pool, sesspool));
+
       svn_pool_destroy(sesspool);
     }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c Mon Mar 18 09:35:24 2013
@@ -1213,22 +1213,20 @@ absent_file(const char *path,
 }
 
 static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
+fetch_kind_func(svn_node_kind_t *kind,
                 void *baton,
                 const char *path,
                 svn_revnum_t base_revision,
                 apr_pool_t *scratch_pool)
 {
   struct edit_baton *eb = baton;
-  svn_node_kind_t node_kind;
 
   if (!SVN_IS_VALID_REVNUM(base_revision))
     base_revision = eb->revision;
 
-  SVN_ERR(svn_ra_check_path(eb->ra_session, path, base_revision, &node_kind,
+  SVN_ERR(svn_ra_check_path(eb->ra_session, path, base_revision, kind,
                             scratch_pool));
 
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/resolved.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/resolved.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/resolved.c Mon Mar 18 09:35:24 2013
@@ -48,6 +48,8 @@ svn_client_resolve(const char *path,
                    apr_pool_t *pool)
 {
   const char *local_abspath;
+  svn_error_t *err;
+  const char *lock_abspath;
 
   if (svn_path_is_url(path))
     return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
@@ -55,19 +57,27 @@ svn_client_resolve(const char *path,
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
 
-  SVN_WC__CALL_WITH_WRITE_LOCK(
-      svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath,
-                                depth,
-                                TRUE /* resolve_text */,
-                                "" /* resolve_prop (ALL props) */,
-                                TRUE /* resolve_tree */,
-                                conflict_choice,
-                                ctx->conflict_func2,
-                                ctx->conflict_baton2,
-                                ctx->cancel_func, ctx->cancel_baton,
-                                ctx->notify_func2, ctx->notify_baton2,
-                                pool),
-      ctx->wc_ctx, local_abspath, TRUE, pool);
+  /* Similar to SVN_WC__CALL_WITH_WRITE_LOCK but using a custom
+     locking function. */
 
-  return SVN_NO_ERROR;
+  SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx,
+                                                 local_abspath, pool, pool));
+  err = svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath,
+                                  depth,
+                                  TRUE /* resolve_text */,
+                                  "" /* resolve_prop (ALL props) */,
+                                  TRUE /* resolve_tree */,
+                                  conflict_choice,
+                                  ctx->conflict_func2,
+                                  ctx->conflict_baton2,
+                                  ctx->cancel_func, ctx->cancel_baton,
+                                  ctx->notify_func2, ctx->notify_baton2,
+                                  pool);
+
+  err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx,
+                                                                 lock_abspath,
+                                                                 pool));
+  svn_io_sleep_for_timestamps(path, pool);
+
+  return svn_error_trace(err);
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/status.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/status.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/status.c Mon Mar 18 09:35:24 2013
@@ -189,9 +189,8 @@ reporter_finish_report(void *report_bato
 
   /* Open an RA session to our common ancestor and grab the locks under it.
    */
-  SVN_ERR(svn_client__open_ra_session_internal(&ras, NULL, rb->ancestor, NULL,
-                                               NULL, FALSE, TRUE,
-                                               rb->ctx, subpool));
+  SVN_ERR(svn_client_open_ra_session2(&ras, rb->ancestor, NULL,
+                                      rb->ctx, subpool, subpool));
 
   /* The locks need to live throughout the edit.  Note that if the
      server doesn't support lock discovery, we'll just not do locky
@@ -236,6 +235,92 @@ static svn_ra_reporter3_t lock_fetch_rep
   reporter_abort_report
 };
 
+/* Perform status operations on each external in EXTERNAL_MAP, a const char *
+   local_abspath of all externals mapping to the const char* defining_abspath.
+   All other options are the same as those passed to svn_client_status().
+
+   If ANCHOR_ABSPATH and ANCHOR-RELPATH are not null, use them to provide
+   properly formatted relative paths */
+static svn_error_t *
+do_external_status(svn_client_ctx_t *ctx,
+                   apr_hash_t *external_map,
+                   svn_depth_t depth,
+                   svn_boolean_t get_all,
+                   svn_boolean_t update,
+                   svn_boolean_t no_ignore,
+                   const char *anchor_abspath,
+                   const char *anchor_relpath,
+                   svn_client_status_func_t status_func,
+                   void *status_baton,
+                   apr_pool_t *scratch_pool)
+{
+  apr_hash_index_t *hi;
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+
+  /* Loop over the hash of new values (we don't care about the old
+     ones).  This is a mapping of versioned directories to property
+     values. */
+  for (hi = apr_hash_first(scratch_pool, external_map);
+       hi;
+       hi = apr_hash_next(hi))
+    {
+      svn_node_kind_t external_kind;
+      const char *local_abspath = svn__apr_hash_index_key(hi);
+      const char *defining_abspath = svn__apr_hash_index_val(hi);
+      svn_node_kind_t kind;
+      svn_opt_revision_t opt_rev;
+      const char *status_path;
+
+      svn_pool_clear(iterpool);
+
+      /* Obtain information on the expected external. */
+      SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
+                                         &opt_rev.value.number,
+                                         ctx->wc_ctx, defining_abspath,
+                                         local_abspath, FALSE,
+                                         iterpool, iterpool));
+
+      if (external_kind != svn_node_dir)
+        continue;
+
+      SVN_ERR(svn_io_check_path(local_abspath, &kind, iterpool));
+      if (kind != svn_node_dir)
+        continue;
+
+      if (SVN_IS_VALID_REVNUM(opt_rev.value.number))
+        opt_rev.kind = svn_opt_revision_number;
+      else
+        opt_rev.kind = svn_opt_revision_unspecified;
+
+      /* Tell the client we're starting an external status set. */
+      if (ctx->notify_func2)
+        ctx->notify_func2(
+               ctx->notify_baton2,
+               svn_wc_create_notify(local_abspath,
+                                    svn_wc_notify_status_external,
+                                    iterpool), iterpool);
+
+      status_path = local_abspath;
+      if (anchor_abspath)
+        {
+          status_path = svn_dirent_join(anchor_relpath,
+                           svn_dirent_skip_ancestor(anchor_abspath,
+                                                    status_path),
+                           iterpool);
+        }
+
+      /* And then do the status. */
+      SVN_ERR(svn_client_status5(NULL, ctx, status_path, &opt_rev, depth,
+                                 get_all, update, no_ignore, FALSE, FALSE,
+                                 NULL, status_func, status_baton,
+                                 iterpool));
+    }
+
+  /* Destroy SUBPOOL and (implicitly) ITERPOOL. */
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
 
 /*** Public Interface. ***/
 
@@ -289,8 +374,8 @@ svn_client_status5(svn_revnum_t *result_
 
       svn_node_kind_t kind;
  
-      SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, FALSE,
-                               pool));
+      SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, target_abspath,
+                                TRUE, FALSE, pool));
  
       /* Dir must be a working copy directory or the status editor fails */
       if (kind == svn_node_dir)
@@ -312,8 +397,8 @@ svn_client_status5(svn_revnum_t *result_
             }
           else
             {
-              err = svn_wc_read_kind(&kind, ctx->wc_ctx, dir_abspath, FALSE,
-                                     pool);
+              err = svn_wc_read_kind2(&kind, ctx->wc_ctx, dir_abspath,
+                                      FALSE, FALSE, pool);
  
               svn_error_clear(err);
  
@@ -372,9 +457,9 @@ svn_client_status5(svn_revnum_t *result_
 
       /* Open a repository session to the URL. */
       SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, URL,
-                                                   dir_abspath,
-                                                   NULL, FALSE, TRUE,
-                                                   ctx, pool));
+                                                   dir_abspath, NULL,
+                                                   FALSE, TRUE,
+                                                   ctx, pool, pool));
 
       SVN_ERR(svn_ra_has_capability(ra_session, &server_supports_depth,
                                     SVN_RA_CAPABILITY_DEPTH, pool));
@@ -527,11 +612,11 @@ svn_client_status5(svn_revnum_t *result_
                                               pool, pool));
 
 
-      SVN_ERR(svn_client__do_external_status(ctx, external_map,
-                                             depth, get_all,
-                                             update, no_ignore,
-                                             sb.anchor_abspath, sb.anchor_relpath,
-                                             status_func, status_baton, pool));
+      SVN_ERR(do_external_status(ctx, external_map,
+                                 depth, get_all,
+                                 update, no_ignore,
+                                 sb.anchor_abspath, sb.anchor_relpath,
+                                 status_func, status_baton, pool));
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c Mon Mar 18 09:35:24 2013
@@ -168,8 +168,8 @@ switch_internal(svn_revnum_t *result_rev
           return SVN_NO_ERROR;
         }
 
-      SVN_ERR(svn_wc_read_kind(&target_kind, ctx->wc_ctx, local_abspath, TRUE,
-                               pool));
+      SVN_ERR(svn_wc_read_kind2(&target_kind, ctx->wc_ctx, local_abspath,
+                                TRUE, TRUE, pool));
 
       if (target_kind == svn_node_dir)
         SVN_ERR(svn_wc_crop_tree2(ctx->wc_ctx, local_abspath, depth,
@@ -301,21 +301,19 @@ switch_internal(svn_revnum_t *result_rev
 
   /* Tell RA to do an update of URL+TARGET to REVISION; if we pass an
      invalid revnum, that means RA will use the latest revision. */
-  SVN_ERR(svn_ra_do_switch2(ra_session, &reporter, &report_baton,
+  SVN_ERR(svn_ra_do_switch3(ra_session, &reporter, &report_baton,
                             switch_loc->rev,
                             target,
                             depth_is_sticky ? depth : svn_depth_unknown,
                             switch_loc->url,
-                            switch_editor, switch_edit_baton, pool));
+                            FALSE /* send_copyfrom_args */,
+                            ignore_ancestry,
+                            switch_editor, switch_edit_baton,
+                            pool, pool));
 
   /* Drive the reporter structure, describing the revisions within
      PATH.  When we call reporter->finish_report, the update_editor
-     will be driven by svn_repos_dir_delta2.
-
-     We pass in an external_func for recording all externals. It
-     shouldn't be needed for a switch if it wasn't for the relative
-     externals of type '../path'. All of those must be resolved to
-     the new location.  */
+     will be driven by svn_repos_dir_delta2. */
   err = svn_wc_crawl_revisions5(ctx->wc_ctx, local_abspath, reporter,
                                 report_baton, TRUE, depth, (! depth_is_sticky),
                                 (! server_supports_depth),

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/update.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/update.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/update.c Mon Mar 18 09:35:24 2013
@@ -193,7 +193,10 @@ update_internal(svn_revnum_t *result_rev
   void *report_baton;
   const char *corrected_url;
   const char *target;
-  svn_client__pathrev_t *anchor_loc;
+  const char *repos_root_url;
+  const char *repos_relpath;
+  const char *repos_uuid;
+  const char *anchor_url;
   svn_error_t *err;
   svn_revnum_t revnum;
   svn_boolean_t use_commit_times;
@@ -208,7 +211,8 @@ update_internal(svn_revnum_t *result_rev
   apr_array_header_t *preserved_exts;
   struct svn_client__dirent_fetcher_baton_t dfb;
   svn_boolean_t server_supports_depth;
-  svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
+  svn_boolean_t cropping_target;
+  svn_boolean_t target_conflicted = FALSE;
   svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
                                                  SVN_CONFIG_CATEGORY_CONFIG,
                                                  APR_HASH_KEY_STRING) : NULL;
@@ -226,33 +230,43 @@ update_internal(svn_revnum_t *result_rev
     target = "";
 
   /* Check if our anchor exists in BASE. If it doesn't we can't update. */
-  SVN_ERR(svn_client__wc_node_get_base(&anchor_loc, anchor_abspath,
-                                       ctx->wc_ctx, pool, pool));
+  SVN_ERR(svn_wc__node_get_base(NULL, NULL, &repos_relpath, &repos_root_url,
+                                &repos_uuid, NULL,
+                                ctx->wc_ctx, anchor_abspath,
+                                TRUE, FALSE,
+                                pool, pool));
 
   /* It does not make sense to update conflict victims. */
-  err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted,
-                             &tree_conflicted,
-                             ctx->wc_ctx, local_abspath, pool);
-  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+  if (repos_relpath)
     {
+      svn_boolean_t text_conflicted, prop_conflicted;
+
+      anchor_url = svn_path_url_add_component2(repos_root_url, repos_relpath,
+                                               pool);
+
+      err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted,
+                                 NULL,
+                                 ctx->wc_ctx, local_abspath, pool);
+
+      if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+        return svn_error_trace(err);
       svn_error_clear(err);
-      text_conflicted = FALSE;
-      prop_conflicted = FALSE;
-      tree_conflicted = FALSE;
+
+      /* tree-conflicts are handled by the update editor */
+      if (!err && (text_conflicted || prop_conflicted))
+        target_conflicted = TRUE;
     }
   else
-    SVN_ERR(err);
+    anchor_url = NULL;
 
-  if (! anchor_loc
-      || text_conflicted || prop_conflicted || tree_conflicted)
+  if (! anchor_url || target_conflicted)
     {
       if (ctx->notify_func2)
         {
           svn_wc_notify_t *nt;
 
           nt = svn_wc_create_notify(local_abspath,
-                                    (text_conflicted || prop_conflicted
-                                                     || tree_conflicted)
+                                    target_conflicted
                                       ? svn_wc_notify_skip_conflicted
                                       : svn_wc_notify_update_skip_working_only,
                                     pool);
@@ -263,7 +277,8 @@ update_internal(svn_revnum_t *result_rev
     }
 
   /* We may need to crop the tree if the depth is sticky */
-  if (depth_is_sticky && depth < svn_depth_infinity)
+  cropping_target = (depth_is_sticky && depth < svn_depth_infinity);
+  if (cropping_target)
     {
       svn_node_kind_t target_kind;
 
@@ -279,8 +294,8 @@ update_internal(svn_revnum_t *result_rev
           return SVN_NO_ERROR;
         }
 
-      SVN_ERR(svn_wc_read_kind(&target_kind, ctx->wc_ctx, local_abspath, TRUE,
-                               pool));
+      SVN_ERR(svn_wc_read_kind2(&target_kind, ctx->wc_ctx, local_abspath,
+                                TRUE, TRUE, pool));
       if (target_kind == svn_node_dir)
         {
           SVN_ERR(svn_wc_crop_tree2(ctx->wc_ctx, local_abspath, depth,
@@ -329,9 +344,9 @@ update_internal(svn_revnum_t *result_rev
 
   /* Open an RA session for the URL */
   SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url,
-                                               anchor_loc->url,
+                                               anchor_url,
                                                anchor_abspath, NULL, TRUE,
-                                               TRUE, ctx, pool));
+                                               TRUE, ctx, pool, pool));
 
   /* If we got a corrected URL from the RA subsystem, we'll need to
      relocate our working copy first. */
@@ -344,15 +359,15 @@ update_internal(svn_revnum_t *result_rev
       SVN_ERR(svn_ra_get_repos_root2(ra_session, &new_repos_root_url, pool));
 
       /* svn_client_relocate2() will check the uuid */
-      SVN_ERR(svn_client_relocate2(anchor_abspath, anchor_loc->url,
+      SVN_ERR(svn_client_relocate2(anchor_abspath, anchor_url,
                                    new_repos_root_url, ignore_externals,
                                    ctx, pool));
 
       /* Store updated repository root for externals */
-      anchor_loc->repos_root_url = new_repos_root_url;
+      repos_root_url = new_repos_root_url;
       /* ### We should update anchor_loc->repos_uuid too, although currently
        * we don't use it. */
-      anchor_loc->url = corrected_url;
+      anchor_url = corrected_url;
     }
 
   /* Resolve unspecified REVISION now, because we need to retrieve the
@@ -374,7 +389,7 @@ update_internal(svn_revnum_t *result_rev
 
   dfb.ra_session = ra_session;
   dfb.target_revision = revnum;
-  dfb.anchor_url = anchor_loc->url;
+  dfb.anchor_url = anchor_url;
 
   SVN_ERR(svn_client__get_inheritable_props(&wcroot_iprops, local_abspath,
                                             revnum, depth, ra_session,
@@ -430,7 +445,8 @@ update_internal(svn_revnum_t *result_rev
   /* We handle externals after the update is complete, so that
      handling external items (and any errors therefrom) doesn't delay
      the primary operation.  */
-  if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
+  if ((SVN_DEPTH_IS_RECURSIVE(depth) || cropping_target)
+      && (! ignore_externals))
     {
       apr_hash_t *new_externals;
       apr_hash_t *new_depths;
@@ -441,7 +457,7 @@ update_internal(svn_revnum_t *result_rev
 
       SVN_ERR(svn_client__handle_externals(new_externals,
                                            new_depths,
-                                           anchor_loc->repos_root_url, local_abspath,
+                                           repos_root_url, local_abspath,
                                            depth, use_sleep,
                                            ctx, pool));
     }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/upgrade.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/upgrade.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/upgrade.c Mon Mar 18 09:35:24 2013
@@ -63,8 +63,6 @@ fetch_repos_info(const char **repos_root
                  apr_pool_t *scratch_pool)
 {
   struct repos_info_baton *ri = baton;
-  apr_pool_t *subpool;
-  svn_ra_session_t *ra_session;
 
   /* The same info is likely to retrieved multiple times (e.g. externals) */
   if (ri->last_repos && svn_uri__is_ancestor(ri->last_repos, url))
@@ -74,19 +72,13 @@ fetch_repos_info(const char **repos_root
       return SVN_NO_ERROR;
     }
 
-  subpool = svn_pool_create(scratch_pool);
-
-  SVN_ERR(svn_client_open_ra_session(&ra_session, url, ri->ctx, subpool));
-
-  SVN_ERR(svn_ra_get_repos_root2(ra_session, repos_root, result_pool));
-  SVN_ERR(svn_ra_get_uuid2(ra_session, repos_uuid, result_pool));
+  SVN_ERR(svn_client_get_repos_root(repos_root, repos_uuid, url, ri->ctx,
+                                    result_pool, scratch_pool));
 
   /* Store data for further calls */
   ri->last_repos = apr_pstrdup(ri->state_pool, *repos_root);
   ri->last_uuid = apr_pstrdup(ri->state_pool, *repos_uuid);
 
-  svn_pool_destroy(subpool);
-
   return SVN_NO_ERROR;
 }
 
@@ -226,8 +218,8 @@ svn_client_upgrade(const char *path,
            * already been upgraded) and no error is returned.  If it doesn't
            * exist (external that isn't checked out yet), we'll just get
            * svn_node_none. */
-          err = svn_wc_read_kind(&external_kind, ctx->wc_ctx,
-                                 external_abspath, FALSE, iterpool2);
+          err = svn_wc_read_kind2(&external_kind, ctx->wc_ctx,
+                                  external_abspath, TRUE, FALSE, iterpool2);
           if (err && err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
             {
               svn_error_clear(err);
@@ -241,8 +233,8 @@ svn_client_upgrade(const char *path,
 
           /* The upgrade of any dir should be done now, get the now reliable
            * kind. */
-          err = svn_wc_read_kind(&external_kind, ctx->wc_ctx, external_abspath,
-                                 FALSE, iterpool2);
+          err = svn_wc_read_kind2(&external_kind, ctx->wc_ctx, external_abspath,
+                                  TRUE, FALSE, iterpool2);
           if (err)
             goto handle_error;
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/util.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/util.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/util.c Mon Mar 18 09:35:24 2013
@@ -179,12 +179,15 @@ svn_client__wc_node_get_base(svn_client_
 
   *base_p = apr_palloc(result_pool, sizeof(**base_p));
 
-  SVN_ERR(svn_wc__node_get_base(&(*base_p)->rev,
+  SVN_ERR(svn_wc__node_get_base(NULL,
+                                &(*base_p)->rev,
                                 &relpath,
                                 &(*base_p)->repos_root_url,
                                 &(*base_p)->repos_uuid,
                                 NULL,
                                 wc_ctx, wc_abspath,
+                                TRUE /* ignore_enoent */,
+                                TRUE /* show_hidden */,
                                 result_pool, scratch_pool));
   if ((*base_p)->repos_root_url && relpath)
     {
@@ -263,10 +266,8 @@ svn_client_get_repos_root(const char **r
     }
 
   /* If PATH_OR_URL was a URL, we use the RA layer to look it up. */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL,
-                                               abspath_or_url,
-                                               NULL, NULL, FALSE, TRUE,
-                                               ctx, scratch_pool));
+  SVN_ERR(svn_client_open_ra_session2(&ra_session,  abspath_or_url, NULL,
+                                      ctx, scratch_pool, scratch_pool));
 
   if (repos_root)
     SVN_ERR(svn_ra_get_repos_root2(ra_session, repos_root, result_pool));
@@ -355,6 +356,7 @@ fetch_props_func(apr_hash_t **props,
       return SVN_NO_ERROR;
     }
 
+  /* Reads the pristine properties of WORKING, not those of BASE */
   SVN_ERR(svn_wc_get_pristine_props(props, scb->wc_ctx, local_abspath,
                                     result_pool, scratch_pool));
 
@@ -365,26 +367,24 @@ fetch_props_func(apr_hash_t **props,
 }
 
 static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
+fetch_kind_func(svn_node_kind_t *kind,
                 void *baton,
                 const char *path,
                 svn_revnum_t base_revision,
                 apr_pool_t *scratch_pool)
 {
   struct shim_callbacks_baton *scb = baton;
-  svn_node_kind_t node_kind;
   const char *local_abspath;
 
   local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
   if (!local_abspath)
     {
-      *kind = svn_kind_unknown;
+      *kind = svn_node_unknown;
       return SVN_NO_ERROR;
     }
-
-  SVN_ERR(svn_wc_read_kind(&node_kind, scb->wc_ctx, local_abspath, FALSE,
-                           scratch_pool));
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
+  /* Reads the WORKING kind. Not the BASE kind */
+  SVN_ERR(svn_wc_read_kind2(kind, scb->wc_ctx, local_abspath,
+                            TRUE, FALSE, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -410,6 +410,7 @@ fetch_base_func(const char **filename,
       return SVN_NO_ERROR;
     }
 
+  /* Reads the pristine of WORKING, not of BASE */
   err = svn_wc_get_pristine_contents2(&pristine_stream, scb->wc_ctx,
                                       local_abspath, scratch_pool,
                                       scratch_pool);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/compat.c Mon Mar 18 09:35:24 2013
@@ -172,7 +172,7 @@ struct change_node
   /* what kind of (tree) restructure is occurring at this node?  */
   enum restructure_action_t action;
 
-  svn_kind_t kind;  /* the NEW kind of this node  */
+  svn_node_kind_t kind;  /* the NEW kind of this node  */
 
   /* We need two revisions: one to specify the revision we are altering,
      and a second to specify the revision to delete/replace. These are
@@ -229,7 +229,7 @@ locate_change(struct ev2_edit_baton *eb,
 static svn_error_t *
 apply_propedit(struct ev2_edit_baton *eb,
                const char *relpath,
-               svn_kind_t kind,
+               svn_node_kind_t kind,
                svn_revnum_t base_revision,
                const char *name,
                const svn_string_t *value,
@@ -237,7 +237,7 @@ apply_propedit(struct ev2_edit_baton *eb
 {
   struct change_node *change = locate_change(eb, relpath);
 
-  SVN_ERR_ASSERT(change->kind == svn_kind_unknown || change->kind == kind);
+  SVN_ERR_ASSERT(change->kind == svn_node_unknown || change->kind == kind);
   change->kind = kind;
 
   /* We're now changing the node. Record the revision.  */
@@ -321,7 +321,7 @@ process_actions(struct ev2_edit_baton *e
   apr_hash_t *props = NULL;
   svn_stream_t *contents = NULL;
   svn_checksum_t *checksum = NULL;
-  svn_kind_t kind = svn_kind_unknown;
+  svn_node_kind_t kind = svn_node_unknown;
 
   SVN_ERR_ASSERT(change != NULL);
 
@@ -351,7 +351,7 @@ process_actions(struct ev2_edit_baton *e
     {
       /* We can only set text on files. */
       /* ### validate we aren't overwriting KIND?  */
-      kind = svn_kind_file;
+      kind = svn_node_file;
 
       /* ### the checksum might be in CHANGE->CHECKSUM  */
       SVN_ERR(svn_io_file_checksum2(&checksum, change->contents_abspath,
@@ -387,7 +387,7 @@ process_actions(struct ev2_edit_baton *e
           if (props == NULL)
             props = apr_hash_make(scratch_pool);
 
-          if (kind == svn_kind_dir)
+          if (kind == svn_node_dir)
             {
               const apr_array_header_t *children;
 
@@ -435,7 +435,7 @@ process_actions(struct ev2_edit_baton *e
 
       /* ### we need to gather up the target set of children  */
 
-      if (kind == svn_kind_dir)
+      if (kind == svn_node_dir)
         SVN_ERR(svn_editor_alter_directory(eb->editor, repos_relpath,
                                            change->changing, NULL, props));
       else
@@ -573,7 +573,7 @@ ev2_add_directory(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
 
   cb->eb = pb->eb;
   cb->path = apr_pstrdup(result_pool, relpath);
@@ -644,7 +644,7 @@ ev2_change_dir_prop(void *dir_baton,
 {
   struct ev2_dir_baton *db = dir_baton;
 
-  SVN_ERR(apply_propedit(db->eb, db->path, svn_kind_dir, db->base_revision,
+  SVN_ERR(apply_propedit(db->eb, db->path, svn_node_dir, db->base_revision,
                          name, value, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -668,7 +668,7 @@ ev2_absent_directory(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD_ABSENT;
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
 
   return SVN_NO_ERROR;
 }
@@ -690,7 +690,7 @@ ev2_add_file(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
 
   fb->eb = pb->eb;
   fb->path = apr_pstrdup(result_pool, relpath);
@@ -856,7 +856,7 @@ ev2_change_file_prop(void *file_baton,
       change->unlock = TRUE;
     }
 
-  SVN_ERR(apply_propedit(fb->eb, fb->path, svn_kind_file, fb->base_revision,
+  SVN_ERR(apply_propedit(fb->eb, fb->path, svn_node_file, fb->base_revision,
                          name, value, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -881,7 +881,7 @@ ev2_absent_file(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD_ABSENT;
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
 
   return SVN_NO_ERROR;
 }
@@ -1069,7 +1069,7 @@ add_directory_cb(void *baton,
   struct change_node *change = insert_change(relpath, eb->changes);
 
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
   change->deleting = replaces_rev;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
 
@@ -1106,7 +1106,7 @@ add_file_cb(void *baton,
   SVN_ERR(svn_stream_copy3(contents, tmp_stream, NULL, NULL, scratch_pool));
 
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
   change->deleting = replaces_rev;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
   change->contents_abspath = tmp_filename;
@@ -1129,7 +1129,7 @@ add_symlink_cb(void *baton,
   struct change_node *change = insert_change(relpath, eb->changes);
 
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_symlink;
+  change->kind = svn_node_symlink;
   change->deleting = replaces_rev;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
   /* ### target  */
@@ -1142,7 +1142,7 @@ add_symlink_cb(void *baton,
 static svn_error_t *
 add_absent_cb(void *baton,
               const char *relpath,
-              svn_kind_t kind,
+              svn_node_kind_t kind,
               svn_revnum_t replaces_rev,
               apr_pool_t *scratch_pool)
 {
@@ -1174,7 +1174,7 @@ alter_directory_cb(void *baton,
 
   /* Note: this node may already have information in CHANGE as a result
      of an earlier copy/move operation.  */
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
   change->changing = revision;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
 
@@ -1220,7 +1220,7 @@ alter_file_cb(void *baton,
   /* Note: this node may already have information in CHANGE as a result
      of an earlier copy/move operation.  */
 
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
   change->changing = revision;
   if (props != NULL)
     change->props = svn_prop_hash_dup(props, eb->edit_pool);
@@ -1260,7 +1260,7 @@ delete_cb(void *baton,
   struct change_node *change = insert_change(relpath, eb->changes);
 
   change->action = RESTRUCTURE_DELETE;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = revision;
 
   return SVN_NO_ERROR;
@@ -1279,7 +1279,7 @@ copy_cb(void *baton,
   struct change_node *change = insert_change(dst_relpath, eb->changes);
 
   change->action = RESTRUCTURE_ADD;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = replaces_rev;
   change->copyfrom_path = apr_pstrdup(eb->edit_pool, src_relpath);
   change->copyfrom_rev = src_revision;
@@ -1312,12 +1312,12 @@ move_cb(void *baton,
 
   change = insert_change(src_relpath, eb->changes);
   change->action = RESTRUCTURE_DELETE;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = src_revision;
 
   change = insert_change(dst_relpath, eb->changes);
   change->action = RESTRUCTURE_ADD;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = replaces_rev;
   change->copyfrom_path = apr_pstrdup(eb->edit_pool, src_relpath);
   change->copyfrom_rev = src_revision;
@@ -1531,7 +1531,7 @@ drive_ev1_props(const struct editor_bato
 
       svn_pool_clear(iterpool);
 
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->change_dir_prop(node_baton,
                                              prop->name, prop->value,
                                              iterpool));
@@ -1544,7 +1544,7 @@ drive_ev1_props(const struct editor_bato
   /* Handle the funky unlock protocol. Note: only possibly on files.  */
   if (change->unlock)
     {
-      SVN_ERR_ASSERT(change->kind == svn_kind_file);
+      SVN_ERR_ASSERT(change->kind == svn_node_file);
       SVN_ERR(eb->deditor->change_file_prop(node_baton,
                                             SVN_PROP_ENTRY_LOCK_TOKEN, NULL,
                                             iterpool));
@@ -1603,11 +1603,11 @@ apply_change(void **dir_baton,
     }
 
   /* If we're not deleting this node, then we should know its kind.  */
-  SVN_ERR_ASSERT(change->kind != svn_kind_unknown);
+  SVN_ERR_ASSERT(change->kind != svn_node_unknown);
 
   if (change->action == RESTRUCTURE_ADD_ABSENT)
     {
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->absent_directory(ev1_relpath, parent_baton,
                                               scratch_pool));
       else
@@ -1646,7 +1646,7 @@ apply_change(void **dir_baton,
           copyfrom_rev = change->copyfrom_rev;
         }
 
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->add_directory(ev1_relpath, parent_baton,
                                            copyfrom_url, copyfrom_rev,
                                            result_pool, dir_baton));
@@ -1657,7 +1657,7 @@ apply_change(void **dir_baton,
     }
   else
     {
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->open_directory(ev1_relpath, parent_baton,
                                             change->changing,
                                             result_pool, dir_baton));
@@ -1668,7 +1668,7 @@ apply_change(void **dir_baton,
     }
 
   /* Apply any properties in CHANGE to the node.  */
-  if (change->kind == svn_kind_dir)
+  if (change->kind == svn_node_dir)
     SVN_ERR(drive_ev1_props(eb, relpath, change, *dir_baton, scratch_pool));
   else
     SVN_ERR(drive_ev1_props(eb, relpath, change, file_baton, scratch_pool));
@@ -1720,7 +1720,7 @@ drive_changes(const struct editor_baton 
      did in start_edit_func(). We can forge up a change record, if one
      does not already exist.  */
   change = insert_change(eb->base_relpath, eb->changes);
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
   /* No property changes (tho they might exist from a real change).  */
 
   /* Get a sorted list of Ev1-relative paths.  */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c Mon Mar 18 09:35:24 2013
@@ -600,7 +600,7 @@ svn_editor_add_symlink(svn_editor_t *edi
 svn_error_t *
 svn_editor_add_absent(svn_editor_t *editor,
                       const char *relpath,
-                      svn_kind_t kind,
+                      svn_node_kind_t kind,
                       svn_revnum_t replaces_rev)
 {
   svn_error_t *err = SVN_NO_ERROR;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c Mon Mar 18 09:35:24 2013
@@ -903,6 +903,14 @@ write_handler(void *baton,
   /* NOTREACHED */
 }
 
+/* Minimal svn_stream_t write handler, doing nothing */
+static svn_error_t *
+noop_write_handler(void *baton,
+                   const char *buffer,
+                   apr_size_t *len)
+{
+  return SVN_NO_ERROR;
+}
 
 static svn_error_t *
 close_handler(void *baton)
@@ -944,8 +952,18 @@ svn_txdelta_parse_svndiff(svn_txdelta_wi
   db->header_bytes = 0;
   db->error_on_early_close = error_on_early_close;
   stream = svn_stream_create(db, pool);
-  svn_stream_set_write(stream, write_handler);
-  svn_stream_set_close(stream, close_handler);
+
+  if (handler != svn_delta_noop_window_handler)
+    {
+      svn_stream_set_write(stream, write_handler);
+      svn_stream_set_close(stream, close_handler);
+    }
+  else
+    {
+      /* And else we just ignore everything as efficiently as we can.
+         by only hooking a no-op handler */
+      svn_stream_set_write(stream, noop_write_handler);
+    }
   return stream;
 }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_tree.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_tree.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_tree.c Mon Mar 18 09:35:24 2013
@@ -29,6 +29,7 @@
 
 #include "svn_dirent_uri.h"
 #include "svn_error.h"
+#include "svn_io.h"
 #include "svn_pools.h"
 #include "svn_props.h"
 #include "svn_types.h"
@@ -1112,9 +1113,20 @@ copy_as_changed_file_added(const char *r
   if (copyfrom_source)
     {
       apr_array_header_t *propchanges;
+      svn_boolean_t same;
       SVN_ERR(svn_prop_diffs(&propchanges, right_props, copyfrom_props,
                              scratch_pool));
 
+      /* "" is sometimes a marker for just modified (E.g. no-textdeltas),
+         and it is certainly not a file */
+      if (*copyfrom_file && *right_file)
+        {
+          SVN_ERR(svn_io_files_contents_same_p(&same, copyfrom_file,
+                                               right_file, scratch_pool));
+        }
+      else
+        same = FALSE;
+
       SVN_ERR(cb->processor->file_changed(relpath,
                                           copyfrom_source,
                                           right_source,
@@ -1122,7 +1134,7 @@ copy_as_changed_file_added(const char *r
                                           right_file,
                                           copyfrom_props,
                                           right_props,
-                                          copyfrom_file && right_file,
+                                          !same,
                                           propchanges,
                                           file_baton,
                                           cb->processor,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs/editor.c Mon Mar 18 09:35:24 2013
@@ -443,7 +443,7 @@ add_symlink_cb(void *baton,
 static svn_error_t *
 add_absent_cb(void *baton,
               const char *relpath,
-              svn_kind_t kind,
+              svn_node_kind_t kind,
               svn_revnum_t replaces_rev,
               apr_pool_t *scratch_pool)
 {

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/locks-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/locks-table.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/locks-table.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/bdb/locks-table.c Mon Mar 18 09:35:24 2013
@@ -26,6 +26,7 @@
 #include "bdb_compat.h"
 
 #include "svn_pools.h"
+#include "svn_path.h"
 #include "private/svn_skel.h"
 
 #include "dbt.h"

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/reps-strings.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/reps-strings.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/reps-strings.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/reps-strings.c Mon Mar 18 09:35:24 2013
@@ -1464,14 +1464,16 @@ svn_fs_base__rep_deltify(svn_fs_t *fs,
                                                 TRUE, trail, pool));
 
   /* Setup a stream to convert the textdelta data into svndiff windows. */
-  svn_txdelta(&txdelta_stream, source_stream, target_stream, pool);
+  svn_txdelta2(&txdelta_stream, source_stream, target_stream, TRUE, pool);
 
   if (bfd->format >= SVN_FS_BASE__MIN_SVNDIFF1_FORMAT)
-    svn_txdelta_to_svndiff2(&new_target_handler, &new_target_handler_baton,
-                            new_target_stream, 1, pool);
+    svn_txdelta_to_svndiff3(&new_target_handler, &new_target_handler_baton,
+                            new_target_stream, 1,
+                            SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
   else
-    svn_txdelta_to_svndiff2(&new_target_handler, &new_target_handler_baton,
-                            new_target_stream, 0, pool);
+    svn_txdelta_to_svndiff3(&new_target_handler, &new_target_handler_baton,
+                            new_target_stream, 0,
+                            SVN_DELTA_COMPRESSION_LEVEL_DEFAULT, pool);
 
   /* subpool for the windows */
   wpool = svn_pool_create(pool);

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/tree.c Mon Mar 18 09:35:24 2013
@@ -4024,7 +4024,7 @@ base_get_file_delta_stream(svn_txdelta_s
   SVN_ERR(base_file_contents(&target, target_root, target_path, pool));
 
   /* Create a delta stream that turns the ancestor into the target.  */
-  svn_txdelta(&delta_stream, source, target, pool);
+  svn_txdelta2(&delta_stream, source, target, TRUE, pool);
 
   *stream_p = delta_stream;
   return SVN_NO_ERROR;

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/dag.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/dag.c Mon Mar 18 09:35:24 2013
@@ -1095,7 +1095,7 @@ svn_fs_fs__dag_serialize(void **data,
   svn_temp_serializer__context_t *context =
       svn_temp_serializer__init(node,
                                 sizeof(*node),
-                                1007,
+                                1024 - SVN_TEMP_SERIALIZER__OVERHEAD,
                                 pool);
 
   /* for mutable nodes, we will _never_ cache the noderev */

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c Mon Mar 18 09:35:24 2013
@@ -3259,7 +3259,7 @@ log_revprop_cache_init_warning(svn_fs_t 
                                svn_error_t *underlying_err,
                                const char *message)
 {
-  svn_error_t *err = svn_error_createf(SVN_ERR_FS_REPPROP_CACHE_INIT_FAILURE,
+  svn_error_t *err = svn_error_createf(SVN_ERR_FS_REVPROP_CACHE_INIT_FAILURE,
                                        underlying_err,
                                        message, fs->path);
 
@@ -3801,7 +3801,7 @@ read_pack_revprop(packed_revprops_t **re
 
   /* the file content should be available now */
   if (!result->packed_revprops)
-    return svn_error_createf(SVN_ERR_FS_PACKED_REPPROP_READ_FAILURE, NULL,
+    return svn_error_createf(SVN_ERR_FS_PACKED_REVPROP_READ_FAILURE, NULL,
                   _("Failed to read revprop pack file for rev %ld"), rev);
 
   /* parse it. RESULT will be complete afterwards. */
@@ -4386,12 +4386,14 @@ create_rep_state_body(struct rep_state *
 
   /* If the hint is
    * - given,
+   * - refers to a valid revision,
    * - refers to a packed revision,
    * - as does the rep we want to read, and
    * - refers to the same pack file as the rep
    * ...
    */
   if (   file_hint && rev_hint && *file_hint
+      && SVN_IS_VALID_REVNUM(*rev_hint)
       && *rev_hint < ffd->min_unpacked_rev
       && rep->revision < ffd->min_unpacked_rev
       && (   (*rev_hint / ffd->max_files_per_dir)

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c Mon Mar 18 09:35:24 2013
@@ -739,9 +739,12 @@ svn_fs_fs__serialize_node_revision(void 
   svn_stringbuf_t *serialized;
   node_revision_t *noderev = item;
 
-  /* create an (empty) serialization context with plenty of buffer space */
+  /* create an (empty) serialization context with plenty of (initial)
+   * buffer space. */
   svn_temp_serializer__context_t *context =
-      svn_temp_serializer__init(NULL, 0, 1007, pool);
+      svn_temp_serializer__init(NULL, 0,
+                                1024 - SVN_TEMP_SERIALIZER__OVERHEAD,
+                                pool);
 
   /* serialize the noderev */
   svn_fs_fs__noderev_serialize(context, &noderev);