You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/11/07 15:30:36 UTC

svn commit: r1032285 [2/4] - in /subversion/branches/performance: ./ build/ build/ac-macros/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/apache/subversion/javahl/cal...

Modified: subversion/branches/performance/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/export.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/export.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/export.c Sun Nov  7 14:30:34 2010
@@ -929,8 +929,8 @@ close_file(void *file_baton,
 
 svn_error_t *
 svn_client_export5(svn_revnum_t *result_rev,
-                   const char *from,
-                   const char *to,
+                   const char *from_path_or_url,
+                   const char *to_path,
                    const svn_opt_revision_t *peg_revision,
                    const svn_opt_revision_t *revision,
                    svn_boolean_t overwrite,
@@ -947,15 +947,16 @@ svn_client_export5(svn_revnum_t *result_
   SVN_ERR_ASSERT(peg_revision != NULL);
   SVN_ERR_ASSERT(revision != NULL);
 
-  if (svn_path_is_url(to))
+  if (svn_path_is_url(to_path))
     return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
                                               _("'%s' is not a local path"),
-                                              to));
+                                              to_path));
     
-  peg_revision = svn_cl__rev_default_to_head_or_working(peg_revision, from);
+  peg_revision = svn_cl__rev_default_to_head_or_working(peg_revision,
+                                                        from_path_or_url);
   revision = svn_cl__rev_default_to_peg(revision, peg_revision);
 
-  if (svn_path_is_url(from) ||
+  if (svn_path_is_url(from_path_or_url) ||
       ! SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(revision->kind))
     {
       svn_revnum_t revnum;
@@ -966,14 +967,14 @@ svn_client_export5(svn_revnum_t *result_
 
       /* Get the RA connection. */
       SVN_ERR(svn_client__ra_session_from_path(&ra_session, &revnum,
-                                               &url, from, NULL,
+                                               &url, from_path_or_url, NULL,
                                                peg_revision,
                                                revision, ctx, pool));
 
       /* Get the repository root. */
       SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, pool));
 
-      eb->root_path = to;
+      eb->root_path = to_path;
       eb->root_url = url;
       eb->force = overwrite;
       eb->target_revision = &edit_revision;
@@ -993,6 +994,13 @@ svn_client_export5(svn_revnum_t *result_
           apr_hash_index_t *hi;
           struct file_baton *fb = apr_pcalloc(pool, sizeof(*fb));
 
+          if (svn_path_is_empty(to_path))
+            {
+              to_path = svn_path_uri_decode(svn_uri_basename(from_path_or_url,
+                                                             NULL), pool);
+              eb->root_path = to_path;
+            }
+          
           /* Since you cannot actually root an editor at a file, we
            * manually drive a few functions of our editor. */
 
@@ -1084,19 +1092,19 @@ svn_client_export5(svn_revnum_t *result_
            * So we just create the empty dir manually; but we do it via
            * open_root_internal(), in order to get proper notification.
            */
-          SVN_ERR(svn_io_check_path(to, &kind, pool));
+          SVN_ERR(svn_io_check_path(to_path, &kind, pool));
           if (kind == svn_node_none)
             SVN_ERR(open_root_internal
-                    (to, overwrite, ctx->notify_func2,
+                    (to_path, overwrite, ctx->notify_func2,
                      ctx->notify_baton2, pool));
 
           if (! ignore_externals && depth == svn_depth_infinity)
             {
               const char *to_abspath;
 
-              SVN_ERR(svn_dirent_get_absolute(&to_abspath, to, pool));
+              SVN_ERR(svn_dirent_get_absolute(&to_abspath, to_path, pool));
               SVN_ERR(svn_client__fetch_externals(eb->externals,
-                                                  from, to_abspath,
+                                                  from_path_or_url, to_abspath,
                                                   repos_root_url, depth, TRUE,
                                                   native_eol, &use_sleep,
                                                   ctx, pool));
@@ -1105,7 +1113,8 @@ svn_client_export5(svn_revnum_t *result_
       else if (kind == svn_node_none)
         {
           return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
-                                   _("URL '%s' doesn't exist"), from);
+                                   _("URL '%s' doesn't exist"),
+                                   from_path_or_url);
         }
       /* kind == svn_node_unknown not handled */
     }
@@ -1113,8 +1122,8 @@ svn_client_export5(svn_revnum_t *result_
     {
       /* This is a working copy export. */
       /* just copy the contents of the working copy into the target path. */
-      SVN_ERR(copy_versioned_files(from, to, revision, overwrite,
-                                   ignore_externals, ignore_keywords,
+      SVN_ERR(copy_versioned_files(from_path_or_url, to_path, revision,
+                                   overwrite, ignore_externals, ignore_keywords,
                                    depth, native_eol, ctx, pool));
     }
 
@@ -1122,7 +1131,7 @@ svn_client_export5(svn_revnum_t *result_
   if (ctx->notify_func2)
     {
       svn_wc_notify_t *notify
-        = svn_wc_create_notify(to,
+        = svn_wc_create_notify(to_path,
                                svn_wc_notify_update_completed, pool);
       notify->revision = edit_revision;
       (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);

Modified: subversion/branches/performance/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/info.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/info.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/info.c Sun Nov  7 14:30:34 2010
@@ -167,6 +167,9 @@ build_info_for_entry(svn_info_t **info,
   SVN_ERR(svn_wc__node_get_schedule(&tmpinfo->schedule, NULL,
                                     wc_ctx, local_abspath, pool));
 
+  SVN_ERR(svn_wc_get_wc_root(&tmpinfo->wcroot_abspath, wc_ctx,
+                             local_abspath, pool, pool));
+
   /* Some random stuffs we don't have wc-ng apis for yet */
   SVN_ERR(svn_wc__node_get_info_bits(&tmpinfo->text_time,
                                      &tmpinfo->conflict_old,
@@ -692,6 +695,8 @@ svn_info_dup(const svn_info_t *info, apr
     dupinfo->conflict_wrk = apr_pstrdup(pool, info->conflict_wrk);
   if (info->prejfile)
     dupinfo->prejfile = apr_pstrdup(pool, info->prejfile);
+  if (info->wcroot_abspath)
+    dupinfo->wcroot_abspath = apr_pstrdup(pool, info->wcroot_abspath);
 
   return dupinfo;
 }

Modified: subversion/branches/performance/subversion/libsvn_client/locking_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/locking_commands.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/locking_commands.c Sun Nov  7 14:30:34 2010
@@ -182,6 +182,23 @@ organize_lock_targets(const char **commo
   apr_hash_t *rel_targets_ret = apr_hash_make(pool);
   apr_pool_t *subpool = svn_pool_create(pool);
   svn_boolean_t url_mode;
+  svn_boolean_t wc_present = FALSE, url_present = FALSE;
+
+  /* Check to see if at least one of our paths is a working copy
+   * path or a repository url. */
+  for (i = 0; i < targets->nelts; ++i)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+      if (! svn_path_is_url(target))
+       wc_present = TRUE;
+      else
+       url_present = TRUE;
+    }
+
+  if (url_present && wc_present)
+    return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                             _("Cannot mix repository and working copy "
+                               "targets"));
 
   /* All targets must be either urls or paths */
 

Modified: subversion/branches/performance/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/merge.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/merge.c Sun Nov  7 14:30:34 2010
@@ -1723,13 +1723,14 @@ merge_file_added(const char *local_dir_a
                    copying 'yours' to 'mine', isn't enough; we need to get
                    the whole text-base and props installed too, just as if
                    we had called 'svn cp wc wc'. */
-                /* ### would be nice to have cancel/notify funcs to pass */
                 SVN_ERR(svn_wc_add_repos_file4(
                             merge_b->ctx->wc_ctx, mine_abspath,
                             new_base_contents, new_contents,
                             new_base_props, new_props,
                             copyfrom_url, copyfrom_rev,
-                            NULL, NULL, NULL, NULL, subpool));
+                            merge_b->ctx->cancel_func,
+                            merge_b->ctx->cancel_baton,
+                            subpool));
 
                 /* ### delete 'yours' ? */
               }

Modified: subversion/branches/performance/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/patch.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/patch.c Sun Nov  7 14:30:34 2010
@@ -2042,8 +2042,11 @@ create_missing_parents(patch_target_t *t
                * to version control. Allow cancellation since we
                * have not modified the working copy yet for this
                * target. */
+
+              if (ctx->cancel_func)
+                SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
+
               SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, local_abspath,
-                                           ctx->cancel_func, ctx->cancel_baton,
                                            ctx->notify_func2, ctx->notify_baton2,
                                            iterpool));
             }
@@ -2123,10 +2126,10 @@ install_patched_target(patch_target_t *t
               /* The target file didn't exist previously,
                * so add it to version control.
                * Suppress notification, we'll do that later (and also
-               * during dry-run). Also suppress cancellation because
+               * during dry-run). Don't allow cancellation because
                * we'd rather notify about what we did before aborting. */
               SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, target->local_abspath,
-                                           NULL, NULL, NULL, NULL, pool));
+                                           NULL, NULL, pool));
             }
 
           /* Restore the target's executable bit if necessary. */
@@ -2247,8 +2250,9 @@ install_patched_prop_targets(patch_targe
             {
               SVN_ERR(svn_io_file_create(target->local_abspath, "",
                                          scratch_pool));
+              if (ctx->cancel_func)
+                SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
               SVN_ERR(svn_wc_add_from_disk(ctx->wc_ctx, target->local_abspath,
-                                           ctx->cancel_func, ctx->cancel_baton,
                                            /* suppress notification */
                                            NULL, NULL,
                                            iterpool));

Modified: subversion/branches/performance/subversion/libsvn_client/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/relocate.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/relocate.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/relocate.c Sun Nov  7 14:30:34 2010
@@ -229,8 +229,8 @@ relocate_externals(const char *local_abs
 
 svn_error_t *
 svn_client_relocate2(const char *wcroot_dir,
-                     const char *from,
-                     const char *to,
+                     const char *from_prefix,
+                     const char *to_prefix,
                      svn_boolean_t ignore_externals,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *pool)
@@ -254,8 +254,8 @@ svn_client_relocate2(const char *wcroot_
   if (ignore_externals)
     {
       return svn_error_return(svn_wc_relocate4(ctx->wc_ctx, local_abspath,
-                                               from, to, validator_func, &vb,
-                                               pool));
+                                               from_prefix, to_prefix,
+                                               validator_func, &vb, pool));
     }
 
   /* Fetch our current root URL. */
@@ -263,7 +263,7 @@ svn_client_relocate2(const char *wcroot_
                                         ctx, pool));
 
   /* Perform the relocation. */
-  SVN_ERR(svn_wc_relocate4(ctx->wc_ctx, local_abspath, from, to,
+  SVN_ERR(svn_wc_relocate4(ctx->wc_ctx, local_abspath, from_prefix, to_prefix,
                            validator_func, &vb, pool));
 
   /* Now fetch new current root URL. */

Modified: subversion/branches/performance/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/resolved.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/resolved.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/resolved.c Sun Nov  7 14:30:34 2010
@@ -36,6 +36,7 @@
 #include "client.h"
 #include "private/svn_wc_private.h"
 
+#include "svn_private_config.h"
 
 /*** Code. ***/
 
@@ -48,6 +49,11 @@ svn_client_resolve(const char *path,
 {
   const char *local_abspath;
 
+  if (svn_path_is_url(path))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                              _("'%s' is not a local path"),
+                                              path));
+
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
 
   SVN_ERR(svn_wc_resolved_conflict5(ctx->wc_ctx, local_abspath,

Modified: subversion/branches/performance/subversion/libsvn_client/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/revert.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/revert.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/revert.c Sun Nov  7 14:30:34 2010
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_path.h"
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_dirent_uri.h"
@@ -37,6 +38,7 @@
 #include "client.h"
 #include "private/svn_wc_private.h"
 
+#include "svn_private_config.h"
 
 
 /*** Code. ***/
@@ -121,6 +123,19 @@ svn_client_revert2(const apr_array_heade
   svn_boolean_t use_commit_times;
   struct revert_with_write_lock_baton baton;
 
+  /* Don't even attempt to modify the working copy if any of the
+   * targets look like URLs. URLs are invalid input. */
+  for (i = 0; i < paths->nelts; i++)
+    {
+      const char *path = APR_ARRAY_IDX(paths, i, const char *);
+
+      if (svn_path_is_url(path))
+        return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  path));
+    }
+  
   cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
                                    APR_HASH_KEY_STRING) : NULL;
 

Modified: subversion/branches/performance/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/status.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/status.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/status.c Sun Nov  7 14:30:34 2010
@@ -32,6 +32,7 @@
 #include "svn_pools.h"
 #include "client.h"
 
+#include "svn_path.h"
 #include "svn_dirent_uri.h"
 #include "svn_delta.h"
 #include "svn_client.h"
@@ -268,6 +269,11 @@ svn_client_status5(svn_revnum_t *result_
   apr_hash_t *changelist_hash = NULL;
   struct svn_cl__externals_store externals_store = { NULL };
 
+  if (svn_path_is_url(path))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                              _("'%s' is not a local path"),
+                                              path));
+
   if (changelists && changelists->nelts)
     SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
 

Modified: subversion/branches/performance/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_repos/dump.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/performance/subversion/libsvn_repos/dump.c Sun Nov  7 14:30:34 2010
@@ -386,7 +386,7 @@ dump_node(struct edit_baton *eb,
 
               SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5,
                                            compare_root, compare_path,
-                                           TRUE, pool));
+                                           FALSE, pool));
               hex_digest = svn_checksum_to_cstring(checksum, pool);
               if (hex_digest)
                 SVN_ERR(svn_stream_printf(eb->stream, pool,
@@ -395,7 +395,7 @@ dump_node(struct edit_baton *eb,
 
               SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_sha1,
                                            compare_root, compare_path,
-                                           TRUE, pool));
+                                           FALSE, pool));
               hex_digest = svn_checksum_to_cstring(checksum, pool);
               if (hex_digest)
                 SVN_ERR(svn_stream_printf(eb->stream, pool,
@@ -513,7 +513,7 @@ dump_node(struct edit_baton *eb,
             {
               SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5,
                                            compare_root, compare_path,
-                                           TRUE, pool));
+                                           FALSE, pool));
               hex_digest = svn_checksum_to_cstring(checksum, pool);
               if (hex_digest)
                 SVN_ERR(svn_stream_printf(eb->stream, pool,
@@ -522,7 +522,7 @@ dump_node(struct edit_baton *eb,
 
               SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_sha1,
                                            compare_root, compare_path,
-                                           TRUE, pool));
+                                           FALSE, pool));
               hex_digest = svn_checksum_to_cstring(checksum, pool);
               if (hex_digest)
                 SVN_ERR(svn_stream_printf(eb->stream, pool,
@@ -542,7 +542,7 @@ dump_node(struct edit_baton *eb,
                                 ": %" SVN_FILESIZE_T_FMT "\n", textlen));
 
       SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5,
-                                   eb->fs_root, path, TRUE, pool));
+                                   eb->fs_root, path, FALSE, pool));
       hex_digest = svn_checksum_to_cstring(checksum, pool);
       if (hex_digest)
         SVN_ERR(svn_stream_printf(eb->stream, pool,
@@ -550,7 +550,7 @@ dump_node(struct edit_baton *eb,
                                   ": %s\n", hex_digest));
 
       SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_sha1,
-                                   eb->fs_root, path, TRUE, pool));
+                                   eb->fs_root, path, FALSE, pool));
       hex_digest = svn_checksum_to_cstring(checksum, pool);
       if (hex_digest)
         SVN_ERR(svn_stream_printf(eb->stream, pool,

Modified: subversion/branches/performance/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_subr/subst.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/performance/subversion/libsvn_subr/subst.c Sun Nov  7 14:30:34 2010
@@ -800,7 +800,7 @@ struct translation_baton
   apr_size_t src_format_len;
 
   /* If this is svn_tristate_false, translate_newline() will be called
-     for every newline in the file. */
+     for every newline in the file */
   svn_tristate_t nl_translation_skippable;
 };
 
@@ -1005,7 +1005,7 @@ translate_chunk(svn_stream_t *dst,
                 b->nl_translation_skippable = svn_tristate_false;
             }
 
-          /* We're in the boring state; look for interest characters.
+          /* We're in the boring state; look for interesting characters.
              Offset len such that it will become 0 in the first iteration. 
            */
           len = 0 - b->eol_str_len;
@@ -1038,9 +1038,10 @@ translate_chunk(svn_stream_t *dst,
                while ((p + len) < end && !interesting[(unsigned char)p[len]])
                  ++len;
             }
-          while (b->nl_translation_skippable == svn_tristate_true &&   /* can skip EOLs at all */
-                 p + len + 2 < end &&             /* not too close to EOF */
-                 eol_unchanged (b, p + len));     /* EOL format already ok */
+          while (b->nl_translation_skippable ==
+                   svn_tristate_true &&       /* can potentially skip EOLs */
+                 p + len + 2 < end &&         /* not too close to EOF */
+                 eol_unchanged (b, p + len)); /* EOL format already ok */
 
           while ((p + len) < end && !interesting[(unsigned char)p[len]])
             len++;

Modified: subversion/branches/performance/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/adm_crawler.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/adm_crawler.c Sun Nov  7 14:30:34 2010
@@ -347,7 +347,8 @@ report_revisions_and_depths(svn_wc__db_t
       svn_revnum_t this_rev;
       svn_depth_t this_depth;
       svn_wc__db_lock_t *this_lock;
-      svn_boolean_t this_switched;
+      svn_boolean_t this_switched = FALSE;
+      svn_boolean_t this_file_external = FALSE;
 
       /* Clear the iteration subpool here because the loop has a bunch
          of 'continue' jump statements. */
@@ -461,7 +462,6 @@ report_revisions_and_depths(svn_wc__db_t
       /* And finally prepare for reporting */
       if (!this_repos_relpath)
         {
-          this_switched = FALSE;
           this_repos_relpath = svn_relpath_join(dir_repos_relpath, child,
                                                 iterpool);
         }
@@ -472,9 +472,20 @@ report_revisions_and_depths(svn_wc__db_t
                                                        NULL);
 
           if (childname == NULL || strcmp(childname, child) != 0)
-            this_switched = TRUE;
-          else
-            this_switched = FALSE;
+            {
+              const char *file_ext_str;
+
+              this_switched = TRUE;
+             
+              /* This could be a file external!  We need to know
+                 that. */
+              SVN_ERR(svn_wc__db_temp_get_file_external(&file_ext_str, db,
+                                                        this_abspath,
+                                                        scratch_pool,
+                                                        scratch_pool));
+              if (file_ext_str)
+                this_file_external = TRUE;
+            }
         }
 
       /* Tweak THIS_DEPTH to a useful value.  */
@@ -489,9 +500,15 @@ report_revisions_and_depths(svn_wc__db_t
       if (!SVN_IS_VALID_REVNUM(this_rev))
         this_rev = dir_rev;
 
+      /*** File Externals **/
+      if (this_file_external)
+        {
+          /* File externals are ... special.  We ignore them. */;
+        }
+
       /*** Files ***/
-      if (this_kind == svn_wc__db_kind_file ||
-          this_kind == svn_wc__db_kind_symlink)
+      else if (this_kind == svn_wc__db_kind_file ||
+               this_kind == svn_wc__db_kind_symlink)
         {
           if (report_everything)
             {

Modified: subversion/branches/performance/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/adm_files.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/adm_files.c Sun Nov  7 14:30:34 2010
@@ -774,7 +774,6 @@ svn_wc_create_tmp_file2(apr_file_t **fp,
   svn_wc__db_t *db;
   const char *local_abspath;
   const char *temp_dir;
-  apr_file_t *file;
   svn_error_t *err;
 
   SVN_ERR_ASSERT(fp || new_name);
@@ -792,14 +791,9 @@ svn_wc_create_tmp_file2(apr_file_t **fp,
   if (err)
     return svn_error_return(err);
 
-  SVN_ERR(svn_io_open_unique_file3(&file, new_name, temp_dir,
+  SVN_ERR(svn_io_open_unique_file3(fp, new_name, temp_dir,
                                    delete_when, pool, pool));
 
-  if (fp)
-    *fp = file;
-  else
-    SVN_ERR(svn_io_file_close(file, pool));
-
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/performance/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/adm_ops.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/adm_ops.c Sun Nov  7 14:30:34 2010
@@ -763,13 +763,14 @@ add_from_disk(svn_wc_context_t *wc_ctx,
    in a state in which a new child node can be scheduled for addition;
    return an error if not. */
 static svn_error_t *
-check_can_add_to_parent(svn_wc__db_t *db,
-                        const char **repos_root_url,
+check_can_add_to_parent(const char **repos_root_url,
                         const char **repos_uuid,
+                        svn_wc_context_t *wc_ctx,
                         const char *local_abspath,
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool)
 {
+  svn_wc__db_t *db = wc_ctx->db;
   const char *parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
   svn_wc__db_status_t parent_status;
   svn_wc__db_kind_t parent_kind;
@@ -782,7 +783,7 @@ check_can_add_to_parent(svn_wc__db_t *db
                              repos_uuid, NULL, NULL, NULL, NULL, NULL, NULL,
                              NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                              NULL, NULL, NULL, NULL,
-                             db, parent_abspath, scratch_pool, scratch_pool);
+                             db, parent_abspath, result_pool, scratch_pool);
 
   if (err
       || parent_status == svn_wc__db_status_not_present
@@ -812,7 +813,7 @@ check_can_add_to_parent(svn_wc__db_t *db
                              _("Can't schedule an addition of '%s'"
                                " below a not-directory node"),
                              svn_dirent_local_style(local_abspath,
-                                                 scratch_pool));
+                                                    scratch_pool));
 
   /* If we haven't found the repository info yet, find it now. */
   if ((repos_root_url && ! *repos_root_url)
@@ -823,12 +824,12 @@ check_can_add_to_parent(svn_wc__db_t *db
                                          repos_root_url, repos_uuid, NULL,
                                          NULL, NULL, NULL,
                                          db, parent_abspath,
-                                         scratch_pool, scratch_pool));
+                                         result_pool, scratch_pool));
       else
         SVN_ERR(svn_wc__db_scan_base_repos(NULL,
                                            repos_root_url, repos_uuid,
                                            db, parent_abspath,
-                                           scratch_pool, scratch_pool));
+                                           result_pool, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -952,6 +953,68 @@ check_can_add_node(svn_node_kind_t *kind
   return SVN_NO_ERROR;
 }
 
+/* Convert the nested pristine working copy rooted at LOCAL_ABSPATH into
+ * a copied subtree in the outer working copy.
+ *
+ * LOCAL_ABSPATH must be the root of a nested working copy that has no
+ * local modifications.  The parent directory of LOCAL_ABSPATH must be a
+ * versioned directory in the outer WC, and must belong to the same
+ * repository as the nested WC.  The nested WC will be integrated into the
+ * parent's WC, and will no longer be a separate WC. */
+static svn_error_t *
+integrate_nested_wc_as_copy(svn_wc_context_t *wc_ctx,
+                            const char *local_abspath,
+                            apr_pool_t *scratch_pool)
+{
+  svn_wc__db_t *db = wc_ctx->db;
+  const char *moved_abspath;
+
+  /* Drop any references to the wc that is to be rewritten */
+  SVN_ERR(svn_wc__db_drop_root(db, local_abspath, scratch_pool));
+
+  /* Move the admin dir from the wc to a temporary location: MOVED_ABSPATH */
+  {
+    const char *tmpdir_abspath, *moved_adm_abspath, *adm_abspath;
+
+    SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&tmpdir_abspath, db,
+                                           svn_dirent_dirname(local_abspath,
+                                                              scratch_pool),
+                                           scratch_pool, scratch_pool));
+    SVN_ERR(svn_io_open_unique_file3(NULL, &moved_abspath, tmpdir_abspath,
+                                     svn_io_file_del_on_close,
+                                     scratch_pool, scratch_pool));
+    SVN_ERR(svn_io_dir_make(moved_abspath, APR_OS_DEFAULT, scratch_pool));
+
+    adm_abspath = svn_wc__adm_child(local_abspath, "", scratch_pool);
+    moved_adm_abspath = svn_wc__adm_child(moved_abspath, "", scratch_pool);
+    SVN_ERR(svn_io_file_move(adm_abspath, moved_adm_abspath, scratch_pool));
+  }
+
+  /* Copy entries from temporary location into the main db */
+  SVN_ERR(svn_wc_copy3(wc_ctx, moved_abspath, local_abspath,
+                       TRUE /* metadata_only */,
+                       NULL, NULL, NULL, NULL, scratch_pool));
+
+  /* Cleanup the temporary admin dir */
+  SVN_ERR(svn_wc__db_drop_root(db, moved_abspath, scratch_pool));
+  SVN_ERR(svn_io_remove_dir2(moved_abspath, FALSE, NULL, NULL,
+                             scratch_pool));
+
+  /* The subdir is now part of our parent working copy. Our caller assumes
+     that we return the new node locked, so obtain a lock if we didn't
+     receive the lock via our depth infinity lock */
+  {
+    svn_boolean_t owns_lock;
+    SVN_ERR(svn_wc__db_wclock_owns_lock(&owns_lock, db, local_abspath,
+                                        FALSE, scratch_pool));
+    if (!owns_lock)
+      SVN_ERR(svn_wc__db_wclock_obtain(db, local_abspath, 0, FALSE,
+                                       scratch_pool));
+  }
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_wc_add4(svn_wc_context_t *wc_ctx,
             const char *local_abspath,
@@ -975,8 +1038,9 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
 
   /* Get REPOS_ROOT_URL and REPOS_UUID.  Check that the
      parent is a versioned directory in an acceptable state. */
-  SVN_ERR(check_can_add_to_parent(db, &repos_root_url, &repos_uuid,
-                                  local_abspath, scratch_pool, scratch_pool));
+  SVN_ERR(check_can_add_to_parent(&repos_root_url, &repos_uuid,
+                                  wc_ctx, local_abspath, scratch_pool,
+                                  scratch_pool));
 
   /* If we're performing a repos-to-WC copy, check that the copyfrom
      repository is the same as the parent dir's repository. */
@@ -1010,13 +1074,8 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
                                  inner_repos_root_url, inner_repos_uuid,
                                  repos_root_url, repos_uuid);
 
-      if (!svn_uri_is_ancestor(repos_root_url, copyfrom_url))
-        return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-                                 _("The URL '%s' is not in repository '%s'"),
-                                 copyfrom_url, repos_root_url);
-
       inner_url = svn_path_url_add_component2(repos_root_url, repos_relpath,
-                                             scratch_pool);
+                                              scratch_pool);
 
       if (strcmp(copyfrom_url, inner_url))
         return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
@@ -1057,73 +1116,30 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
           svn_stream_t *content = svn_stream_empty(scratch_pool);
 
           SVN_ERR(svn_wc_add_repos_file4(wc_ctx, local_abspath,
-                                         content, NULL,
-                                         NULL, NULL,
+                                         content, NULL, NULL, NULL,
                                          copyfrom_url, copyfrom_rev,
                                          cancel_func, cancel_baton,
-                                         NULL, NULL,
                                          scratch_pool));
         }
       else
-        SVN_ERR(svn_wc__db_op_copy_dir(db,
-                                       local_abspath,
+        SVN_ERR(svn_wc__db_op_copy_dir(db, local_abspath,
                                        apr_hash_make(scratch_pool),
-                                       copyfrom_rev,
-                                       0,
-                                       NULL,
+                                       copyfrom_rev, 0, NULL,
                                        svn_path_uri_decode(
-                                            svn_uri_skip_ancestor(repos_root_url,
-                                                                  copyfrom_url),
-                                            scratch_pool),
-                                       repos_root_url,
-                                       repos_uuid,
+                                         svn_uri_skip_ancestor(repos_root_url,
+                                                               copyfrom_url),
+                                         scratch_pool),
+                                       repos_root_url, repos_uuid,
                                        copyfrom_rev,
-                                       NULL,
-                                       depth,
-                                       NULL,
-                                       NULL,
+                                       NULL /* children */, depth,
+                                       NULL /* conflicts */,
+                                       NULL /* work items */,
                                        scratch_pool));
     }
   else  /* Case 1: Integrating a separate WC into this one, in place */
     {
-      svn_boolean_t owns_lock;
-      const char *tmpdir_abspath, *moved_abspath, *moved_adm_abspath;
-      const char *adm_abspath = svn_wc__adm_child(local_abspath, "",
-                                                  scratch_pool);
-
-      /* Drop any references to the wc that is to be rewritten */
-      SVN_ERR(svn_wc__db_drop_root(db, local_abspath, scratch_pool));
-
-      /* Move the admin dir from the wc to a temporary location */
-      SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&tmpdir_abspath, db,
-                                             svn_dirent_dirname(local_abspath,
-                                                                scratch_pool),
-                                             scratch_pool, scratch_pool));
-      SVN_ERR(svn_io_open_unique_file3(NULL, &moved_abspath, tmpdir_abspath,
-                                       svn_io_file_del_on_close,
-                                       scratch_pool, scratch_pool));
-      SVN_ERR(svn_io_dir_make(moved_abspath, APR_OS_DEFAULT, scratch_pool));
-      moved_adm_abspath = svn_wc__adm_child(moved_abspath, "", scratch_pool);
-      SVN_ERR(svn_io_file_move(adm_abspath, moved_adm_abspath, scratch_pool));
-
-      /* Copy entries from temporary location into the main db */
-      SVN_ERR(svn_wc_copy3(wc_ctx, moved_abspath, local_abspath,
-                           TRUE /* metadata_only */,
-                           NULL, NULL, NULL, NULL, scratch_pool));
-
-      /* Cleanup the temporary admin dir */
-      SVN_ERR(svn_wc__db_drop_root(db, moved_abspath, scratch_pool));
-      SVN_ERR(svn_io_remove_dir2(moved_abspath, FALSE, NULL, NULL,
-                                 scratch_pool));
-
-      /* The subdir is now part of our parent working copy. Our caller assumes
-         that we return the new node locked, so obtain a lock if we didn't
-         receive the lock via our depth infinity lock */
-      SVN_ERR(svn_wc__db_wclock_owns_lock(&owns_lock, db, local_abspath, FALSE,
+      SVN_ERR(integrate_nested_wc_as_copy(wc_ctx, local_abspath,
                                           scratch_pool));
-      if (!owns_lock)
-        SVN_ERR(svn_wc__db_wclock_obtain(db, local_abspath, 0, FALSE,
-                                         scratch_pool));
     }
 
   /* Report the addition to the caller. */
@@ -1142,8 +1158,6 @@ svn_wc_add4(svn_wc_context_t *wc_ctx,
 svn_error_t *
 svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
                      const char *local_abspath,
-                     svn_cancel_func_t cancel_func,
-                     void *cancel_baton,
                      svn_wc_notify_func2_t notify_func,
                      void *notify_baton,
                      apr_pool_t *scratch_pool)
@@ -1152,8 +1166,7 @@ svn_wc_add_from_disk(svn_wc_context_t *w
 
   SVN_ERR(check_can_add_node(&kind, NULL, NULL, wc_ctx, local_abspath,
                              NULL, SVN_INVALID_REVNUM, scratch_pool));
-  SVN_ERR(check_can_add_to_parent(wc_ctx->db, NULL, NULL,
-                                  local_abspath,
+  SVN_ERR(check_can_add_to_parent(NULL, NULL, wc_ctx, local_abspath,
                                   scratch_pool, scratch_pool));
   SVN_ERR(add_from_disk(wc_ctx, local_abspath, kind, scratch_pool));
 

Modified: subversion/branches/performance/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/copy.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/copy.c Sun Nov  7 14:30:34 2010
@@ -449,7 +449,7 @@ TODO: We will probably want to notify al
   copying, taking care to include any 'excluded' nodes but ignore any
   'deleted' paths that may be left over from a replaced sub-tree.
 
-copy_versioned_node:
+copy_versioned_tree:
   # Copy a versioned file/dir SRC_PATH to DST_PATH, recursively.
 
   # This function takes care to copy both the metadata tree and the disk
@@ -480,9 +480,12 @@ copy_versioned_node:
 
 */
 
-/* Copy a versioned file/dir SRC_PATH to DST_PATH, recursively. */
+/* Copy the working version of the versioned tree at SRC_ABSPATH to
+ * DST_ABSPATH, recursively.  If METADATA_ONLY is true, then don't copy it
+ * on disk, only in metadata, and don't care whether it already exists on
+ * disk. */
 static svn_error_t *
-copy_versioned_node(svn_wc__db_t *db,
+copy_versioned_tree(svn_wc__db_t *db,
                     const char *src_abspath,
                     const char *dst_abspath,
                     svn_boolean_t metadata_only,
@@ -714,7 +717,7 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
 #ifdef SVN_WC__OP_DEPTH
   if (svn_wc__db_same_db(db, src_abspath, dst_abspath, scratch_pool))
     {
-      SVN_ERR(copy_versioned_node(db, src_abspath, dst_abspath,
+      SVN_ERR(copy_versioned_tree(db, src_abspath, dst_abspath,
                                   metadata_only,
                                   cancel_func, cancel_baton,
                                   notify_func, notify_baton,

Modified: subversion/branches/performance/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/deprecated.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/deprecated.c Sun Nov  7 14:30:34 2010
@@ -2729,7 +2729,6 @@ svn_wc_add_repos_file3(const char *dst_p
                                  copyfrom_url,
                                  copyfrom_rev,
                                  cancel_func, cancel_baton,
-                                 notify_func, notify_baton,
                                  pool));
 
   return svn_error_return(svn_wc_context_destroy(wc_ctx));

Modified: subversion/branches/performance/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/entries.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/entries.c Sun Nov  7 14:30:34 2010
@@ -487,7 +487,7 @@ get_base_info_for_deleted(svn_wc_entry_t
 static svn_error_t *
 read_one_entry(const svn_wc_entry_t **new_entry,
                svn_wc__db_t *db,
-               apr_uint64_t wc_id,
+               apr_int64_t wc_id,
                const char *dir_abspath,
                const char *name,
                const svn_wc_entry_t *parent_entry,
@@ -1068,7 +1068,7 @@ read_entries_new(apr_hash_t **result_ent
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   int i;
   const svn_wc_entry_t *parent_entry;
-  apr_uint64_t wc_id = 1;  /* ### hacky. should remove.  */
+  apr_int64_t wc_id = 1;  /* ### hacky. should remove.  */
 
   entries = apr_hash_make(result_pool);
 
@@ -1123,7 +1123,7 @@ read_entry_pair(const svn_wc_entry_t **p
                 apr_pool_t *result_pool,
                 apr_pool_t *scratch_pool)
 {
-  apr_uint64_t wc_id = 1;  /* ### hacky. should remove.  */
+  apr_int64_t wc_id = 1;  /* ### hacky. should remove.  */
 
   SVN_ERR(read_one_entry(parent_entry, db, wc_id, dir_abspath,
                          "" /* name */,
@@ -1998,7 +1998,7 @@ write_entry(svn_wc__db_t *db,
           SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
                                             STMT_UPDATE_FILE_EXTERNAL));
           SVN_ERR(svn_sqlite__bindf(stmt, "iss",
-                                    (apr_uint64_t)1 /* wc_id */,
+                                    (apr_int64_t)1 /* wc_id */,
                                     entry->name,
                                     str));
           SVN_ERR(svn_sqlite__step_done(stmt));

Modified: subversion/branches/performance/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/update_editor.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/update_editor.c Sun Nov  7 14:30:34 2010
@@ -1091,29 +1091,6 @@ window_handler(svn_txdelta_window_t *win
 }
 
 
-/* Prepare directory for dir_baton DB for updating or checking out.
- * Give it depth DEPTH.
- *
- * If the path already exists, but is not a working copy for
- * ANCESTOR_URL and ANCESTOR_REVISION, then an error will be returned.
- */
-static svn_error_t *
-prep_directory(struct dir_baton *db,
-               const char *ancestor_url,
-               svn_revnum_t ancestor_revision,
-               apr_pool_t *pool)
-{
-  const char *dir_abspath;
-
-  dir_abspath = db->local_abspath;
-
-  /* Make sure the directory exists. */
-  SVN_ERR(svn_wc__ensure_directory(dir_abspath, pool));
-
-  return SVN_NO_ERROR;
-}
-
-
 /* Find the last-change info within ENTRY_PROPS, and return then in the
    CHANGED_* parameters. Each parameter will be initialized to its "none"
    value, and will contain the relavent info if found.
@@ -2473,21 +2450,12 @@ add_directory(const char *path,
                                                        db->ambient_depth,
                                                        pool));
 
-  SVN_ERR(prep_directory(db,
-                         svn_path_url_add_component2(eb->repos_root,
-                                                     db->new_relpath, pool),
-                         *(eb->target_revision),
-                         db->pool));
-
-  /* If PATH is within a locally deleted tree then make it also
-     scheduled for deletion.  We must do this after the call to
-     prep_directory() otherwise the administrative area for DB->PATH
-     is not present, nor is there an entry for DB->PATH in DB->PATH's
-     entries. */
-  if (pb->in_deleted_and_tree_conflicted_subtree)
-    {
-      SVN_ERR(svn_wc__db_temp_op_delete(eb->db, db->local_abspath, pool));
-    }
+  SVN_ERR(svn_wc__ensure_directory(db->local_abspath, pool));
+
+  if (!pb->in_deleted_and_tree_conflicted_subtree
+      && status == svn_wc__db_status_added)
+    /* If there is no conflict we take over any added directory */
+    SVN_ERR(svn_wc__db_temp_op_remove_working(eb->db, db->local_abspath, pool));
 
   /* If this add was obstructed by dir scheduled for addition without
      history let close_file() handle the notification because there
@@ -4555,13 +4523,6 @@ close_file(void *file_baton,
 
   /* Deal with the WORKING tree, based on updates to the BASE tree.  */
 
-  /* An ancestor was locally-deleted. This file is being added within
-     that tree. We need to schedule this file for deletion.  */
-  if (fb->dir_baton->in_deleted_and_tree_conflicted_subtree && fb->adding_file)
-    {
-      SVN_ERR(svn_wc__db_temp_op_delete(eb->db, fb->local_abspath, pool));
-    }
-
   /* If this file was locally-added and is now being added by the update, we
      can toss the local-add, turning this into a local-edit.  */
   if (fb->add_existed && fb->adding_file)
@@ -4782,7 +4743,7 @@ tweak_entries(svn_wc__db_t *db,
       svn_wc__db_status_t status;
 
       const char *child_repos_relpath = NULL;
-      svn_boolean_t excluded;
+      svn_boolean_t excluded, is_file_external;
 
       svn_pool_clear(iterpool);
 
@@ -4792,12 +4753,21 @@ tweak_entries(svn_wc__db_t *db,
                                                child_basename, iterpool);
 
       child_abspath = svn_dirent_join(dir_abspath, child_basename, iterpool);
+
+      /* Skip stuff we've already decided to exclude. */
       excluded = (apr_hash_get(exclude_paths, child_abspath,
                                APR_HASH_KEY_STRING) != NULL);
-
       if (excluded)
         continue;
 
+      /* Skip stuff we've identified as file externals.  (If we're
+         here, we were doing an update of a directory, not the actual
+         switch handling of a file external itself.) */
+      SVN_ERR(svn_wc__internal_is_file_external(&is_file_external, db,
+                                                child_abspath, iterpool));
+      if (is_file_external)
+        continue;
+
       SVN_ERR(svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL,
                                    NULL, NULL, NULL, NULL, NULL, NULL,
                                    NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -5486,6 +5456,18 @@ svn_wc__strictly_is_wc_root(svn_boolean_
 
 
 svn_error_t *
+svn_wc_get_wc_root(const char **wcroot_abspath,
+                   svn_wc_context_t *wc_ctx,
+                   const char *local_abspath,
+                   apr_pool_t *scratch_pool,
+                   apr_pool_t *result_pool)
+{
+  return svn_wc__db_get_wcroot(wcroot_abspath, wc_ctx->db,
+                               local_abspath, scratch_pool, result_pool);
+}
+
+
+svn_error_t *
 svn_wc_get_actual_target2(const char **anchor,
                           const char **target,
                           svn_wc_context_t *wc_ctx,
@@ -5549,8 +5531,6 @@ svn_wc_add_repos_file4(svn_wc_context_t 
                        svn_revnum_t copyfrom_rev,
                        svn_cancel_func_t cancel_func,
                        void *cancel_baton,
-                       svn_wc_notify_func2_t notify_func,
-                       void *notify_baton,
                        apr_pool_t *scratch_pool)
 {
   svn_wc__db_t *db = wc_ctx->db;

Modified: subversion/branches/performance/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/upgrade.c?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/upgrade.c Sun Nov  7 14:30:34 2010
@@ -720,7 +720,7 @@ db_kind_from_node_kind(svn_node_kind_t n
 static svn_error_t *
 migrate_single_tree_conflict_data(svn_sqlite__db_t *sdb,
                                   const char *tree_conflict_data,
-                                  apr_uint64_t wc_id,
+                                  apr_int64_t wc_id,
                                   const char *local_relpath,
                                   apr_pool_t *scratch_pool)
 {
@@ -847,7 +847,7 @@ migrate_tree_conflicts(svn_sqlite__db_t 
   SVN_ERR(svn_sqlite__step(&have_row, select_stmt));
   while (have_row)
     {
-      apr_uint64_t wc_id;
+      apr_int64_t wc_id;
       const char *local_relpath;
       const char *tree_conflict_data;
 

Modified: subversion/branches/performance/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/wc-queries.sql?rev=1032285&r1=1032284&r2=1032285&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/performance/subversion/libsvn_wc/wc-queries.sql Sun Nov  7 14:30:34 2010
@@ -72,6 +72,13 @@ WHERE wc_id = ?1 AND local_relpath = ?2 
 ORDER BY op_depth DESC
 LIMIT 1;
 
+-- STMT_SELECT_LOWEST_WORKING_NODE
+SELECT op_depth, presence
+FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0
+ORDER BY op_depth
+LIMIT 1;
+
 -- STMT_SELECT_ACTUAL_NODE
 SELECT prop_reject, changelist, conflict_old, conflict_new,
 conflict_working, tree_conflict_data, properties, conflict_data
@@ -291,7 +298,13 @@ WHERE wc_id = ?1 AND local_relpath = ?2
 DELETE FROM nodes
 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0;
 
--- STMT_DELETE_WORKING_NODES
+-- STMT_DELETE_WORKING_NODE
+DELETE FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2
+  AND op_depth = (SELECT MAX(op_depth) FROM nodes
+                  WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0);
+
+-- STMT_DELETE_ALL_WORKING_NODES
 DELETE FROM nodes
 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0;
 
@@ -467,7 +480,7 @@ VALUES (?1, ?2, 0,
         ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, ?11, ?12, ?13, ?14, ?15, ?16);
 
 -- STMT_INSERT_WORKING_NODE_FROM_BASE
-INSERT INTO nodes (
+INSERT OR REPLACE INTO nodes (
     wc_id, local_relpath, op_depth, parent_relpath, presence, kind, checksum,
     changed_revision, changed_date, changed_author, depth, symlink_target,
     translated_size, last_mod_time, properties)
@@ -657,6 +670,17 @@ WHERE wc_id = ?1 AND local_relpath = ?2 
 UPDATE nodes SET repos_id = ?3, repos_path = ?4
 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0;
 
+-- STMT_SELECT_NODES_GE_OP_DEPTH_RECURSIVE
+SELECT 1
+FROM nodes
+WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
+  AND op_depth >= ?4;
+
+-- STMT_SELECT_ACTUAL_NODE_RECURSIVE
+SELECT 1
+FROM actual_node
+WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#');
+
 /* ------------------------------------------------------------------------- */
 
 /* these are used in entries.c  */