You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2011/07/20 15:06:16 UTC

svn commit: r1148749 [9/11] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/hook-scripts/enforcer/ contrib/server-side/ contrib/server-side/fsfsfixer/fixer/ note...

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c Wed Jul 20 13:06:00 2011
@@ -1212,17 +1212,17 @@ gather_repo_children(const apr_array_hea
 }
 
 
-/* Return TRUE if CHILD_ABSPATH is an immediate child of PARENT_ABSPATH
- * which has PARENT_COMPONENT_COUNT path components.
+/* Return TRUE if CHILD_ABSPATH is an immediate child of PARENT_ABSPATH.
  * Else, return FALSE. */
 static svn_boolean_t
-is_immediate_child_path(const char *parent_abspath,
-                        apr_size_t parent_component_count,
-                        const char *child_abspath)
-{
-  return (svn_dirent_is_ancestor(parent_abspath, child_abspath) &&
-            parent_component_count ==
-            svn_path_component_count(child_abspath) - 1);
+is_immediate_child_path(const char *parent_abspath, const char *child_abspath)
+{
+  const char *local_relpath = svn_dirent_skip_ancestor(parent_abspath,
+                                                       child_abspath);
+
+  /* To be an immediate child local_relpath should have one (not empty)
+     component */
+  return local_relpath && *local_relpath && !strchr(local_relpath, '/');
 }
 
 
@@ -1263,7 +1263,6 @@ flush_entries(svn_wc__db_wcroot_t *wcroo
   if (depth > svn_depth_empty)
     {
       apr_hash_index_t *hi;
-      apr_size_t component_count = svn_path_component_count(local_abspath);
 
       /* Flush access batons of children within the specified depth. */
       for (hi = apr_hash_first(scratch_pool, wcroot->access_cache);
@@ -1273,8 +1272,7 @@ flush_entries(svn_wc__db_wcroot_t *wcroo
           const char *item_abspath = svn__apr_hash_index_key(hi);
 
           if ((depth == svn_depth_files || depth == svn_depth_immediates) &&
-              is_immediate_child_path(local_abspath, component_count,
-                                      item_abspath))
+              is_immediate_child_path(local_abspath, item_abspath))
             {
               remove_from_access_cache(wcroot->access_cache, item_abspath);
             }
@@ -1797,17 +1795,17 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
 
 
 static svn_error_t *
-add_absent_excluded_not_present_node(svn_wc__db_t *db,
-                                     const char *local_abspath,
-                                     const char *repos_relpath,
-                                     const char *repos_root_url,
-                                     const char *repos_uuid,
-                                     svn_revnum_t revision,
-                                     svn_wc__db_kind_t kind,
-                                     svn_wc__db_status_t status,
-                                     const svn_skel_t *conflict,
-                                     const svn_skel_t *work_items,
-                                     apr_pool_t *scratch_pool)
+add_excluded_or_not_present_node(svn_wc__db_t *db,
+                                 const char *local_abspath,
+                                 const char *repos_relpath,
+                                 const char *repos_root_url,
+                                 const char *repos_uuid,
+                                 svn_revnum_t revision,
+                                 svn_wc__db_kind_t kind,
+                                 svn_wc__db_status_t status,
+                                 const svn_skel_t *conflict,
+                                 const svn_skel_t *work_items,
+                                 apr_pool_t *scratch_pool)
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
@@ -1869,22 +1867,22 @@ add_absent_excluded_not_present_node(svn
 
 
 svn_error_t *
-svn_wc__db_base_add_absent_node(svn_wc__db_t *db,
-                                const char *local_abspath,
-                                const char *repos_relpath,
-                                const char *repos_root_url,
-                                const char *repos_uuid,
-                                svn_revnum_t revision,
-                                svn_wc__db_kind_t kind,
-                                svn_wc__db_status_t status,
-                                const svn_skel_t *conflict,
-                                const svn_skel_t *work_items,
-                                apr_pool_t *scratch_pool)
+svn_wc__db_base_add_excluded_node(svn_wc__db_t *db,
+                                  const char *local_abspath,
+                                  const char *repos_relpath,
+                                  const char *repos_root_url,
+                                  const char *repos_uuid,
+                                  svn_revnum_t revision,
+                                  svn_wc__db_kind_t kind,
+                                  svn_wc__db_status_t status,
+                                  const svn_skel_t *conflict,
+                                  const svn_skel_t *work_items,
+                                  apr_pool_t *scratch_pool)
 {
   SVN_ERR_ASSERT(status == svn_wc__db_status_server_excluded
                  || status == svn_wc__db_status_excluded);
 
-  return add_absent_excluded_not_present_node(
+  return add_excluded_or_not_present_node(
     db, local_abspath, repos_relpath, repos_root_url, repos_uuid, revision,
     kind, status, conflict, work_items, scratch_pool);
 }
@@ -1902,7 +1900,7 @@ svn_wc__db_base_add_not_present_node(svn
                                      const svn_skel_t *work_items,
                                      apr_pool_t *scratch_pool)
 {
-  return add_absent_excluded_not_present_node(
+  return add_excluded_or_not_present_node(
     db, local_abspath, repos_relpath, repos_root_url, repos_uuid, revision,
     kind, svn_wc__db_status_not_present, conflict, work_items, scratch_pool);
 }
@@ -3130,7 +3128,7 @@ svn_wc__db_externals_gather_definitions(
   while (have_row)
     {
       apr_hash_t *node_props;
-      const svn_string_t *external_value;
+      const char *external_value;
 
       svn_pool_clear(iterpool);
       err = svn_sqlite__column_properties(&node_props, stmt, 0, iterpool,
@@ -3139,10 +3137,7 @@ svn_wc__db_externals_gather_definitions(
       if (err)
         break;
 
-      external_value = node_props
-                            ? apr_hash_get(node_props, SVN_PROP_EXTERNALS,
-                                           APR_HASH_KEY_STRING)
-                            : NULL;
+      external_value = svn_prop_get_value(node_props, SVN_PROP_EXTERNALS);
 
       if (external_value)
         {
@@ -3152,9 +3147,8 @@ svn_wc__db_externals_gather_definitions(
           node_abspath = svn_dirent_join(wcroot->abspath, node_relpath,
                                          result_pool);
 
-          apr_hash_set(*externals, node_abspath,
-                       APR_HASH_KEY_STRING,
-                       apr_pstrdup(result_pool, external_value->data));
+          apr_hash_set(*externals, node_abspath, APR_HASH_KEY_STRING,
+                       apr_pstrdup(result_pool, external_value));
 
           if (depths)
             {
@@ -3176,7 +3170,7 @@ svn_wc__db_externals_gather_definitions(
   svn_pool_destroy(iterpool);
 
   return svn_error_trace(svn_error_compose_create(err,
-                                                   svn_sqlite__reset(stmt)));
+                                                  svn_sqlite__reset(stmt)));
 }
 
 /* Copy the ACTUAL data for SRC_RELPATH and tweak it to refer to DST_RELPATH.
@@ -3428,14 +3422,15 @@ op_depth_for_copy(apr_int64_t *op_depth,
                   apr_pool_t *scratch_pool);
 
 
-/* Like svn_wc__db_op_copy(), but with WCROOT+LOCAL_RELPATH instead of
-   DB+LOCAL_ABSPATH.  */
+/* Like svn_wc__db_op_copy()/svn_wc__db_op_move(), but with
+   WCROOT+LOCAL_RELPATH instead of DB+LOCAL_ABSPATH.  */
 static svn_error_t *
 db_op_copy(svn_wc__db_wcroot_t *src_wcroot,
            const char *src_relpath,
            svn_wc__db_wcroot_t *dst_wcroot,
            const char *dst_relpath,
            const svn_skel_t *work_items,
+           svn_boolean_t is_move,
            apr_pool_t *scratch_pool)
 {
   const char *copyfrom_relpath;
@@ -3545,17 +3540,18 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
 
       if (have_work)
         SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
-                         STMT_INSERT_WORKING_NODE_COPY_FROM_WORKING));
+                          STMT_INSERT_WORKING_NODE_COPY_FROM_WORKING));
       else
         SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
                           STMT_INSERT_WORKING_NODE_COPY_FROM_BASE));
 
-      SVN_ERR(svn_sqlite__bindf(stmt, "issist",
+      SVN_ERR(svn_sqlite__bindf(stmt, "issisti",
                     src_wcroot->wc_id, src_relpath,
                     dst_relpath,
                     dst_op_depth,
                     dst_parent_relpath,
-                    presence_map, dst_presence));
+                    presence_map, dst_presence,
+                    (apr_int64_t)(is_move ? 1 : 0)));
 
       SVN_ERR(svn_sqlite__step_done(stmt));
 
@@ -3625,6 +3621,7 @@ struct op_copy_baton
   const char *dst_relpath;
 
   const svn_skel_t *work_items;
+  svn_boolean_t is_move;
 };
 
 /* Helper for svn_wc__db_op_copy.
@@ -3648,7 +3645,7 @@ op_copy_txn(void * baton, svn_sqlite__db
 
   SVN_ERR(db_op_copy(ocb->src_wcroot, ocb->src_relpath,
                      ocb->dst_wcroot, ocb->dst_relpath,
-                     ocb->work_items, scratch_pool));
+                     ocb->work_items, ocb->is_move, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -3661,7 +3658,7 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
                    const svn_skel_t *work_items,
                    apr_pool_t *scratch_pool)
 {
-   struct op_copy_baton ocb = {0};
+  struct op_copy_baton ocb = {0};
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(src_abspath));
   SVN_ERR_ASSERT(svn_dirent_is_absolute(dst_abspath));
@@ -3679,6 +3676,7 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
   VERIFY_USABLE_WCROOT(ocb.dst_wcroot);
 
   ocb.work_items = work_items;
+  ocb.is_move = FALSE;
 
   /* Call with the sdb in src_wcroot. It might call itself again to
      also obtain a lock in dst_wcroot */
@@ -3818,15 +3816,16 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
         SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
                              STMT_INSERT_WORKING_NODE_COPY_FROM_BASE));
 
-      SVN_ERR(svn_sqlite__bindf(stmt, "issist",
+      SVN_ERR(svn_sqlite__bindf(stmt, "issisti",
                         src_wcroot->wc_id, src_relpath,
                         dst_relpath,
                         dst_op_depth,
                         svn_relpath_dirname(dst_relpath, iterpool),
-                        presence_map, dst_presence));
+                        presence_map, dst_presence,
+                        (apr_int64_t)0));
 
       if (src_op_depth > 0)
-        SVN_ERR(svn_sqlite__bind_int64(stmt, 7, src_op_depth));
+        SVN_ERR(svn_sqlite__bind_int64(stmt, 8, src_op_depth));
 
       SVN_ERR(svn_sqlite__step_done(stmt));
 
@@ -4021,33 +4020,32 @@ op_depth_of(apr_int64_t *op_depth,
 }
 
 
-/* If there are any absent (excluded by authz) base nodes then the
-   copy must fail as it's not possible to commit such a copy.  Return
-   an error if there are any absent nodes. */
+/* If there are any server-excluded base nodes then the copy must fail
+   as it's not possible to commit such a copy.
+   Return an error if there are any server-excluded nodes. */
 static svn_error_t *
-catch_copy_of_absent(svn_wc__db_wcroot_t *wcroot,
-                     const char *local_relpath,
-                     apr_pool_t *scratch_pool)
+catch_copy_of_server_excluded(svn_wc__db_wcroot_t *wcroot,
+                              const char *local_relpath,
+                              apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
-  const char *absent_relpath;
+  const char *server_excluded_relpath;
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_HAS_ABSENT_NODES));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss",
+                                    STMT_HAS_SERVER_EXCLUDED_NODES));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is",
                             wcroot->wc_id,
-                            local_relpath,
-                            construct_like_arg(local_relpath,
-                                               scratch_pool)));
+                            local_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (have_row)
-    absent_relpath = svn_sqlite__column_text(stmt, 0, scratch_pool);
+    server_excluded_relpath = svn_sqlite__column_text(stmt, 0, scratch_pool);
   SVN_ERR(svn_sqlite__reset(stmt));
   if (have_row)
     return svn_error_createf(SVN_ERR_AUTHZ_UNREADABLE, NULL,
                              _("Cannot copy '%s' excluded by server"),
-                             path_for_error_message(wcroot, absent_relpath,
+                             path_for_error_message(wcroot,
+                                                    server_excluded_relpath,
                                                     scratch_pool));
 
   return SVN_NO_ERROR;
@@ -4650,8 +4648,8 @@ svn_wc__db_op_set_props(svn_wc__db_t *db
   spb.work_items = work_items;
 
   return svn_error_trace(svn_wc__db_with_txn(wcroot, local_relpath,
-                                              set_props_txn, &spb,
-                                              scratch_pool));
+                                             set_props_txn, &spb,
+                                             scratch_pool));
 }
 
 
@@ -4720,12 +4718,36 @@ svn_error_t *
 svn_wc__db_op_move(svn_wc__db_t *db,
                    const char *src_abspath,
                    const char *dst_abspath,
+                   const char *dst_op_root_abspath,
+                   const svn_skel_t *work_items,
                    apr_pool_t *scratch_pool)
 {
+  struct op_copy_baton ocb = {0};
+
   SVN_ERR_ASSERT(svn_dirent_is_absolute(src_abspath));
   SVN_ERR_ASSERT(svn_dirent_is_absolute(dst_abspath));
 
-  NOT_IMPLEMENTED();
+  SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&ocb.src_wcroot,
+                                                &ocb.src_relpath, db,
+                                                src_abspath,
+                                                scratch_pool, scratch_pool));
+  VERIFY_USABLE_WCROOT(ocb.src_wcroot);
+
+  SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&ocb.dst_wcroot,
+                                                &ocb.dst_relpath,
+                                                db, dst_abspath,
+                                                scratch_pool, scratch_pool));
+  VERIFY_USABLE_WCROOT(ocb.dst_wcroot);
+
+  ocb.work_items = work_items;
+  ocb.is_move = TRUE;
+
+  /* Call with the sdb in src_wcroot. It might call itself again to
+     also obtain a lock in dst_wcroot */
+  SVN_ERR(svn_sqlite__with_lock(ocb.src_wcroot->sdb, op_copy_txn, &ocb,
+                                scratch_pool));
+
+  return SVN_NO_ERROR;
 }
 
 
@@ -4748,14 +4770,7 @@ populate_targets_tree(svn_wc__db_wcroot_
                       apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
-  const char *like_arg;
-
-  if (depth == svn_depth_infinity)
-    {
-      /* Calculate a value we're going to need later. */
-      like_arg = construct_like_arg(local_relpath, scratch_pool);
-    }
-
+  int affected_rows = 0;
   SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb,
                                       STMT_CREATE_TARGETS_LIST));
 
@@ -4793,15 +4808,16 @@ populate_targets_tree(svn_wc__db_wcroot_
 
       for (i = 0; i < changelist_filter->nelts; i++)
         {
+          int sub_affected;
           const char *changelist = APR_ARRAY_IDX(changelist_filter, i,
                                                  const char *);
 
           SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
           SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
                                     local_relpath, changelist));
-          if (depth == svn_depth_infinity)
-            SVN_ERR(svn_sqlite__bind_text(stmt, 4, like_arg));
-          SVN_ERR(svn_sqlite__step_done(stmt));
+          SVN_ERR(svn_sqlite__update(&sub_affected, stmt));
+
+          affected_rows += sub_affected;
         }
     }
   else /* No changelist filtering */
@@ -4834,9 +4850,21 @@ populate_targets_tree(svn_wc__db_wcroot_
 
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, stmt_idx));
       SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
-      if (depth == svn_depth_infinity)
-        SVN_ERR(svn_sqlite__bind_text(stmt, 3, like_arg));
-      SVN_ERR(svn_sqlite__step_done(stmt));
+      SVN_ERR(svn_sqlite__update(&affected_rows, stmt));
+    }
+
+  /* Does the target exist? */
+  if (affected_rows == 0)
+    {
+      svn_boolean_t exists;
+      SVN_ERR(does_node_exist(&exists, wcroot, local_relpath));
+
+      if (!exists)
+        return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+                                 _("The node '%s' was not found."),
+                                 path_for_error_message(wcroot,
+                                                        local_relpath,
+                                                        scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -5003,12 +5031,12 @@ svn_wc__db_op_set_changelist(svn_wc__db_
   /* Perform the set-changelist operation (transactionally), perform any
      notifications necessary, and then clean out our temporary tables.  */
   return svn_error_trace(with_finalization(wcroot, local_relpath,
-                                            set_changelist_txn, &scb,
-                                            do_changelist_notify, NULL,
-                                            cancel_func, cancel_baton,
-                                            notify_func, notify_baton,
-                                            STMT_FINALIZE_CHANGELIST,
-                                            scratch_pool));
+                                           set_changelist_txn, &scb,
+                                           do_changelist_notify, NULL,
+                                           cancel_func, cancel_baton,
+                                           notify_func, notify_baton,
+                                           STMT_FINALIZE_CHANGELIST,
+                                           scratch_pool));
 }
 
 
@@ -5243,8 +5271,7 @@ op_revert_txn(void *baton,
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                      STMT_UPDATE_OP_DEPTH_INCREASE_RECURSIVE));
       SVN_ERR(svn_sqlite__bindf(stmt, "isi", wcroot->wc_id,
-                                construct_like_arg(local_relpath,
-                                                   scratch_pool),
+                                local_relpath,
                                 op_depth));
       SVN_ERR(svn_sqlite__step_done(stmt));
 
@@ -5287,7 +5314,6 @@ op_revert_recursive_txn(void *baton,
   svn_boolean_t have_row;
   apr_int64_t op_depth;
   int affected_rows;
-  const char *like_arg = construct_like_arg(local_relpath, scratch_pool);
 
   /* ### Similar structure to op_revert_txn, should they be
          combined? */
@@ -5302,8 +5328,8 @@ op_revert_recursive_txn(void *baton,
 
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                         STMT_DELETE_ACTUAL_NODE_RECURSIVE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
-                                local_relpath, like_arg));
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
+                                local_relpath));
       SVN_ERR(svn_sqlite__step(&affected_rows, stmt));
 
       if (affected_rows)
@@ -5338,21 +5364,21 @@ op_revert_recursive_txn(void *baton,
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                         STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
-                            local_relpath, like_arg));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
+                            local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                         STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
-                            local_relpath, like_arg));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
+                            local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   /* ### This removes the locks, but what about the access batons? */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_DELETE_WC_LOCK_ORPHAN_RECURSIVE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
-                            local_relpath, like_arg));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
+                            local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   return SVN_NO_ERROR;
@@ -5741,8 +5767,6 @@ remove_node_txn(void *baton,
   apr_int64_t repos_id;
   const char *repos_relpath;
 
-  const char *like_arg = construct_like_arg(local_relpath, scratch_pool);
-
   SVN_ERR_ASSERT(*local_relpath != '\0'); /* Never on a wcroot */
 
   /* Need info for not_present node? */
@@ -5765,9 +5789,8 @@ remove_node_txn(void *baton,
                                     STMT_DELETE_ACTUAL_NODE_RECURSIVE));
 
   /* Delete all actual nodes at or below local_relpath */
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
-                                         local_relpath,
-                                         like_arg));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
+                                         local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   /* Should we leave a not-present node? */
@@ -6041,7 +6064,6 @@ op_delete_txn(void *baton,
   svn_boolean_t have_row, op_root;
   svn_boolean_t add_work = FALSE;
   svn_sqlite__stmt_t *stmt;
-  const char *like_arg;
   apr_int64_t select_depth; /* Depth of what is to be deleted */
   svn_boolean_t refetch_depth = FALSE;
 
@@ -6059,12 +6081,10 @@ op_delete_txn(void *baton,
       || status == svn_wc__db_status_not_present)
     return SVN_NO_ERROR;
 
-  like_arg = construct_like_arg(local_relpath, scratch_pool);
-
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_HAS_ABSENT_NODES));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss",
-                            wcroot->wc_id, local_relpath, like_arg));
+                                    STMT_HAS_SERVER_EXCLUDED_NODES));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is",
+                            wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (have_row)
     {
@@ -6126,20 +6146,20 @@ op_delete_txn(void *baton,
      and a NODES row. */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                          STMT_DELETE_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss",
-                            wcroot->wc_id, local_relpath, like_arg));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is",
+                            wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                          STMT_CLEAR_ACTUAL_NODE_LEAVING_CHANGELIST_RECURSIVE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss",
-                            wcroot->wc_id, local_relpath, like_arg));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is",
+                            wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_DELETE_WC_LOCK_ORPHAN_RECURSIVE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
-                            local_relpath, like_arg));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id,
+                            local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   if (add_work)
@@ -6231,12 +6251,12 @@ svn_wc__db_op_delete(svn_wc__db_t *db,
   /* Perform the deletion operation (transactionally), perform any
      notifications necessary, and then clean out our temporary tables.  */
   return svn_error_trace(with_finalization(wcroot, local_relpath,
-                                            op_delete_txn, &odb,
-                                            do_delete_notify, NULL,
-                                            cancel_func, cancel_baton,
-                                            notify_func, notify_baton,
-                                            STMT_FINALIZE_DELETE,
-                                            scratch_pool));
+                                           op_delete_txn, &odb,
+                                           do_delete_notify, NULL,
+                                           cancel_func, cancel_baton,
+                                           notify_func, notify_baton,
+                                           STMT_FINALIZE_DELETE,
+                                           scratch_pool));
 }
 
 
@@ -6677,6 +6697,7 @@ read_children_info(void *baton,
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
   const char *repos_root_url = NULL;
+  const char *repos_uuid = NULL;
   apr_int64_t last_repos_id;
   apr_hash_t *nodes = rci->nodes;
   apr_hash_t *conflicts = rci->conflicts;
@@ -6739,13 +6760,14 @@ read_children_info(void *baton,
           if (op_depth != 0 || svn_sqlite__column_is_null(stmt, 1))
             {
               child->repos_root_url = NULL;
+              child->repos_uuid = NULL;
             }
           else
             {
               apr_int64_t repos_id = svn_sqlite__column_int64(stmt, 1);
               if (!repos_root_url)
                 {
-                  err = fetch_repos_info(&repos_root_url, NULL,
+                  err = fetch_repos_info(&repos_root_url, &repos_uuid,
                                          wcroot->sdb, repos_id, result_pool);
                   if (err)
                     SVN_ERR(svn_error_compose_create(err,
@@ -6757,6 +6779,7 @@ read_children_info(void *baton,
                  single cached value is sufficient. */
               SVN_ERR_ASSERT(repos_id == last_repos_id);
               child->repos_root_url = repos_root_url;
+              child->repos_uuid = repos_uuid;
             }
 
           child->changed_rev = svn_sqlite__column_revnum(stmt, 8);
@@ -7355,7 +7378,7 @@ svn_wc__db_read_url(const char **url,
   VERIFY_USABLE_WCROOT(wcroot);
 
   return svn_error_trace(read_url(url, wcroot, local_relpath, result_pool,
-                                   scratch_pool));
+                                  scratch_pool));
 }
 
 
@@ -8431,6 +8454,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
 }
 
 
+#if 0
 struct update_baton_t {
   const char *new_repos_relpath;
   svn_revnum_t new_revision;
@@ -8444,6 +8468,7 @@ struct update_baton_t {
   const svn_skel_t *conflict;
   const svn_skel_t *work_items;
 };
+#endif
 
 
 svn_error_t *
@@ -8616,16 +8641,16 @@ bump_node_revision(svn_wc__db_wcroot_t *
   /* If the node is still marked 'not-present', then the server did not
      re-add it.  So it's really gone in this revision, thus we remove the node.
 
-     If the node is still marked 'absent' and yet is not the same
+     If the node is still marked 'server-excluded' and yet is not the same
      revision as new_rev, then the server did not re-add it, nor
-     re-absent it, so we can remove the node. */
+     re-server-exclude it, so we can remove the node. */
   if (!is_root
       && (status == svn_wc__db_status_not_present
           || (status == svn_wc__db_status_server_excluded &&
               revision != new_rev)))
     {
       return svn_error_trace(db_base_remove(NULL, wcroot, local_relpath,
-                                             scratch_pool));
+                                            scratch_pool));
     }
 
   if (new_repos_relpath != NULL && strcmp(repos_relpath, new_repos_relpath))
@@ -9018,7 +9043,7 @@ scan_addition_txn(void *baton,
       {
         /* Calculate the path of the operation root */
         repos_prefix_path =
-          svn_relpath_join(svn_dirent_basename(current_relpath, NULL),
+          svn_relpath_join(svn_relpath_basename(current_relpath, NULL),
                            repos_prefix_path,
                            scratch_pool);
         current_relpath = svn_relpath_dirname(current_relpath, scratch_pool);
@@ -9097,7 +9122,7 @@ scan_addition_txn(void *baton,
 
         /* Pointing at op_depth, look at the parent */
         repos_prefix_path =
-          svn_relpath_join(svn_dirent_basename(current_relpath, NULL),
+          svn_relpath_join(svn_relpath_basename(current_relpath, NULL),
                            repos_prefix_path,
                            scratch_pool);
         current_relpath = svn_relpath_dirname(current_relpath, scratch_pool);
@@ -9116,7 +9141,7 @@ scan_addition_txn(void *baton,
           {
             /* Calculate the path of the operation root */
             repos_prefix_path =
-              svn_relpath_join(svn_dirent_basename(current_relpath, NULL),
+              svn_relpath_join(svn_relpath_basename(current_relpath, NULL),
                                repos_prefix_path,
                                scratch_pool);
             current_relpath =
@@ -9211,8 +9236,8 @@ scan_addition(svn_wc__db_status_t *statu
   sab.result_pool = result_pool;
 
   return svn_error_trace(svn_wc__db_with_txn(wcroot, local_relpath,
-                                              scan_addition_txn,
-                                              &sab, scratch_pool));
+                                             scan_addition_txn,
+                                             &sab, scratch_pool));
 }
 
 
@@ -9486,8 +9511,8 @@ scan_deletion(const char **base_del_relp
   sd_baton.result_pool = result_pool;
 
   return svn_error_trace(svn_wc__db_with_txn(wcroot, local_relpath,
-                                              scan_deletion_txn, &sd_baton,
-                                              scratch_pool));
+                                             scan_deletion_txn, &sd_baton,
+                                             scratch_pool));
 }
 
 
@@ -9551,9 +9576,9 @@ svn_wc__db_upgrade_begin(svn_sqlite__db_
                          apr_pool_t *scratch_pool)
 {
   return svn_error_trace(create_db(sdb, repos_id, wc_id, dir_abspath,
-                                    repos_root_url, repos_uuid,
-                                    SDB_FILE,
-                                    result_pool, scratch_pool));
+                                   repos_root_url, repos_uuid,
+                                   SDB_FILE,
+                                   result_pool, scratch_pool));
 }
 
 
@@ -9605,11 +9630,11 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
                                apr_hash_t *revert_props,
                                apr_hash_t *working_props,
                                int original_format,
+                               apr_int64_t wc_id,
                                apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
-  apr_int64_t wc_id;
   apr_int64_t top_op_depth = -1;
   apr_int64_t below_op_depth = -1;
   svn_wc__db_status_t top_presence;
@@ -9644,20 +9669,19 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
      the handling of our inputs, relative to the state of this node.
   */
 
-  SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_SELECT_NODE_UPGRADE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "s", local_relpath));
+  SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_SELECT_NODE_INFO));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (have_row)
     {
       top_op_depth = svn_sqlite__column_int64(stmt, 0);
-      top_presence = svn_sqlite__column_token(stmt, 1, presence_map);
-      wc_id = svn_sqlite__column_int64(stmt, 2);
-      kind = svn_sqlite__column_token(stmt, 3, kind_map);
+      top_presence = svn_sqlite__column_token(stmt, 3, presence_map);
+      kind = svn_sqlite__column_token(stmt, 4, kind_map);
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
       if (have_row)
         {
           below_op_depth = svn_sqlite__column_int64(stmt, 0);
-          below_presence = svn_sqlite__column_token(stmt, 1, presence_map);
+          below_presence = svn_sqlite__column_token(stmt, 3, presence_map);
         }
     }
   SVN_ERR(svn_sqlite__reset(stmt));
@@ -9743,15 +9767,13 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
 
   if (kind == svn_wc__db_kind_dir)
     {
-      const svn_string_t *externals = NULL;
+      const char *externals;
       apr_hash_t *props = working_props;
 
       if (props == NULL)
         props = base_props;
 
-      if (props != NULL)
-        externals = apr_hash_get(props, SVN_PROP_EXTERNALS,
-                                 APR_HASH_KEY_STRING);
+      externals = svn_prop_get_value(props, SVN_PROP_EXTERNALS);
 
       if (externals != NULL)
         {
@@ -9763,7 +9785,7 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
           SVN_ERR(svn_wc_parse_externals_description3(
                             &ext, svn_dirent_join(dir_abspath, local_relpath,
                                                   scratch_pool),
-                            externals->data, FALSE, scratch_pool));
+                            externals, FALSE, scratch_pool));
           for (i = 0; i < ext->nelts; i++)
             {
               const svn_wc_external_item2_t *item;
@@ -9837,7 +9859,7 @@ svn_wc__db_wq_add(svn_wc__db_t *db,
 
   /* Add the work item(s) to the WORK_QUEUE.  */
   return svn_error_trace(add_work_items(wcroot->sdb, work_item,
-                                         scratch_pool));
+                                        scratch_pool));
 }
 
 /* Baton for wq_fetch_next */
@@ -10156,7 +10178,7 @@ svn_wc__db_read_conflict_victims(const a
       const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
 
       APR_ARRAY_PUSH(new_victims, const char *) =
-                            svn_dirent_basename(child_relpath, result_pool);
+                            svn_relpath_basename(child_relpath, result_pool);
 
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
     }
@@ -10208,7 +10230,7 @@ svn_wc__db_get_conflict_marker_files(apr
           marker_relpath = svn_sqlite__column_text(stmt, i, scratch_pool);
           if (marker_relpath)
             {
-              base_name = svn_dirent_basename(marker_relpath, result_pool);
+              base_name = svn_relpath_basename(marker_relpath, result_pool);
               apr_hash_set(*marker_files, base_name, APR_HASH_KEY_STRING,
                            base_name);
             }
@@ -10703,8 +10725,8 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d
   baton.levels_to_lock = levels_to_lock;
 
   return svn_error_trace(svn_wc__db_with_txn(wcroot, local_relpath,
-                                              wclock_obtain_cb, &baton,
-                                              scratch_pool));
+                                             wclock_obtain_cb, &baton,
+                                             scratch_pool));
 }
 
 
@@ -11211,9 +11233,9 @@ svn_wc__db_temp_op_make_copy(svn_wc__db_
                                                     local_relpath,
                                                     scratch_pool));
 
-  /* We don't allow copies to contain absent (denied by authz) nodes;
+  /* We don't allow copies to contain server-excluded nodes;
      the update editor is going to have to bail out. */
-  SVN_ERR(catch_copy_of_absent(wcroot, local_relpath, scratch_pool));
+  SVN_ERR(catch_copy_of_server_excluded(wcroot, local_relpath, scratch_pool));
 
   mcb.op_depth = relpath_depth(local_relpath);
 
@@ -11517,8 +11539,7 @@ get_min_max_revisions(svn_revnum_t *min_
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SELECT_MIN_MAX_REVISIONS));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id, local_relpath,
-                            construct_like_arg(local_relpath, scratch_pool)));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (have_row)
     {
@@ -11572,8 +11593,8 @@ svn_wc__db_min_max_revisions(svn_revnum_
   VERIFY_USABLE_WCROOT(wcroot);
 
   return svn_error_trace(get_min_max_revisions(min_revision, max_revision,
-                                                wcroot, local_relpath,
-                                                committed, scratch_pool));
+                                               wcroot, local_relpath,
+                                               committed, scratch_pool));
 }
 
 
@@ -11590,11 +11611,9 @@ is_sparse_checkout_internal(svn_boolean_
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_HAS_SPARSE_NODES));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss",
+  SVN_ERR(svn_sqlite__bindf(stmt, "is",
                             wcroot->wc_id,
-                            local_relpath,
-                            construct_like_arg(local_relpath,
-                                               scratch_pool)));
+                            local_relpath));
   /* If this query returns a row, the working copy is sparse. */
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   *is_sparse_checkout = have_row;
@@ -11621,8 +11640,8 @@ svn_wc__db_is_sparse_checkout(svn_boolea
   VERIFY_USABLE_WCROOT(wcroot);
 
   return svn_error_trace(is_sparse_checkout_internal(is_sparse_checkout,
-                                                      wcroot, local_relpath,
-                                                      scratch_pool));
+                                                     wcroot, local_relpath,
+                                                     scratch_pool));
 }
 
 
@@ -11732,16 +11751,16 @@ svn_wc__db_has_switched_subtrees(svn_boo
   VERIFY_USABLE_WCROOT(wcroot);
 
   return svn_error_trace(has_switched_subtrees(is_switched, wcroot,
-                                                local_relpath, trail_url,
-                                                scratch_pool));
+                                               local_relpath, trail_url,
+                                               scratch_pool));
 }
 
 svn_error_t *
-svn_wc__db_get_absent_subtrees(apr_hash_t **absent_subtrees,
-                               svn_wc__db_t *db,
-                               const char *local_abspath,
-                               apr_pool_t *result_pool,
-                               apr_pool_t *scratch_pool)
+svn_wc__db_get_server_excluded_subtrees(apr_hash_t **server_excluded_subtrees,
+                                        svn_wc__db_t *db,
+                                        const char *local_abspath,
+                                        apr_pool_t *result_pool,
+                                        apr_pool_t *scratch_pool)
 {
   svn_wc__db_wcroot_t *wcroot;
   const char *local_relpath;
@@ -11754,18 +11773,16 @@ svn_wc__db_get_absent_subtrees(apr_hash_
                                                 scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(wcroot);
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_ALL_ABSENT_NODES));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss",
+                                    STMT_SELECT_ALL_SERVER_EXCLUDED_NODES));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is",
                             wcroot->wc_id,
-                            local_relpath,
-                            construct_like_arg(local_relpath,
-                                               scratch_pool)));
+                            local_relpath));
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
 
   if (have_row)
-    *absent_subtrees = apr_hash_make(result_pool);
+    *server_excluded_subtrees = apr_hash_make(result_pool);
   else
-    *absent_subtrees = NULL;
+    *server_excluded_subtrees = NULL;
 
   while (have_row)
     {
@@ -11773,7 +11790,8 @@ svn_wc__db_get_absent_subtrees(apr_hash_
         svn_dirent_join(wcroot->abspath,
                         svn_sqlite__column_text(stmt, 0, scratch_pool),
                         result_pool);
-      apr_hash_set(*absent_subtrees, abs_path, APR_HASH_KEY_STRING, abs_path);
+      apr_hash_set(*server_excluded_subtrees, abs_path, APR_HASH_KEY_STRING,
+                   abs_path);
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
     }
 
@@ -11798,8 +11816,7 @@ has_local_mods(svn_boolean_t *is_modifie
   /* Check for additions or deletions. */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SUBTREE_HAS_TREE_MODIFICATIONS));
-  SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id, local_relpath,
-                            construct_like_arg(local_relpath, scratch_pool)));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
   /* If this query returns a row, the working copy is modified. */
   SVN_ERR(svn_sqlite__step(is_modified, stmt));
   SVN_ERR(svn_sqlite__reset(stmt));
@@ -11812,9 +11829,7 @@ has_local_mods(svn_boolean_t *is_modifie
       /* Check for property modifications. */
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                         STMT_SUBTREE_HAS_PROP_MODIFICATIONS));
-      SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id, local_relpath,
-                                construct_like_arg(local_relpath,
-                                                   scratch_pool)));
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
       /* If this query returns a row, the working copy is modified. */
       SVN_ERR(svn_sqlite__step(is_modified, stmt));
       SVN_ERR(svn_sqlite__reset(stmt));
@@ -11831,9 +11846,7 @@ has_local_mods(svn_boolean_t *is_modifie
       /* Check for text modifications. */
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                         STMT_SELECT_BASE_FILES_RECURSIVE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id, local_relpath,
-                                construct_like_arg(local_relpath,
-                                                   scratch_pool)));
+      SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
       if (have_row)
         iterpool = svn_pool_create(scratch_pool);
@@ -11918,8 +11931,8 @@ svn_wc__db_has_local_mods(svn_boolean_t 
   VERIFY_USABLE_WCROOT(wcroot);
 
   return svn_error_trace(has_local_mods(is_modified, wcroot, local_relpath,
-                                         db, cancel_func, cancel_baton,
-                                         scratch_pool));
+                                        db, cancel_func, cancel_baton,
+                                        scratch_pool));
 }
 
 
@@ -12029,8 +12042,8 @@ svn_wc__db_revision_status(svn_revnum_t 
   VERIFY_USABLE_WCROOT(wcroot);
 
   return svn_error_trace(svn_wc__db_with_txn(wcroot, local_relpath,
-                                              revision_status_txn, &rsb,
-                                              scratch_pool));
+                                             revision_status_txn, &rsb,
+                                             scratch_pool));
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h Wed Jul 20 13:06:00 2011
@@ -610,7 +610,7 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
    at revision REVISION.
 
    The node's kind is described by KIND, and the reason for its absence
-   is specified by STATUS. Only three values are allowed for STATUS:
+   is specified by STATUS. Only these values are allowed for STATUS:
 
      svn_wc__db_status_server_excluded
      svn_wc__db_status_excluded
@@ -624,17 +624,17 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
    All temporary allocations will be made in SCRATCH_POOL.
 */
 svn_error_t *
-svn_wc__db_base_add_absent_node(svn_wc__db_t *db,
-                                const char *local_abspath,
-                                const char *repos_relpath,
-                                const char *repos_root_url,
-                                const char *repos_uuid,
-                                svn_revnum_t revision,
-                                svn_wc__db_kind_t kind,
-                                svn_wc__db_status_t status,
-                                const svn_skel_t *conflict,
-                                const svn_skel_t *work_items,
-                                apr_pool_t *scratch_pool);
+svn_wc__db_base_add_excluded_node(svn_wc__db_t *db,
+                                  const char *local_abspath,
+                                  const char *repos_relpath,
+                                  const char *repos_root_url,
+                                  const char *repos_uuid,
+                                  svn_revnum_t revision,
+                                  svn_wc__db_kind_t kind,
+                                  svn_wc__db_status_t status,
+                                  const svn_skel_t *conflict,
+                                  const svn_skel_t *work_items,
+                                  apr_pool_t *scratch_pool);
 
 
 /* Create a node in the BASE tree that is present in name only.
@@ -1227,7 +1227,8 @@ svn_wc__db_op_copy(svn_wc__db_t *db,
  * properly deleted.
  *
  * Usually this operation is directly followed by a call to svn_wc__db_op_copy
- * which performs the real copy from src_abspath to dst_abspath.
+ * or svn_wc__db_op_move which performs the real copy from src_abspath to
+ * dst_abspath.
  */
 svn_error_t *
 svn_wc__db_op_copy_shadowed_layer(svn_wc__db_t *db,
@@ -1427,12 +1428,20 @@ svn_wc__db_op_delete(svn_wc__db_t *db,
                      apr_pool_t *scratch_pool);
 
 
-/* ### KFF: Would like to know behavior when dst_path already exists
-   ### and is a) a dir or b) a non-dir. */
+/* Move the node at SRC_ABSPATH (in NODES and ACTUAL_NODE tables) to
+ * DST_ABSPATH, both in DB but not necessarily in the same WC.  The parent
+ * of DST_ABSPATH must be a versioned directory.
+ *
+ * This move is NOT recursive. It simply establishes this one node, plus
+ * incomplete nodes for the children.
+ *
+ * Add WORK_ITEMS to the work queue. */
 svn_error_t *
 svn_wc__db_op_move(svn_wc__db_t *db,
                    const char *src_abspath,
                    const char *dst_abspath,
+                   const char *dst_op_root_abspath,
+                   const svn_skel_t *work_items,
                    apr_pool_t *scratch_pool);
 
 
@@ -1817,6 +1826,7 @@ struct svn_wc__db_info_t {
   svn_revnum_t revnum;
   const char *repos_relpath;
   const char *repos_root_url;
+  const char *repos_uuid;
   svn_revnum_t changed_rev;
   const char *changed_author;
   apr_time_t changed_date;
@@ -2597,6 +2607,7 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
                                apr_hash_t *revert_props,
                                apr_hash_t *working_props,
                                int original_format,
+                               apr_int64_t wc_id,
                                apr_pool_t *scratch_pool);
 
 
@@ -2981,18 +2992,19 @@ svn_wc__db_has_switched_subtrees(svn_boo
                                  const char *trail_url,
                                  apr_pool_t *scratch_pool);
 
-/* Set @a *absent_subtrees to a hash mapping <tt>const char *</tt> local
- * absolute paths to <tt>const char *</tt> local absolute paths for every
- * path at or under @a local_abspath in @a db which are absent (excluded
- * by authz).  If no absent paths are found then @a *absent_subtrees is set
- * to @c NULL.  Allocate the hash and all items therein from @a result_pool.
+/* Set @a *server_excluded_subtrees to a hash mapping <tt>const char *</tt>
+ * local absolute paths to <tt>const char *</tt> local absolute paths for
+ * every path at or under @a local_abspath in @a db which are excluded by
+ * the server (e.g. due to authz).  If no such paths are found then
+ * @a *server_excluded_subtrees is set to @c NULL.
+ * Allocate the hash and all items therein from @a result_pool.
  */
 svn_error_t *
-svn_wc__db_get_absent_subtrees(apr_hash_t **absent_subtrees,
-                               svn_wc__db_t *db,
-                               const char *local_abspath,
-                               apr_pool_t *result_pool,
-                               apr_pool_t *scratch_pool);
+svn_wc__db_get_server_excluded_subtrees(apr_hash_t **server_excluded_subtrees,
+                                        svn_wc__db_t *db,
+                                        const char *local_abspath,
+                                        apr_pool_t *result_pool,
+                                        apr_pool_t *scratch_pool);
 
 /* Indicate in *IS_MODIFIED whether the working copy has local modifications,
  * using DB. Use SCRATCH_POOL for temporary allocations.

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c Wed Jul 20 13:06:00 2011
@@ -225,7 +225,7 @@ svn_wc__db_close(svn_wc__db_t *db)
 
   /* Run the cleanup for each WCROOT.  */
   return svn_error_trace(svn_wc__db_close_many_wcroots(roots, db->state_pool,
-                                                        scratch_pool));
+                                                       scratch_pool));
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c Wed Jul 20 13:06:00 2011
@@ -87,9 +87,9 @@ get_and_record_fileinfo(svn_wc__db_t *db
     }
 
   return svn_error_trace(svn_wc__db_global_record_fileinfo(
-                            db, local_abspath,
-                            dirent->filesize, dirent->mtime,
-                            scratch_pool));
+                           db, local_abspath,
+                           dirent->filesize, dirent->mtime,
+                           scratch_pool));
 }
 
 
@@ -737,7 +737,35 @@ run_file_install(svn_wc__db_t *db,
 
   /* All done. Move the file into place.  */
   /* ### fix this. we should delay the rename.  */
-  SVN_ERR(svn_io_file_rename(dst_abspath, local_abspath, scratch_pool));
+
+  {
+    svn_error_t *err;
+
+    err = svn_io_file_rename(dst_abspath, local_abspath, scratch_pool);
+
+    /* With a single db we might want to install files in a missing directory.
+       Simply trying this scenario on error won't do any harm and at least
+       one user reported this problem on IRC. */
+    if (err && APR_STATUS_IS_ENOENT(err->apr_err))
+      {
+        svn_error_t *err2;
+
+        err2 = svn_io_make_dir_recursively(svn_dirent_dirname(dst_abspath,
+                                                              scratch_pool),
+                                           scratch_pool);
+
+        if (err2)
+          /* Creating directory didn't work: Return all errors */
+          return svn_error_trace(svn_error_compose_create(err, err2));
+        else
+          /* We could create a directory: retry install */
+          svn_error_clear(err);
+
+        SVN_ERR(svn_io_file_rename(dst_abspath, local_abspath, scratch_pool));
+      }
+    else
+      SVN_ERR(err);
+  }
 
   /* Tweak the on-disk file according to its properties.  */
   if (props
@@ -828,7 +856,7 @@ run_file_remove(svn_wc__db_t *db,
 
   /* Remove the path, no worrying if it isn't there.  */
   return svn_error_trace(svn_io_remove_file2(local_abspath, TRUE,
-                                              scratch_pool));
+                                             scratch_pool));
 }
 
 
@@ -1204,8 +1232,8 @@ run_record_fileinfo(svn_wc__db_t *db,
 
 
   return svn_error_trace(get_and_record_fileinfo(db, local_abspath,
-                                                  TRUE /* ignore_enoent */,
-                                                  scratch_pool));
+                                                 TRUE /* ignore_enoent */,
+                                                 scratch_pool));
 }
 
 
@@ -1379,9 +1407,9 @@ run_set_property_conflict_marker(svn_wc_
 
   return svn_error_trace(
           svn_wc__db_temp_op_set_property_conflict_marker_file(db,
-                                                                local_abspath,
-                                                                prej_abspath,
-                                                                scratch_pool));
+                                                               local_abspath,
+                                                               prej_abspath,
+                                                               scratch_pool));
 }
 
 svn_error_t *

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h Wed Jul 20 13:06:00 2011
@@ -283,9 +283,6 @@ struct dav_resource_private {
 
   /* Cache any revprop change error */
   svn_error_t *revprop_error;
-
-  /* Pool to allocate temporary data from */
-  apr_pool_t *pool;
 };
 
 

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c Wed Jul 20 13:06:00 2011
@@ -268,15 +268,15 @@ get_last_modified_time(const char **date
 }
 
 static dav_prop_insert
-insert_prop(const dav_resource *resource,
-            int propid,
-            dav_prop_insert what,
-            apr_text_header *phdr)
+insert_prop_internal(const dav_resource *resource,
+                     int propid,
+                     dav_prop_insert what,
+                     apr_text_header *phdr,
+                     apr_pool_t *scratch_pool,
+                     apr_pool_t *result_pool)
 {
   const char *value = NULL;
   const char *s;
-  apr_pool_t *response_pool = resource->pool;
-  apr_pool_t *p = resource->info->pool;
   const dav_liveprop_spec *info;
   int global_ns;
   svn_error_t *serr;
@@ -338,12 +338,12 @@ insert_prop(const dav_resource *resource
           }
 
         if (0 != get_last_modified_time(&datestring, &timeval,
-                                        resource, format, p))
+                                        resource, format, scratch_pool))
           {
             return DAV_PROP_INSERT_NOTDEF;
           }
 
-        value = apr_xml_quote_string(p, datestring, 1);
+        value = apr_xml_quote_string(scratch_pool, datestring, 1);
         break;
       }
 
@@ -373,7 +373,8 @@ insert_prop(const dav_resource *resource
                root object might be an ID root -or- a revision root. */
             serr = svn_fs_node_created_rev(&committed_rev,
                                            resource->info->root.root,
-                                           resource->info->repos_path, p);
+                                           resource->info->repos_path,
+                                           scratch_pool);
             if (serr != NULL)
               {
                 /* ### what to do? */
@@ -391,7 +392,7 @@ insert_prop(const dav_resource *resource
                                 resource,
                                 committed_rev,
                                 SVN_PROP_REVISION_AUTHOR,
-                                p);
+                                scratch_pool);
         if (serr)
           {
             /* ### what to do? */
@@ -403,7 +404,7 @@ insert_prop(const dav_resource *resource
         if (last_author == NULL)
           return DAV_PROP_INSERT_NOTDEF;
 
-        value = apr_xml_quote_string(p, last_author->data, 1);
+        value = apr_xml_quote_string(scratch_pool, last_author->data, 1);
         break;
       }
 
@@ -421,7 +422,7 @@ insert_prop(const dav_resource *resource
           return DAV_PROP_INSERT_NOTSUPP;
 
         serr = svn_fs_file_length(&len, resource->info->root.root,
-                                  resource->info->repos_path, p);
+                                  resource->info->repos_path, scratch_pool);
         if (serr != NULL)
           {
             svn_error_clear(serr);
@@ -429,7 +430,7 @@ insert_prop(const dav_resource *resource
             break;
           }
 
-        value = apr_psprintf(p, "%" SVN_FILESIZE_T_FMT, len);
+        value = apr_psprintf(scratch_pool, "%" SVN_FILESIZE_T_FMT, len);
         break;
       }
 
@@ -462,7 +463,7 @@ insert_prop(const dav_resource *resource
           {
             if ((serr = svn_fs_node_prop(&pval, resource->info->root.root,
                                          resource->info->repos_path,
-                                         SVN_PROP_MIME_TYPE, p)))
+                                         SVN_PROP_MIME_TYPE, scratch_pool)))
               {
                 svn_error_clear(serr);
                 pval = NULL;
@@ -476,7 +477,7 @@ insert_prop(const dav_resource *resource
             else
               mime_type = "text/plain";
 
-            if ((serr = svn_mime_type_validate(mime_type, p)))
+            if ((serr = svn_mime_type_validate(mime_type, scratch_pool)))
               {
                 /* Probably serr->apr == SVN_ERR_BAD_MIME_TYPE, but
                    there's no point even checking.  No matter what the
@@ -499,7 +500,7 @@ insert_prop(const dav_resource *resource
           return DAV_PROP_INSERT_NOTSUPP;
         }
 
-      value = dav_svn__getetag(resource, p);
+      value = dav_svn__getetag(resource, scratch_pool);
       break;
 
     case DAV_PROPID_auto_version:
@@ -519,7 +520,7 @@ insert_prop(const dav_resource *resource
         return DAV_PROP_INSERT_NOTSUPP;
       value = dav_svn__build_uri(resource->info->repos, DAV_SVN__BUILD_URI_BC,
                                  resource->info->root.rev, NULL,
-                                 1 /* add_href */, p);
+                                 1 /* add_href */, scratch_pool);
       break;
 
     case DAV_PROPID_checked_in:
@@ -531,7 +532,8 @@ insert_prop(const dav_resource *resource
         {
           svn_revnum_t revnum;
 
-          serr = svn_fs_youngest_rev(&revnum, resource->info->repos->fs, p);
+          serr = svn_fs_youngest_rev(&revnum, resource->info->repos->fs,
+                                     scratch_pool);
           if (serr != NULL)
             {
               /* ### what to do? */
@@ -541,9 +543,9 @@ insert_prop(const dav_resource *resource
             }
           s = dav_svn__build_uri(resource->info->repos,
                                  DAV_SVN__BUILD_URI_BASELINE,
-                                 revnum, NULL, 0 /* add_href */, p);
-          value = apr_psprintf(p, "<D:href>%s</D:href>",
-                               apr_xml_quote_string(p, s, 1));
+                                 revnum, NULL, 0 /* add_href */, scratch_pool);
+          value = apr_psprintf(scratch_pool, "<D:href>%s</D:href>",
+                               apr_xml_quote_string(scratch_pool, s, 1));
         }
       else if (resource->type != DAV_RESOURCE_TYPE_REGULAR)
         {
@@ -554,14 +556,14 @@ insert_prop(const dav_resource *resource
         {
           svn_revnum_t rev_to_use =
             dav_svn__get_safe_cr(resource->info->root.root,
-                                 resource->info->repos_path, p);
+                                 resource->info->repos_path, scratch_pool);
 
           s = dav_svn__build_uri(resource->info->repos,
                                  DAV_SVN__BUILD_URI_VERSION,
                                  rev_to_use, resource->info->repos_path,
-                                0 /* add_href */, p);
-          value = apr_psprintf(p, "<D:href>%s</D:href>",
-                               apr_xml_quote_string(p, s, 1));
+                                0 /* add_href */, scratch_pool);
+          value = apr_psprintf(scratch_pool, "<D:href>%s</D:href>",
+                               apr_xml_quote_string(scratch_pool, s, 1));
         }
       break;
 
@@ -573,7 +575,7 @@ insert_prop(const dav_resource *resource
         return DAV_PROP_INSERT_NOTSUPP;
       value = dav_svn__build_uri(resource->info->repos, DAV_SVN__BUILD_URI_VCC,
                                  SVN_IGNORED_REVNUM, NULL,
-                                 1 /* add_href */, p);
+                                 1 /* add_href */, scratch_pool);
       break;
 
     case DAV_PROPID_version_name:
@@ -593,7 +595,7 @@ insert_prop(const dav_resource *resource
       if (resource->baselined)
         {
           /* just the revision number for baselines */
-          value = apr_psprintf(p, "%ld",
+          value = apr_psprintf(scratch_pool, "%ld",
                                resource->info->root.rev);
         }
       else
@@ -604,7 +606,8 @@ insert_prop(const dav_resource *resource
              root object might be an ID root -or- a revision root. */
           serr = svn_fs_node_created_rev(&committed_rev,
                                          resource->info->root.root,
-                                         resource->info->repos_path, p);
+                                         resource->info->repos_path,
+                                         scratch_pool);
           if (serr != NULL)
             {
               /* ### what to do? */
@@ -614,8 +617,8 @@ insert_prop(const dav_resource *resource
             }
 
           /* Convert the revision into a quoted string */
-          s = apr_psprintf(p, "%ld", committed_rev);
-          value = apr_xml_quote_string(p, s, 1);
+          s = apr_psprintf(scratch_pool, "%ld", committed_rev);
+          value = apr_xml_quote_string(scratch_pool, s, 1);
         }
       break;
 
@@ -628,7 +631,7 @@ insert_prop(const dav_resource *resource
 
       /* drop the leading slash, so it is relative */
       s = resource->info->repos_path + 1;
-      value = apr_xml_quote_string(p, s, 1);
+      value = apr_xml_quote_string(scratch_pool, s, 1);
       break;
 
     case SVN_PROPID_md5_checksum:
@@ -642,7 +645,8 @@ insert_prop(const dav_resource *resource
 
           serr = svn_fs_file_checksum(&checksum, svn_checksum_md5,
                                       resource->info->root.root,
-                                      resource->info->repos_path, TRUE, p);
+                                      resource->info->repos_path, TRUE,
+                                      scratch_pool);
           if (serr != NULL)
             {
               /* ### what to do? */
@@ -651,7 +655,7 @@ insert_prop(const dav_resource *resource
               break;
             }
 
-          value = svn_checksum_to_cstring(checksum, p);
+          value = svn_checksum_to_cstring(checksum, scratch_pool);
 
           if (! value)
             return DAV_PROP_INSERT_NOTSUPP;
@@ -662,7 +666,7 @@ insert_prop(const dav_resource *resource
       break;
 
     case SVN_PROPID_repository_uuid:
-      serr = svn_fs_get_uuid(resource->info->repos->fs, &value, p);
+      serr = svn_fs_get_uuid(resource->info->repos->fs, &value, scratch_pool);
       if (serr != NULL)
         {
           /* ### what to do? */
@@ -682,7 +686,7 @@ insert_prop(const dav_resource *resource
 
         serr = svn_fs_node_proplist(&proplist,
                                     resource->info->root.root,
-                                    resource->info->repos_path, p);
+                                    resource->info->repos_path, scratch_pool);
         if (serr != NULL)
           {
             /* ### what to do? */
@@ -692,7 +696,7 @@ insert_prop(const dav_resource *resource
           }
 
         propcount = apr_hash_count(proplist);
-        value = apr_psprintf(p, "%u", propcount);
+        value = apr_psprintf(scratch_pool, "%u", propcount);
         break;
       }
 
@@ -710,26 +714,46 @@ insert_prop(const dav_resource *resource
 
   if (what == DAV_PROP_INSERT_NAME
       || (what == DAV_PROP_INSERT_VALUE && *value == '\0')) {
-    s = apr_psprintf(response_pool, "<lp%d:%s/>" DEBUG_CR, global_ns,
+    s = apr_psprintf(result_pool, "<lp%d:%s/>" DEBUG_CR, global_ns,
                      info->name);
   }
   else if (what == DAV_PROP_INSERT_VALUE) {
-    s = apr_psprintf(response_pool, "<lp%d:%s>%s</lp%d:%s>" DEBUG_CR,
+    s = apr_psprintf(result_pool, "<lp%d:%s>%s</lp%d:%s>" DEBUG_CR,
                      global_ns, info->name, value, global_ns, info->name);
   }
   else {
     /* assert: what == DAV_PROP_INSERT_SUPPORTED */
-    s = apr_psprintf(response_pool,
+    s = apr_psprintf(result_pool,
                      "<D:supported-live-property D:name=\"%s\" "
                      "D:namespace=\"%s\"/>" DEBUG_CR,
                      info->name, namespace_uris[info->ns]);
   }
-  apr_text_append(response_pool, phdr, s);
+  apr_text_append(result_pool, phdr, s);
 
   /* we inserted whatever was asked for */
   return what;
 }
 
+static dav_prop_insert
+insert_prop(const dav_resource *resource,
+            int propid,
+            dav_prop_insert what,
+            apr_text_header *phdr)
+{
+  apr_pool_t *result_pool = resource->pool;
+  apr_pool_t *scratch_pool;
+  dav_prop_insert rv;
+
+  /* Create subpool and destroy on return, because mod_dav doesn't provide
+     scratch pool for insert_prop() callback. */
+  scratch_pool = svn_pool_create(result_pool);
+
+  rv = insert_prop_internal(resource, propid, what, phdr,
+                              scratch_pool, result_pool);
+
+  svn_pool_destroy(scratch_pool);
+  return rv;
+}
 
 static int
 is_writable(const dav_resource *resource, int propid)
@@ -841,8 +865,7 @@ dav_svn__insert_all_liveprops(request_re
                               apr_text_header *phdr)
 {
   const dav_liveprop_spec *spec;
-  apr_pool_t *pool;
-  apr_pool_t *subpool;
+  apr_pool_t *iterpool;
 
   /* don't insert any liveprops if this isn't "our" resource */
   if (resource->hooks != &dav_svn__hooks_repository)
@@ -859,18 +882,14 @@ dav_svn__insert_all_liveprops(request_re
       return;
     }
 
-  pool = resource->info->pool;
-  subpool = svn_pool_create(pool);
-  resource->info->pool = subpool;
-
+  iterpool = svn_pool_create(resource->pool);
   for (spec = props; spec->name != NULL; ++spec)
     {
-      svn_pool_clear(subpool);
-      (void) insert_prop(resource, spec->propid, what, phdr);
+      svn_pool_clear(iterpool);
+      (void) insert_prop_internal(resource, spec->propid, what, phdr,
+                                  iterpool, resource->pool);
     }
-
-  resource->info->pool = pool;
-  svn_pool_destroy(subpool);
+  svn_pool_destroy(iterpool);
 
   /* ### we know the others aren't defined as liveprops */
 }

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c Wed Jul 20 13:06:00 2011
@@ -346,10 +346,14 @@ SVNPathAuthz_cmd(cmd_parms *cmd, void *c
                                AUTHZ_SVN__SUBREQ_BYPASS_PROV_VER);
         }
     }
-  else
+  else if (apr_strnatcasecmp("on", arg1) == 0)
     {
       conf->path_authz_method = CONF_PATHAUTHZ_ON;
     }
+  else
+    {
+      return "Unrecognized value for SVNPathAuthz directive";
+    }
 
   return NULL;
 }

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c Wed Jul 20 13:06:00 2011
@@ -213,22 +213,6 @@ dav_svn__get_mergeinfo_report(const dav_
         }
     }
 
-  if (validate_inherited_mergeinfo)
-    {
-      serr = dav_svn__brigade_puts(bb, output,
-                                   "<S:" SVN_DAV__VALIDATE_INHERITED ">"
-                                   "yes"
-                                   "</S:" SVN_DAV__VALIDATE_INHERITED ">"
-                                   DEBUG_CR);
-      if (serr)
-        {
-          derr = dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
-                                      "Error ending REPORT response.",
-                                      resource->pool);
-          goto cleanup;
-        }
-    }
-
   if ((serr = dav_svn__brigade_puts(bb, output,
                                     "</S:" SVN_DAV__MERGEINFO_REPORT ">"
                                     DEBUG_CR)))

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c Wed Jul 20 13:06:00 2011
@@ -333,7 +333,7 @@ add_helper(svn_boolean_t is_dir,
               apr_psprintf(pool, " sha1-checksum=\"%s\"",
                            svn_checksum_to_cstring(sha1_checksum, pool));
         }
-          
+
       if (bc_url)
         bc_url_str = apr_psprintf(pool, " bc-url=\"%s\"", bc_url);
 
@@ -353,8 +353,8 @@ add_helper(svn_boolean_t is_dir,
                              "copyfrom-path=\"%s\" copyfrom-rev=\"%ld\">"
                              DEBUG_CR,
                              DIR_OR_FILE(is_dir),
-                             bc_url, sha1_checksum_str,
-                             qname, qcopy, copyfrom_revision);
+                             qname, bc_url_str, sha1_checksum_str,
+                             qcopy, copyfrom_revision);
           child->copyfrom = TRUE;
         }
 

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c Wed Jul 20 13:06:00 2011
@@ -2403,7 +2403,6 @@ get_parent_resource(const dav_resource *
       parent->uri = get_parent_path(resource->uri, TRUE, resource->pool);
       parent->info = parentinfo;
 
-      parentinfo->pool = resource->info->pool;
       parentinfo->uri_path =
         svn_stringbuf_create(get_parent_path(resource->info->uri_path->data,
                                              TRUE, resource->pool),
@@ -3558,8 +3557,10 @@ deliver(const dav_resource *resource, ap
                                         resource->pool);
           if (!is_file)
             return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
-                                      "the delta base does not refer to a "
-                                      "file");
+                                      apr_psprintf(resource->pool,
+                                      "the delta base of '%s' does not refer "
+                                      "to a file in revision %ld",
+                                      info.repos_path, info.rev));
 
           /* Okay. Let's open up a delta stream for the client to read. */
           serr = svn_fs_get_file_delta_stream(&txd_stream,
@@ -4047,9 +4048,6 @@ do_walk(walker_ctx_t *ctx, int depth)
   apr_hash_t *children;
   apr_pool_t *iterpool;
 
-  /* Clear the temporary pool. */
-  svn_pool_clear(ctx->info.pool);
-
   /* The current resource is a collection (possibly here thru recursion)
      and this is the invocation for the collection. Alternatively, this is
      the first [and only] entry to do_walk() for a member resource, so
@@ -4254,9 +4252,6 @@ walk(const dav_walk_params *params, int 
   if (ctx.repos_path != NULL)
     ctx.info.repos_path = ctx.repos_path->data;
 
-  /* Create a pool usable by the response. */
-  ctx.info.pool = svn_pool_create(params->pool);
-
   /* ### is the root already/always open? need to verify */
 
   /* always return the error, and any/all multistatus responses */

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c Wed Jul 20 13:06:00 2011
@@ -375,7 +375,8 @@ dav_svn__simple_parse_uri(dav_svn__uri_i
       /* an activity */
       info->activity_id = path + 5;
     }
-  else if (len2 == 4 && memcmp(path, "/ver/", 5) == 0)
+  else if (len2 == 4 &&
+           (memcmp(path, "/ver/", 5) == 0 || memcmp(path, "/rvr/", 5) == 0))
     {
       /* a version resource */
       path += 5;

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c Wed Jul 20 13:06:00 2011
@@ -147,8 +147,8 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
   /* Mergeinfo is a special case: here we merely say that the server
-   * knows how to handle mergeinfo -- whether the repository does too
-   * is a separate matter.
+   * knows how to handle mergeinfo and validate inherited
+   * mergeinfo -- whether the repository does too is a separate matter.
    *
    * Think of it as offering the client an early out: if the server
    * can't do merge-tracking, there's no point finding out of the
@@ -159,6 +159,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
    * server capability and remain agnostic about the repository).
    */
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO);
+  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION);
 
   /* ### fork-control? */
 }

Modified: subversion/branches/svn-bisect/subversion/svn/cat-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/cat-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/cat-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/cat-cmd.c Wed Jul 20 13:06:00 2011
@@ -30,6 +30,7 @@
 #include "svn_pools.h"
 #include "svn_client.h"
 #include "svn_error.h"
+#include "svn_opt.h"
 #include "cl.h"
 
 #include "svn_private_config.h"
@@ -72,8 +73,8 @@ svn_cl__cat(apr_getopt_t *os,
       SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
 
       /* Get peg revisions. */
-      SVN_ERR(svn_cl__opt_parse_path(&peg_revision, &truepath, target,
-                                     subpool));
+      SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
+                                 subpool));
 
       SVN_ERR(svn_cl__try(svn_client_cat2(out, truepath, &peg_revision,
                                           &(opt_state->start_revision),

Modified: subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/changelist-cmd.c Wed Jul 20 13:06:00 2011
@@ -45,6 +45,7 @@ svn_cl__changelist(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_array_header_t *targets;
   svn_depth_t depth = opt_state->depth;
+  svn_boolean_t success = TRUE;
 
   /* If we're not removing changelists, then our first argument should
      be the name of a changelist. */
@@ -98,24 +99,31 @@ svn_cl__changelist(apr_getopt_t *os,
 
   if (changelist_name)
     {
-      return svn_cl__try
-              (svn_client_add_to_changelist(targets, changelist_name,
+      SVN_ERR(svn_cl__try(
+               svn_client_add_to_changelist(targets, changelist_name,
                                             depth, opt_state->changelists,
                                             ctx, pool),
-               NULL, opt_state->quiet,
+               &success, opt_state->quiet,
                SVN_ERR_UNVERSIONED_RESOURCE,
                SVN_ERR_WC_PATH_NOT_FOUND,
-               SVN_NO_ERROR);
+               SVN_NO_ERROR));
     }
   else
     {
-      return svn_cl__try
-              (svn_client_remove_from_changelists(targets, depth,
+      SVN_ERR(svn_cl__try(
+               svn_client_remove_from_changelists(targets, depth,
                                                   opt_state->changelists,
                                                   ctx, pool),
-               NULL, opt_state->quiet,
+               &success, opt_state->quiet,
                SVN_ERR_UNVERSIONED_RESOURCE,
                SVN_ERR_WC_PATH_NOT_FOUND,
-               SVN_NO_ERROR);
+               SVN_NO_ERROR));
     }
+
+  if (!success)
+    return svn_error_create(SVN_ERR_ILLEGAL_TARGET, NULL,
+                            _("Could not display info for all targets because "
+                              "some targets don't exist"));
+  else
+    return SVN_NO_ERROR;
 }

Modified: subversion/branches/svn-bisect/subversion/svn/checkout-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/checkout-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/checkout-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/checkout-cmd.c Wed Jul 20 13:06:00 2011
@@ -72,8 +72,7 @@ svn_cl__checkout(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_pool_t *subpool;
   apr_array_header_t *targets;
-  const char *local_dir;
-  const char *repos_url;
+  const char *last_target, *local_dir;
   int i;
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
@@ -81,39 +80,43 @@ svn_cl__checkout(apr_getopt_t *os,
                                                       ctx, FALSE, pool));
 
   if (! targets->nelts)
-    return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
+    return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, NULL, NULL);
 
-  /* Add a path if the user only specified URLs */
-  local_dir = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
-  if (svn_path_is_url(local_dir))
+  /* Determine LOCAL_DIR (case 1: URL basename; 2,4: specified; 3: "")
+   * and leave TARGETS holding just the source URLs. */
+  last_target = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);
+  if (svn_path_is_url(last_target))
     {
       if (targets->nelts == 1)
         {
           svn_opt_revision_t pegrev;
 
-          /* Discard the peg-revision, if one was provided. */
-          SVN_ERR(svn_opt_parse_path(&pegrev, &local_dir, local_dir, pool));
+          /* Use the URL basename, discarding any peg revision. */
+          SVN_ERR(svn_opt_parse_path(&pegrev, &local_dir, last_target, pool));
           local_dir = svn_uri_basename(local_dir, pool);
         }
       else
         {
           local_dir = "";
         }
-      APR_ARRAY_PUSH(targets, const char *) = local_dir;
     }
   else
     {
-      /* What?  They gave us one target, and it wasn't a URL. */
       if (targets->nelts == 1)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
+        /* What?  They gave us one target, and it wasn't a URL. */
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, NULL);
+
+      apr_array_pop(targets);
+      local_dir = last_target;
     }
 
   if (! opt_state->quiet)
     SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_baton2));
 
   subpool = svn_pool_create(pool);
-  for (i = 0; i < targets->nelts - 1; ++i)
+  for (i = 0; i < targets->nelts; ++i)
     {
+      const char *repos_url = APR_ARRAY_IDX(targets, i, const char *);
       const char *target_dir;
       const char *true_url;
       svn_opt_revision_t revision = opt_state->start_revision;
@@ -124,7 +127,6 @@ svn_cl__checkout(apr_getopt_t *os,
       SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
 
       /* Validate the REPOS_URL */
-      repos_url = APR_ARRAY_IDX(targets, i, const char *);
       if (! svn_path_is_url(repos_url))
         return svn_error_createf
           (SVN_ERR_BAD_URL, NULL,
@@ -134,10 +136,8 @@ svn_cl__checkout(apr_getopt_t *os,
       SVN_ERR(svn_opt_parse_path(&peg_revision, &true_url, repos_url,
                                  subpool));
 
-      true_url = svn_uri_canonicalize(true_url, subpool);
-
       /* Use sub-directory of destination if checking-out multiple URLs */
-      if (targets->nelts == 2)
+      if (targets->nelts == 1)
         {
           target_dir = local_dir;
         }

Modified: subversion/branches/svn-bisect/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/cl.h?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/cl.h (original)
+++ subversion/branches/svn-bisect/subversion/svn/cl.h Wed Jul 20 13:06:00 2011
@@ -811,13 +811,6 @@ svn_cl__eat_peg_revisions(apr_array_head
                           const apr_array_header_t *targets,
                           apr_pool_t *pool);
 
-/* Like svn_opt_parse_path(), but canonicalizes dirent/URL */
-svn_error_t *
-svn_cl__opt_parse_path(svn_opt_revision_t *rev,
-                       const char **truepath,
-                       const char *path,
-                       apr_pool_t *pool);
-
 /* Return an error if TARGETS contains a mixture of URLs and paths; otherwise
  * return SVN_NO_ERROR. */
 svn_error_t *

Modified: subversion/branches/svn-bisect/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/copy-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/copy-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/copy-cmd.c Wed Jul 20 13:06:00 2011
@@ -95,12 +95,14 @@ svn_cl__copy(apr_getopt_t *os,
   else if ((! srcs_are_urls) && (dst_is_url))
     {
       /* WC->URL : Use notification. */
+      if (! opt_state->quiet)
         SVN_ERR(svn_cl__notifier_mark_wc_to_repos_copy(ctx->notify_baton2));
     }
   else if ((srcs_are_urls) && (! dst_is_url))
     {
-      /* URL->WC : Use checkout-style notification. */
-      SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_baton2));
+     /* URL->WC : Use checkout-style notification. */
+     if (! opt_state->quiet)
+       SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_baton2));
     }
   else
     {

Modified: subversion/branches/svn-bisect/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/info-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/info-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/info-cmd.c Wed Jul 20 13:06:00 2011
@@ -579,22 +579,20 @@ svn_cl__info(apr_getopt_t *os,
       /* If no peg-rev was attached to a URL target, then assume HEAD. */
       if (svn_path_is_url(truepath))
         {
-          truepath = svn_uri_canonicalize(truepath, subpool);
-
           if (peg_revision.kind == svn_opt_revision_unspecified)
             peg_revision.kind = svn_opt_revision_head;
         }
       else
         {
-          truepath = svn_dirent_canonicalize(truepath, subpool);
-
           SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool));
         }
 
       err = svn_client_info3(truepath,
                              &peg_revision, &(opt_state->start_revision),
-                             receiver, (void *) path_prefix, opt_state->depth,
-                             opt_state->changelists, ctx, subpool);
+                             opt_state->depth, TRUE, TRUE,
+                             opt_state->changelists,
+                             receiver, (void *) path_prefix,
+                             ctx, subpool);
 
       if (err)
         {

Modified: subversion/branches/svn-bisect/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/svn/list-cmd.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/svn/list-cmd.c (original)
+++ subversion/branches/svn-bisect/subversion/svn/list-cmd.c Wed Jul 20 13:06:00 2011
@@ -30,6 +30,7 @@
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
 #include "svn_utf.h"
+#include "svn_opt.h"
 
 #include "cl.h"
 
@@ -270,8 +271,8 @@ svn_cl__list(apr_getopt_t *os,
       SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
 
       /* Get peg revisions. */
-      SVN_ERR(svn_cl__opt_parse_path(&peg_revision, &truepath, target,
-                                     subpool));
+      SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
+                                 subpool));
 
       if (opt_state->xml)
         {