You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/12/08 22:53:41 UTC

svn commit: r1043705 [3/4] - in /subversion/branches/performance: ./ build/ build/ac-macros/ build/generator/templates/ contrib/hook-scripts/ contrib/server-side/ notes/api-errata/ notes/api-errata/1.7/ subversion/bindings/javahl/native/ subversion/bin...

Modified: subversion/branches/performance/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/wc_db.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/wc_db.c Wed Dec  8 21:53:38 2010
@@ -254,8 +254,7 @@ read_info(svn_wc__db_status_t *status,
           svn_wc__db_kind_t *kind,
           svn_revnum_t *revision,
           const char **repos_relpath,
-          const char **repos_root_url,
-          const char **repos_uuid,
+          apr_int64_t *repos_id,
           svn_revnum_t *changed_rev,
           apr_time_t *changed_date,
           const char **changed_author,
@@ -266,8 +265,7 @@ read_info(svn_wc__db_status_t *status,
           const char **target,
           const char **changelist,
           const char **original_repos_relpath,
-          const char **original_root_url,
-          const char **original_uuid,
+          apr_int64_t *original_repos_id,
           svn_revnum_t *original_revision,
           svn_boolean_t *props_mod,
           svn_boolean_t *have_base,
@@ -495,7 +493,8 @@ get_pristine_fname(const char **pristine
 
 
 /* Look up REPOS_ID in SDB and set *REPOS_ROOT_URL and/or *REPOS_UUID to
- * its root URL and UUID respectively.  Either output parameter may be
+ * its root URL and UUID respectively.  If REPOS_ID is INVALID_REPOS_ID,
+ * use NULL for both URL and UUID.  Either or both output parameters may be
  * NULL if not wanted. */
 static svn_error_t *
 fetch_repos_info(const char **repos_root_url,
@@ -507,6 +506,18 @@ fetch_repos_info(const char **repos_root
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
 
+  if (!repos_root_url && !repos_uuid)
+    return SVN_NO_ERROR;
+
+  if (repos_id == INVALID_REPOS_ID)
+    {
+      if (repos_root_url)
+        *repos_root_url = NULL;
+      if (repos_uuid)
+        *repos_uuid = NULL;
+      return SVN_NO_ERROR;
+    }
+
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
                                     STMT_SELECT_REPOSITORY_BY_ID));
   SVN_ERR(svn_sqlite__bindf(stmt, "i", repos_id));
@@ -524,13 +535,12 @@ fetch_repos_info(const char **repos_root
   return svn_error_return(svn_sqlite__reset(stmt));
 }
 
-/* Set *REPOS_ROOT_URL, *REPOS_UUID, *REVISION and *REPOS_RELPATH from the
+/* Set *REPOS_ID, *REVISION and *REPOS_RELPATH from the
  * given columns of the SQLITE statement STMT, or to NULL if the respective
  * column value is null.  Any of the output parameters may be NULL if not
  * required. */
 static svn_error_t *
-repos_location_from_columns(const char **repos_root_url,
-                            const char **repos_uuid,
+repos_location_from_columns(apr_int64_t *repos_id,
                             svn_revnum_t *revision,
                             const char **repos_relpath,
                             svn_wc__db_pdh_t *pdh,
@@ -542,23 +552,13 @@ repos_location_from_columns(const char *
 {
   svn_error_t *err = SVN_NO_ERROR;
 
-  if (repos_root_url || repos_uuid)
+  if (repos_id)
     {
       /* Fetch repository information via REPOS_ID. */
       if (svn_sqlite__column_is_null(stmt, col_repos_id))
-        {
-          if (repos_root_url)
-            *repos_root_url = NULL;
-          if (repos_uuid)
-            *repos_uuid = NULL;
-        }
+        *repos_id = INVALID_REPOS_ID;
       else
-        {
-          err = fetch_repos_info(repos_root_url, repos_uuid,
-                                 pdh->wcroot->sdb,
-                                 svn_sqlite__column_int64(stmt, col_repos_id),
-                                 result_pool);
-        }
+        *repos_id = svn_sqlite__column_int64(stmt, col_repos_id);
     }
   if (revision)
     {
@@ -1946,13 +1946,14 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
   return SVN_NO_ERROR;
 }
 
+/* Like svn_wc__db_base_get_info(), but taking PDH+LOCAL_RELPATH instead of
+ * DB+LOCAL_ABSPATH and outputting REPOS_ID instead of URL+UUID. */
 static svn_error_t *
 base_get_info(svn_wc__db_status_t *status,
               svn_wc__db_kind_t *kind,
               svn_revnum_t *revision,
               const char **repos_relpath,
-              const char **repos_root_url,
-              const char **repos_uuid,
+              apr_int64_t *repos_id,
               svn_revnum_t *changed_rev,
               apr_time_t *changed_date,
               const char **changed_author,
@@ -1990,11 +1991,9 @@ base_get_info(svn_wc__db_status_t *statu
         {
           *status = svn_sqlite__column_token(stmt, 2, presence_map);
         }
-      err = repos_location_from_columns(repos_root_url, repos_uuid, revision,
-                                        repos_relpath,
+      err = repos_location_from_columns(repos_id, revision, repos_relpath,
                                         pdh, stmt, 0, 4, 1, result_pool);
-      SVN_ERR_ASSERT(!repos_root_url || *repos_root_url);
-      SVN_ERR_ASSERT(!repos_uuid || *repos_uuid);
+      SVN_ERR_ASSERT(!repos_id || *repos_id != INVALID_REPOS_ID);
       SVN_ERR_ASSERT(!repos_relpath || *repos_relpath);
       if (lock)
         {
@@ -2099,6 +2098,7 @@ svn_wc__db_base_get_info(svn_wc__db_stat
 {
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
+  apr_int64_t repos_id;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -2107,11 +2107,15 @@ svn_wc__db_base_get_info(svn_wc__db_stat
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-  SVN_ERR(base_get_info(status, kind, revision, repos_relpath, repos_root_url,
-                        repos_uuid, changed_rev, changed_date, changed_author,
+  SVN_ERR(base_get_info(status, kind, revision, repos_relpath, &repos_id,
+                        changed_rev, changed_date, changed_author,
                         last_mod_time, depth, checksum, translated_size,
                         target, lock,
                         pdh, local_relpath, result_pool, scratch_pool));
+  SVN_ERR_ASSERT(repos_id != INVALID_REPOS_ID);
+  SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid,
+                           pdh->wcroot->sdb, repos_id, result_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -2663,22 +2667,21 @@ svn_wc__db_pristine_cleanup(svn_wc__db_t
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-  /* Find the pristines in the DB */
+  /* Find each unreferenced pristine in the DB and remove it. */
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_SELECT_PRISTINE_ROWS));
+                                    STMT_SELECT_UNREFERENCED_PRISTINES));
   while (1)
     {
       svn_boolean_t have_row;
-      const svn_checksum_t *checksum;
+      const svn_checksum_t *sha1_checksum;
 
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
       if (! have_row)
         break;
 
-      SVN_ERR(svn_sqlite__column_checksum(&checksum, stmt, 0,
+      SVN_ERR(svn_sqlite__column_checksum(&sha1_checksum, stmt, 0,
                                           scratch_pool));
-      SVN_ERR(svn_wc__db_pristine_remove(db, wri_abspath, checksum,
-                                         scratch_pool));
+      SVN_ERR(pristine_remove(pdh, sha1_checksum, scratch_pool));
     }
   SVN_ERR(svn_sqlite__reset(stmt));
 
@@ -2742,20 +2745,6 @@ svn_wc__db_pristine_check(svn_boolean_t 
 }
 
 
-svn_error_t *
-svn_wc__db_pristine_repair(svn_wc__db_t *db,
-                           const char *wri_abspath,
-                           const svn_checksum_t *sha1_checksum,
-                           apr_pool_t *scratch_pool)
-{
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
-  SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
-
-  NOT_IMPLEMENTED();
-}
-
-
 /* Helper for svn_wc__db_op_copy to handle copying from one db to
    another */
 static svn_error_t *
@@ -2790,8 +2779,7 @@ cross_db_copy(svn_wc__db_pdh_t *src_pdh,
                     NULL /* kind */,
                     NULL /* revision */,
                     NULL /* repos_relpath */,
-                    NULL /* repos_root_url */,
-                    NULL /* repos_uuid */,
+                    NULL /* repos_id */,
                     &changed_rev, &changed_date, &changed_author,
                     NULL /* last_mod_time */,
                     &depth,
@@ -2800,8 +2788,7 @@ cross_db_copy(svn_wc__db_pdh_t *src_pdh,
                     NULL /* target */,
                     NULL /* changelist */,
                     NULL /* original_repos_relpath */,
-                    NULL /* original_root_url */,
-                    NULL /* original_uuid */,
+                    NULL /* original_repos_id */,
                     NULL /* original_revision */,
                     NULL /* props_mod */,
                     NULL /* have_base */,
@@ -2891,11 +2878,10 @@ get_info_for_copy(apr_int64_t *copyfrom_
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
 {
-  const char *repos_relpath, *repos_root_url, *repos_uuid;
+  const char *repos_relpath;
   svn_revnum_t revision;
 
-  SVN_ERR(read_info(status, kind, &revision,
-                    &repos_relpath, &repos_root_url, &repos_uuid,
+  SVN_ERR(read_info(status, kind, &revision, &repos_relpath, copyfrom_id,
                     NULL /* changed_rev */,
                     NULL /* changed_date */,
                     NULL /* changed_author */,
@@ -2906,8 +2892,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
                     NULL /* target */,
                     NULL /* changelist */,
                     NULL /* original_repos_relpath */,
-                    NULL /* original_root_url */,
-                    NULL /* original_uuid */,
+                    NULL /* original_repos_id */,
                     NULL /* original_revision */,
                     NULL /* props_mod */,
                     NULL /* have_base */,
@@ -2981,15 +2966,11 @@ get_info_for_copy(apr_int64_t *copyfrom_
       else if (base_del_relpath)
         {
           SVN_ERR(base_get_info(NULL, NULL, copyfrom_rev, copyfrom_relpath,
-                                &repos_root_url, &repos_uuid,
+                                copyfrom_id,
                                 NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                                 NULL, NULL,
                                 pdh, base_del_relpath,
                                 result_pool, scratch_pool));
-
-          SVN_ERR(fetch_repos_id(copyfrom_id,
-                                 repos_root_url, repos_uuid,
-                                 pdh->wcroot->sdb, scratch_pool));
         }
       else
         SVN_ERR_MALFUNCTION();
@@ -2998,9 +2979,6 @@ get_info_for_copy(apr_int64_t *copyfrom_
     {
       *copyfrom_relpath = repos_relpath;
       *copyfrom_rev = revision;
-      SVN_ERR(fetch_repos_id(copyfrom_id,
-                             repos_root_url, repos_uuid,
-                             pdh->wcroot->sdb, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -3246,10 +3224,12 @@ catch_copy_of_absent(svn_wc__db_pdh_t *p
 }
 
 
-/* If COPYFROM_REPOS_ID+COPYFROM_RELPATH+COPYFROM_REVISION "match" the copyfrom
-   information for the parent of LOCAL_RELPATH then set *OP_DEPTH to
-   the op_depth of the parent, otherwise set *OP_DEPTH to the op_depth
-   of LOCAL_RELPATH. */
+/* If LOCAL_RELPATH is presence=incomplete then set *OP_DEPTH to the
+   op_depth of the incomplete node, otherwise if the copyfrom
+   information COPYFROM_REPOS_ID+COPYFROM_RELPATH+COPYFROM_REVISION
+   "matches" the copyfrom information for the parent of LOCAL_RELPATH
+   then set *OP_DEPTH to the op_depth of the parent, otherwise set
+   *OP_DEPTH to the op_depth of LOCAL_RELPATH. */
 static svn_error_t *
 op_depth_for_copy(apr_int64_t *op_depth,
                   apr_int64_t copyfrom_repos_id,
@@ -3269,8 +3249,24 @@ op_depth_for_copy(apr_int64_t *op_depth,
   if (!copyfrom_relpath)
     return SVN_NO_ERROR;
 
-  svn_relpath_split(&parent_relpath, &name, local_relpath, scratch_pool);
+  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+                                    STMT_SELECT_WORKING_NODE));
+  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
+  if (have_row)
+    {
+      svn_wc__db_status_t status = svn_sqlite__column_token(stmt, 1,
+                                                            presence_map);
+      if (status == svn_wc__db_status_incomplete)
+        {
+          *op_depth = svn_sqlite__column_int64(stmt, 0);
+          SVN_ERR(svn_sqlite__reset(stmt));
+          return SVN_NO_ERROR;
+        }
+    }
+  SVN_ERR(svn_sqlite__reset(stmt));
 
+  svn_relpath_split(&parent_relpath, &name, local_relpath, scratch_pool);
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
                                     STMT_SELECT_WORKING_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, parent_relpath));
@@ -4054,13 +4050,13 @@ set_tc_txn2(void *baton, svn_sqlite__db_
     {
       /* There is an existing ACTUAL row, so just update it. */
       SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
-                                        STMT_UPDATE_ACTUAL_CONFLICT_DATA));
+                                        STMT_UPDATE_ACTUAL_TREE_CONFLICTS));
     }
   else
     {
       /* We need to insert an ACTUAL row with the tree conflict data. */
       SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
-                                        STMT_INSERT_ACTUAL_CONFLICT_DATA));
+                                        STMT_INSERT_ACTUAL_TREE_CONFLICTS));
     }
 
   SVN_ERR(svn_sqlite__bindf(stmt, "iss", stb->wc_id, stb->local_relpath,
@@ -4440,31 +4436,42 @@ svn_wc__db_temp_op_set_dir_depth(svn_wc_
 
    ### Do we need to handle incomplete here? */
 static svn_error_t *
-delete_not_present_children(svn_wc__db_pdh_t *pdh,
-                            const char *local_relpath,
-                            apr_pool_t *scratch_pool)
+remove_children(svn_wc__db_pdh_t *pdh,
+                const char *local_relpath,
+                svn_wc__db_status_t status,
+                apr_int64_t op_depth,
+                apr_pool_t *scratch_pool)
 {
   svn_sqlite__stmt_t *stmt;
-#ifdef SVN_WC__OP_DEPTH
-  apr_int64_t op_depth = relpath_depth(local_relpath);
-#else
-  apr_int64_t op_depth = 2;  /* ### temporary op_depth */
-#endif
 
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_DELETE_NOT_PRESENT_NODES_RECURSIVE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "isi", pdh->wcroot->wc_id,
+                                    STMT_DELETE_CHILD_NODES_RECURSIVE));
+  SVN_ERR(svn_sqlite__bindf(stmt, "isit", pdh->wcroot->wc_id,
                             construct_like_arg(local_relpath,
                                                scratch_pool),
-                            op_depth));
+                            op_depth, presence_map, status));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+db_working_actual_remove(svn_wc__db_pdh_t *pdh,
+                         const char *local_relpath,
+                         apr_pool_t *scratch_pool);
+
+static svn_error_t *
+info_below_working(svn_boolean_t *have_base,
+                   svn_boolean_t *have_work,
+                   svn_wc__db_status_t *status,
+                   svn_wc__db_pdh_t *pdh,
+                   const char *local_relpath,
+                   apr_pool_t *scratch_pool);
+
 /* Update the working node for LOCAL_ABSPATH setting presence=STATUS */
 static svn_error_t *
-db_working_update_presence(svn_wc__db_status_t status,
+db_working_update_presence(apr_int64_t op_depth,
+                           svn_wc__db_status_t status,
                            svn_wc__db_pdh_t *pdh,
                            const char *local_relpath,
                            apr_pool_t *scratch_pool)
@@ -4479,11 +4486,55 @@ db_working_update_presence(svn_wc__db_st
 
   if (status == svn_wc__db_status_base_deleted)
     {
-      /* Switching to base-deleted is undoing an add/copy.  If this
-         was a copy then any children of the copy will now be
-         not-present and should be removed.  By this stage an add will
-         have no children. */
-      SVN_ERR(delete_not_present_children(pdh, local_relpath, scratch_pool));
+      /* Switching to base-deleted is undoing an add/copy.  By this
+         stage an add will have no children. */
+#ifdef SVN_WC__OP_DEPTH
+      const apr_array_header_t *children;
+      apr_pool_t *iterpool;
+      int i;
+
+      /* Children of the copy will be marked deleted in the layer
+         above. */
+      SVN_ERR(remove_children(pdh, local_relpath,
+                              svn_wc__db_status_base_deleted, op_depth + 1,
+                              scratch_pool));
+
+      /* Children of the copy that overlay a lower level become
+         base_deleted, otherwise they get removed. */
+      SVN_ERR(gather_repo_children(&children, pdh, local_relpath, op_depth,
+                                   scratch_pool, scratch_pool));
+      iterpool = svn_pool_create(scratch_pool);
+      for (i = 0; i < children->nelts; ++i)
+        {
+          const char *name = APR_ARRAY_IDX(children, i, const char *);
+          const char *child_relpath;
+          svn_boolean_t below_base, below_work;
+          svn_wc__db_status_t below_status;
+
+          svn_pool_clear(iterpool);
+
+          child_relpath = svn_relpath_join(local_relpath, name, iterpool);
+          SVN_ERR(info_below_working(&below_base, &below_work, &below_status,
+                                     pdh, child_relpath, iterpool));
+          if ((below_base || below_work)
+              && (below_status == svn_wc__db_status_normal
+                  || below_status == svn_wc__db_status_added
+                  || below_status == svn_wc__db_status_incomplete))
+            SVN_ERR(db_working_update_presence(op_depth,
+                                               svn_wc__db_status_base_deleted,
+                                               pdh, child_relpath, iterpool));
+          else
+            SVN_ERR(db_working_actual_remove(pdh, child_relpath, iterpool));
+        }
+      svn_pool_destroy(iterpool);
+#else
+      /* If this was a copy then any children of the copy will now be
+         not-present and should be removed. */
+      SVN_ERR(remove_children(pdh, local_relpath,
+                              svn_wc__db_status_not_present,
+                              2 /* ### temporary op_depth */,
+                              scratch_pool));
+#endif
 
       /* Reset the copyfrom in case this was a copy.
          ### What else should be reset? Properties? Or copy the node again? */
@@ -4539,7 +4590,19 @@ db_working_actual_remove(svn_wc__db_pdh_
   SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
   SVN_ERR(svn_sqlite__step_done(stmt));
 
-  SVN_ERR(delete_not_present_children(pdh, local_relpath, scratch_pool));
+#ifndef SVN_WC__OP_DEPTH
+  SVN_ERR(remove_children(pdh, local_relpath, svn_wc__db_status_not_present,
+                          2 /* ### temporary op_depth */, scratch_pool));
+#else
+  SVN_ERR(remove_children(pdh, local_relpath, svn_wc__db_status_base_deleted,
+                          op_depth + 1, scratch_pool));
+  SVN_ERR(remove_children(pdh, local_relpath, svn_wc__db_status_normal,
+                          op_depth, scratch_pool));
+  SVN_ERR(remove_children(pdh, local_relpath, svn_wc__db_status_not_present,
+                          op_depth, scratch_pool));
+  SVN_ERR(remove_children(pdh, local_relpath, svn_wc__db_status_incomplete,
+                          op_depth, scratch_pool));
+#endif
 
   /* Postcondition: There are no NODES rows in this subtree, at same or
    * greater op_depth. */
@@ -4590,8 +4653,13 @@ db_working_insert(svn_wc__db_status_t st
   apr_int64_t op_depth = 2; /* ### temporary op_depth */
 #endif
 
+#ifdef SVN_WC__OP_DEPTH
+  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
+                                    STMT_INSERT_WORKING_NODE_FROM_NODE));
+#else
   SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
                                     STMT_INSERT_WORKING_NODE_FROM_BASE));
+#endif
   SVN_ERR(svn_sqlite__bindf(stmt, "isit", pdh->wcroot->wc_id,
                             local_relpath, op_depth, presence_map, status));
   SVN_ERR(svn_sqlite__insert(NULL, stmt));
@@ -4799,18 +4867,23 @@ temp_op_delete_txn(void *baton, svn_sqli
 {
   struct temp_op_delete_baton *b = baton;
   svn_wc__db_status_t status, new_working_status;
-  svn_boolean_t have_work, new_have_work;
+  svn_boolean_t have_work, add_work = FALSE, del_work = FALSE, mod_work = FALSE;
+#ifndef SVN_WC__OP_DEPTH
+  svn_boolean_t new_have_work;
+#endif
 
   SVN_ERR(read_info(&status,
-                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                     &have_work,
                     NULL, NULL,
                     b->pdh, b->local_relpath,
                     scratch_pool, scratch_pool));
 
+#ifndef SVN_WC__OP_DEPTH
   new_have_work = have_work;
   new_working_status = status;
+#endif
 
   if (!have_work)
     {
@@ -4818,13 +4891,17 @@ temp_op_delete_txn(void *baton, svn_sqli
       if (status == svn_wc__db_status_normal
           || status == svn_wc__db_status_incomplete)
         {
+#ifdef SVN_WC__OP_DEPTH
+          add_work = TRUE;
+#else
           new_have_work = TRUE;
           new_working_status = svn_wc__db_status_base_deleted;
+#endif
         }
     }
   else if (status == svn_wc__db_status_added)
     {
-      /* ADD/COPY-HERE/MOVE-HERE */
+      /* ADD/COPY-HERE/MOVE-HERE that could be a replace */
       svn_boolean_t add_or_root_of_copy;
 
       SVN_ERR(is_add_or_root_of_copy(&add_or_root_of_copy,
@@ -4837,24 +4914,51 @@ temp_op_delete_txn(void *baton, svn_sqli
           SVN_ERR(info_below_working(&below_base, &below_work, &below_status,
                                      b->pdh, b->local_relpath, scratch_pool));
 
+#ifdef SVN_WC__OP_DEPTH
+          if ((below_base || below_work)
+              && below_status != svn_wc__db_status_not_present)
+            mod_work = TRUE;
+          else
+            del_work = TRUE;
+#else
           if (below_base && below_status != svn_wc__db_status_not_present)
             new_working_status = svn_wc__db_status_base_deleted;
           else
             new_have_work = FALSE;
+#endif
         }
       else
-        new_working_status = svn_wc__db_status_not_present;
+        {
+#ifdef SVN_WC__OP_DEPTH
+          add_work = TRUE;
+#else
+          new_working_status = svn_wc__db_status_not_present;
+#endif
+        }
     }
   else if (status == svn_wc__db_status_incomplete)
     {
       svn_boolean_t add_or_root_of_copy;
       SVN_ERR(is_add_or_root_of_copy(&add_or_root_of_copy,
                                      b->pdh, b->local_relpath, scratch_pool));
+#ifdef SVN_WC__OP_DEPTH
+      if (add_or_root_of_copy)
+        del_work = TRUE;
+      else
+        add_work = TRUE;
+#else
       if (add_or_root_of_copy)
         new_have_work = FALSE;
+#endif
     }
 
-  if (!new_have_work && have_work)
+#ifndef SVN_WC__OP_DEPTH
+  del_work = !new_have_work && have_work;
+  add_work = new_have_work && !have_work;
+  mod_work = new_have_work && have_work && new_working_status != status;
+#endif
+
+  if (del_work)
     {
       SVN_ERR(db_working_actual_remove(b->pdh, b->local_relpath, scratch_pool));
 
@@ -4862,15 +4966,21 @@ temp_op_delete_txn(void *baton, svn_sqli
       SVN_ERR(svn_wc__db_temp_forget_directory(b->db, b->local_abspath,
                                                scratch_pool));
     }
-  else if (new_have_work && !have_work)
+  else if (add_work)
     {
+#ifdef SVN_WC__OP_DEPTH
+      new_working_status = svn_wc__db_status_base_deleted;
+#endif
       SVN_ERR(db_working_insert(new_working_status, b->pdh, b->local_relpath,
                                 scratch_pool));
     }
-  else if (new_have_work && have_work
-           && new_working_status != status)
+  else if (mod_work)
     {
-      SVN_ERR(db_working_update_presence(new_working_status, b->pdh,
+#ifdef SVN_WC__OP_DEPTH
+      new_working_status = svn_wc__db_status_base_deleted;
+#endif
+      SVN_ERR(db_working_update_presence(relpath_depth(b->local_relpath),
+                                         new_working_status, b->pdh,
                                          b->local_relpath, scratch_pool));
     }
   else
@@ -4908,15 +5018,14 @@ svn_wc__db_temp_op_delete(svn_wc__db_t *
   return SVN_NO_ERROR;
 }
 
-/* Like svn_wc__db_read_info(), but with PDH+LOCAL_RELPATH instead of
- * DB+LOCAL_ABSPATH.*/
+/* Like svn_wc__db_read_info(), but taking PDH+LOCAL_RELPATH instead of
+ * DB+LOCAL_ABSPATH, and outputting repos ids instead of URL+UUID. */
 static svn_error_t *
 read_info(svn_wc__db_status_t *status,
           svn_wc__db_kind_t *kind,
           svn_revnum_t *revision,
           const char **repos_relpath,
-          const char **repos_root_url,
-          const char **repos_uuid,
+          apr_int64_t *repos_id,
           svn_revnum_t *changed_rev,
           apr_time_t *changed_date,
           const char **changed_author,
@@ -4927,8 +5036,7 @@ read_info(svn_wc__db_status_t *status,
           const char **target,
           const char **changelist,
           const char **original_repos_relpath,
-          const char **original_root_url,
-          const char **original_uuid,
+          apr_int64_t *original_repos_id,
           svn_revnum_t *original_revision,
           svn_boolean_t *props_mod,
           svn_boolean_t *have_base,
@@ -4990,10 +5098,8 @@ read_info(svn_wc__db_status_t *status,
         }
       if (op_depth != 0)
         {
-          if (repos_root_url)
-            *repos_root_url = NULL;
-          if (repos_uuid)
-            *repos_uuid = NULL;
+          if (repos_id)
+            *repos_id = INVALID_REPOS_ID;
           if (revision)
             *revision = SVN_INVALID_REVNUM;
           if (repos_relpath)
@@ -5004,13 +5110,12 @@ read_info(svn_wc__db_status_t *status,
         }
       else
         {
-          /* Fetch repository information via REPOS_ID. If we have a
+          /* Fetch repository information. If we have a
              WORKING_NODE (and have been added), then the repository
              we're being added to will be dependent upon a parent. The
              caller can scan upwards to locate the repository.  */
           err = svn_error_compose_create(
-            err, repos_location_from_columns(repos_root_url, repos_uuid,
-                                             revision, repos_relpath,
+            err, repos_location_from_columns(repos_id, revision, repos_relpath,
                                              pdh, stmt_info, 1, 5, 2,
                                              result_pool));
         }
@@ -5092,10 +5197,8 @@ read_info(svn_wc__db_status_t *status,
         }
       if (op_depth == 0)
         {
-          if (original_root_url)
-            *original_root_url = NULL;
-          if (original_uuid)
-            *original_uuid = NULL;
+          if (original_repos_id)
+            *original_repos_id = INVALID_REPOS_ID;
           if (original_revision)
             *original_revision = SVN_INVALID_REVNUM;
           if (original_repos_relpath)
@@ -5104,8 +5207,7 @@ read_info(svn_wc__db_status_t *status,
       else
         {
           err = svn_error_compose_create(
-            err, repos_location_from_columns(original_root_url, original_uuid,
-                                             original_revision,
+            err, repos_location_from_columns(original_repos_id, original_revision,
                                              original_repos_relpath,
                                              pdh, stmt_info, 1, 5, 2,
                                              result_pool));
@@ -5123,9 +5225,7 @@ read_info(svn_wc__db_status_t *status,
                  !svn_sqlite__column_is_null(stmt_act, 3) || /* new */
                  !svn_sqlite__column_is_null(stmt_act, 4) || /* working */
                  !svn_sqlite__column_is_null(stmt_act, 0) || /* prop_reject */
-                 !svn_sqlite__column_is_null(stmt_act, 7); /* conflict_data */
-
-              /* At the end of this function we check for tree conflicts */
+                 !svn_sqlite__column_is_null(stmt_act, 5); /* tree_conflict_data */
             }
           else
             *conflicted = FALSE;
@@ -5162,7 +5262,7 @@ read_info(svn_wc__db_status_t *status,
     {
       /* A row in ACTUAL_NODE should never exist without a corresponding
          node in BASE_NODE and/or WORKING_NODE unless it flags a conflict. */
-      if (svn_sqlite__column_is_null(stmt_act, 7)) /* conflict_data */
+      if (svn_sqlite__column_is_null(stmt_act, 5)) /* conflict_data */
           err = svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
                                   _("Corrupt data for '%s'"),
                                   path_for_error_message(pdh->wcroot,
@@ -5184,10 +5284,8 @@ read_info(svn_wc__db_status_t *status,
         *revision = SVN_INVALID_REVNUM;
       if (repos_relpath)
         *repos_relpath = NULL;
-      if (repos_root_url)
-        *repos_root_url = NULL;
-      if (repos_uuid)
-        *repos_uuid = NULL;
+      if (repos_id)
+        *repos_id = INVALID_REPOS_ID;
       if (changed_rev)
         *changed_rev = SVN_INVALID_REVNUM;
       if (changed_date)
@@ -5206,10 +5304,8 @@ read_info(svn_wc__db_status_t *status,
         *changelist = svn_sqlite__column_text(stmt_act, 1, result_pool);
       if (original_repos_relpath)
         *original_repos_relpath = NULL;
-      if (original_root_url)
-        *original_root_url = NULL;
-      if (original_uuid)
-        *original_uuid = NULL;
+      if (original_repos_id)
+        *original_repos_id = INVALID_REPOS_ID;
       if (original_revision)
         *original_revision = SVN_INVALID_REVNUM;
       if (props_mod)
@@ -5272,6 +5368,7 @@ svn_wc__db_read_info(svn_wc__db_status_t
 {
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
+  apr_int64_t repos_id, original_repos_id;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -5280,13 +5377,17 @@ svn_wc__db_read_info(svn_wc__db_status_t
                               scratch_pool, scratch_pool));
   VERIFY_USABLE_PDH(pdh);
 
-  SVN_ERR(read_info(status, kind, revision, repos_relpath, repos_root_url,
-                    repos_uuid, changed_rev, changed_date, changed_author,
+  SVN_ERR(read_info(status, kind, revision, repos_relpath, &repos_id,
+                    changed_rev, changed_date, changed_author,
                     last_mod_time, depth, checksum, translated_size, target,
-                    changelist, original_repos_relpath, original_root_url,
-                    original_uuid, original_revision, props_mod, have_base,
+                    changelist, original_repos_relpath, &original_repos_id,
+                    original_revision, props_mod, have_base,
                     have_work, conflicted, lock,
                     pdh, local_relpath, result_pool, scratch_pool));
+  SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid,
+                           pdh->wcroot->sdb, repos_id, result_pool));
+  SVN_ERR(fetch_repos_info(original_root_url, original_uuid,
+                           pdh->wcroot->sdb, original_repos_id, result_pool));
 
   return SVN_NO_ERROR;
 }
@@ -5372,11 +5473,10 @@ svn_wc__db_read_children_info(apr_hash_t
             }
           else
             {
-              const char *repos_uuid;
               apr_int64_t repos_id = svn_sqlite__column_int64(stmt, 1);
               if (!repos_root_url)
                 {
-                  err = fetch_repos_info(&repos_root_url, &repos_uuid,
+                  err = fetch_repos_info(&repos_root_url, NULL,
                                          pdh->wcroot->sdb, repos_id,
                                          result_pool);
                   if (err)
@@ -5490,7 +5590,7 @@ svn_wc__db_read_children_info(apr_hash_t
                           !svn_sqlite__column_is_null(stmt, 3) ||  /* new */
                           !svn_sqlite__column_is_null(stmt, 4) ||  /* work */
                           !svn_sqlite__column_is_null(stmt, 0) ||  /* prop */
-                          !svn_sqlite__column_is_null(stmt, 8);  /* tree */
+                          !svn_sqlite__column_is_null(stmt, 5);  /* tree */
 
       if (child->conflicted)
         apr_hash_set(*conflicts, apr_pstrdup(result_pool, name),
@@ -5766,7 +5866,7 @@ svn_wc__db_global_relocate(svn_wc__db_t 
   const char *local_dir_relpath;
   svn_wc__db_status_t status;
   struct relocate_baton rb;
-  const char *old_repos_root_url, *stored_local_dir_relpath;
+  const char *stored_local_dir_relpath;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_dir_abspath));
   /* ### assert that we were passed a directory?  */
@@ -5779,10 +5879,9 @@ svn_wc__db_global_relocate(svn_wc__db_t 
 
   SVN_ERR(read_info(&status,
                     NULL, NULL,
-                    &rb.repos_relpath, &old_repos_root_url,
-                    &rb.repos_uuid,
+                    &rb.repos_relpath, &rb.old_repos_id,
                     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                    NULL, NULL, NULL, NULL, NULL, NULL,
+                    NULL, NULL, NULL, NULL, NULL,
                     &rb.have_base_node,
                     NULL, NULL, NULL,
                     pdh, rb.local_relpath,
@@ -5796,11 +5895,10 @@ svn_wc__db_global_relocate(svn_wc__db_t 
                                                        scratch_pool);
       SVN_ERR(read_info(&status,
                         NULL, NULL,
-                        &rb.repos_relpath, &old_repos_root_url,
-                        &rb.repos_uuid,
+                        &rb.repos_relpath, &rb.old_repos_id,
                         NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                         NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                        NULL, NULL, NULL, NULL,
+                        NULL, NULL, NULL,
                         pdh, parent_relpath,
                         scratch_pool, scratch_pool));
       stored_local_dir_relpath = rb.local_relpath;
@@ -5809,7 +5907,7 @@ svn_wc__db_global_relocate(svn_wc__db_t 
   else
     stored_local_dir_relpath = NULL;
 
-  if (!rb.repos_relpath || !old_repos_root_url || !rb.repos_uuid)
+  if (!rb.repos_relpath || rb.old_repos_id == INVALID_REPOS_ID)
     {
       /* Do we need to support relocating something that is
          added/deleted/excluded without relocating the parent?  If not
@@ -5847,18 +5945,11 @@ svn_wc__db_global_relocate(svn_wc__db_t 
         SVN_ERR(scan_upwards_for_repos(&rb.old_repos_id, &rb.repos_relpath,
                                        pdh->wcroot, local_dir_relpath,
                                        scratch_pool, scratch_pool));
-
-      SVN_ERR(fetch_repos_info(&old_repos_root_url, &rb.repos_uuid,
-                               pdh->wcroot->sdb, rb.old_repos_id,
-                               scratch_pool));
-    }
-  else
-    {
-      SVN_ERR(fetch_repos_id(&rb.old_repos_id, old_repos_root_url, rb.repos_uuid,
-                             pdh->wcroot->sdb, scratch_pool));
     }
 
-  SVN_ERR_ASSERT(rb.repos_relpath && old_repos_root_url && rb.repos_uuid);
+  SVN_ERR(fetch_repos_info(NULL, &rb.repos_uuid,
+                           pdh->wcroot->sdb, rb.old_repos_id, scratch_pool));
+  SVN_ERR_ASSERT(rb.repos_relpath && rb.repos_uuid);
 
   if (stored_local_dir_relpath)
     {
@@ -6492,10 +6583,8 @@ svn_wc__db_scan_base_repos(const char **
   SVN_ERR(scan_upwards_for_repos(&repos_id, repos_relpath,
                                  pdh->wcroot, local_relpath,
                                  result_pool, scratch_pool));
-
-  if (repos_root_url || repos_uuid)
-    return fetch_repos_info(repos_root_url, repos_uuid, pdh->wcroot->sdb,
-                            repos_id, result_pool);
+  SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid, pdh->wcroot->sdb,
+                           repos_id, result_pool));
 
   return SVN_NO_ERROR;
 }
@@ -6891,7 +6980,8 @@ svn_wc__db_scan_addition(svn_wc__db_stat
   svn_wc__db_pdh_t *pdh;
   const char *local_relpath;
   const char *op_root_relpath;
-  apr_int64_t repos_id, original_repos_id;
+  apr_int64_t repos_id = INVALID_REPOS_ID;
+  apr_int64_t original_repos_id = INVALID_REPOS_ID;
   apr_int64_t *repos_id_p
     = (repos_root_url || repos_uuid) ? &repos_id : NULL;
   apr_int64_t *original_repos_id_p
@@ -6912,26 +7002,14 @@ svn_wc__db_scan_addition(svn_wc__db_stat
   if (op_root_abspath)
     *op_root_abspath = svn_dirent_join(pdh->wcroot->abspath, op_root_relpath,
                                        result_pool);
-  if (repos_id_p)
-    {
-      SVN_ERR_ASSERT(repos_id != INVALID_REPOS_ID);
-      SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid, pdh->wcroot->sdb,
-                               repos_id, result_pool));
-    }
-  if (original_repos_id_p)
-    {
-      if (original_repos_id == INVALID_REPOS_ID)
-        {
-          if (original_root_url)
-            *original_root_url = NULL;
-          if (original_uuid)
-            *original_uuid = NULL;
-        }
-      else
-        SVN_ERR(fetch_repos_info(original_root_url, original_uuid,
-                                 pdh->wcroot->sdb, original_repos_id,
-                                 result_pool));
-    }
+  /* REPOS_ID must be valid if requested; ORIGINAL_REPOS_ID need not be. */
+  SVN_ERR_ASSERT(repos_id_p == NULL || repos_id != INVALID_REPOS_ID);
+
+  SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid, pdh->wcroot->sdb,
+                           repos_id, result_pool));
+  SVN_ERR(fetch_repos_info(original_root_url, original_uuid,
+                           pdh->wcroot->sdb, original_repos_id,
+                           result_pool));
 
   return SVN_NO_ERROR;
 }
@@ -6955,6 +7033,9 @@ scan_deletion(const char **base_del_relp
   svn_boolean_t child_has_base = FALSE;
   svn_boolean_t found_moved_to = FALSE;
   svn_wc__db_wcroot_t *wcroot = pdh->wcroot;
+#ifdef SVN_WC__OP_DEPTH
+  apr_int64_t local_op_depth, op_depth;
+#endif
 
   /* Initialize all the OUT parameters.  */
   if (base_del_relpath != NULL)
@@ -7031,7 +7112,7 @@ scan_deletion(const char **base_del_relp
         }
 
       /* We need the presence of the WORKING node. Note that legal values
-         are: normal, not-present, base-deleted.  */
+         are: normal, not-present, base-deleted, incomplete.  */
       work_presence = svn_sqlite__column_token(stmt, 1, presence_map);
 
       /* The starting node should be deleted.  */
@@ -7044,6 +7125,8 @@ scan_deletion(const char **base_del_relp
                                  path_for_error_message(wcroot,
                                                         local_relpath,
                                                         scratch_pool));
+
+      /* ### incomplete not handled */
       SVN_ERR_ASSERT(work_presence == svn_wc__db_status_normal
                      || work_presence == svn_wc__db_status_not_present
                      || work_presence == svn_wc__db_status_base_deleted);
@@ -7112,12 +7195,22 @@ scan_deletion(const char **base_del_relp
                                     svn_sqlite__column_text(stmt, 2, NULL));
         }
 
+#ifdef SVN_WC__OP_DEPTH
+      op_depth = svn_sqlite__column_int64(stmt, 3);
+      if (current_relpath == local_relpath)
+        local_op_depth = op_depth;
+
+      if (work_del_relpath && !work_del_relpath[0]
+          && ((op_depth < local_op_depth && op_depth > 0)
+              || child_presence == svn_wc__db_status_not_present))
+#else
       if (work_del_relpath != NULL
           && work_presence == svn_wc__db_status_normal
           && child_presence == svn_wc__db_status_not_present)
-        {
           /* Parent is normal, but child was deleted. Therefore, the child
              is the root of a WORKING subtree deletion.  */
+#endif
+        {
           *work_del_relpath = apr_pstrdup(result_pool, child_relpath);
         }
 
@@ -8049,7 +8142,7 @@ svn_wc__db_node_hidden(svn_boolean_t *hi
 
   /* Now check the BASE node's status.  */
   SVN_ERR(base_get_info(&base_status,
-                        NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                        NULL, NULL, NULL, NULL, NULL, NULL,
                         NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                         pdh, local_relpath, scratch_pool, scratch_pool));
 

Modified: subversion/branches/performance/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/wc_db.h?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/performance/subversion/libsvn_wc/wc_db.h Wed Dec  8 21:53:38 2010
@@ -918,9 +918,8 @@ svn_wc__db_pristine_get_tempdir(const ch
 
 /* Install the file TEMPFILE_ABSPATH (which is sitting in a directory given by
    svn_wc__db_pristine_get_tempdir()) into the pristine data store, to be
-   identified by the SHA-1 checksum of its contents, SHA1_CHECKSUM.
-
-   ### the md5_checksum parameter is temporary. */
+   identified by the SHA-1 checksum of its contents, SHA1_CHECKSUM, and whose
+   MD-5 checksum is MD5_CHECKSUM. */
 svn_error_t *
 svn_wc__db_pristine_install(svn_wc__db_t *db,
                             const char *tempfile_abspath,
@@ -991,19 +990,6 @@ svn_wc__db_pristine_check(svn_boolean_t 
                           apr_pool_t *scratch_pool);
 
 
-/* ### if _check() returns "corrupted pristine file", then this function
-   ### can be used to repair it. It will attempt to restore integrity
-   ### between the SQLite database and the filesystem. Failing that, then
-   ### it will attempt to clean out the record and/or file. Failing that,
-   ### then it will return SOME_ERROR. */
-/* ### dlr: What is this the checksum of? */
-svn_error_t *
-svn_wc__db_pristine_repair(svn_wc__db_t *db,
-                           const char *wri_abspath,
-                           const svn_checksum_t *sha1_checksum,
-                           apr_pool_t *scratch_pool);
-
-
 /* @} */
 
 

Modified: subversion/branches/performance/subversion/svn/checkout-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/checkout-cmd.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/checkout-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/checkout-cmd.c Wed Dec  8 21:53:38 2010
@@ -93,8 +93,6 @@ svn_cl__checkout(apr_getopt_t *os,
 
           /* Discard the peg-revision, if one was provided. */
           SVN_ERR(svn_opt_parse_path(&pegrev, &local_dir, local_dir, pool));
-          if (pegrev.kind != svn_opt_revision_unspecified)
-            local_dir = svn_uri_canonicalize(local_dir, pool);
 
           local_dir = svn_uri_basename(local_dir, pool);
           local_dir = svn_path_uri_decode(local_dir, pool);

Modified: subversion/branches/performance/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/copy-cmd.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/copy-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/copy-cmd.c Wed Dec  8 21:53:38 2010
@@ -78,8 +78,10 @@ svn_cl__copy(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
-  /* Figure out which type of trace editor to use.
-     If the src_paths are not homogeneous, setup_copy will return an error. */
+  /* Figure out which type of notification to use.
+     (There is no need to check that the src paths are homogeneous;
+     svn_client_copy6() through its subroutine try_copy() will return an
+     error if they are not.) */
   src_path = APR_ARRAY_IDX(targets, 0, const char *);
   srcs_are_urls = svn_path_is_url(src_path);
   dst_path = APR_ARRAY_IDX(targets, targets->nelts - 1, const char *);

Modified: subversion/branches/performance/subversion/svn/export-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/export-cmd.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/export-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/export-cmd.c Wed Dec  8 21:53:38 2010
@@ -114,7 +114,7 @@ svn_cl__export(apr_getopt_t *os,
 
   if (nwb.had_externals_error)
     return svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS, NULL,
-                            _("Failure occured processing one or more "
+                            _("Failure occurred processing one or more "
                               "externals definitions"));
 
   return svn_error_return(err);

Modified: subversion/branches/performance/subversion/svn/mkdir-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/mkdir-cmd.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/mkdir-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/mkdir-cmd.c Wed Dec  8 21:53:38 2010
@@ -48,6 +48,8 @@ svn_cl__mkdir(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_array_header_t *targets;
   svn_error_t *err;
+  svn_boolean_t wc_present = FALSE, url_present = FALSE;
+  int i;
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
@@ -56,6 +58,22 @@ svn_cl__mkdir(apr_getopt_t *os,
   if (! targets->nelts)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
 
+  /* 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_CL_ARG_PARSING_ERROR, NULL,
+                        _("Cannot mix repository and working copy "
+                          "targets"));
+
   if (! svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *)))
     {
       ctx->log_msg_func3 = NULL;

Modified: subversion/branches/performance/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/switch-cmd.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/switch-cmd.c Wed Dec  8 21:53:38 2010
@@ -182,7 +182,7 @@ svn_cl__switch(apr_getopt_t *os,
 
   if (nwb.had_externals_error)
     return svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS, NULL,
-                            _("Failure occured processing one or more "
+                            _("Failure occurred processing one or more "
                               "externals definitions"));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/performance/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/update-cmd.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/update-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/update-cmd.c Wed Dec  8 21:53:38 2010
@@ -40,7 +40,9 @@
 /*** Code. ***/
 
 /* Print an update summary when there's more than one target to report
-   about. */
+   about.  Each (const char *) path in TARGETS is an absolute or relative
+   dirent, and each (svn_revnum_t) entry in RESULT_REVS is the corresponding
+   updated revision, or SVN_INVALID_REVNUM if not a valid target. */
 static svn_error_t *
 print_update_summary(apr_array_header_t *targets,
                      apr_array_header_t *result_revs,
@@ -61,35 +63,34 @@ print_update_summary(apr_array_header_t 
   for (i = 0; i < targets->nelts; i++)
     {
       const char *path = APR_ARRAY_IDX(targets, i, const char *);
-      const char *path_local;
+      svn_revnum_t rev = SVN_INVALID_REVNUM;
 
       svn_pool_clear(iter_pool);
 
-      /* Convert to an absolute path if it's not already. */
-      /* (It shouldn't be URL, but don't call svn_dirent_* if it is.) */
-      if (! svn_path_is_url(path) && ! svn_dirent_is_absolute(path))
-        SVN_ERR(svn_dirent_get_absolute(&path, path, iter_pool));
+      /* PATH shouldn't be a URL. */
+      SVN_ERR_ASSERT(! svn_path_is_url(path));
 
-      /* Remove the current working directory prefix from PATH (if
-         PATH is at or under $CWD), and convert to local style for
-         display. */
-      path_local = svn_dirent_skip_ancestor(path_prefix, path);
-      path_local = svn_dirent_local_style(path_local, iter_pool);
-      
+      /* Grab the result revision from the corresponding slot in our
+         RESULT_REVS array. */
       if (i < result_revs->nelts)
-        {
-          svn_revnum_t rev = APR_ARRAY_IDX(result_revs, i, svn_revnum_t);
+        rev = APR_ARRAY_IDX(result_revs, i, svn_revnum_t);
+
+      /* No result rev?  We must have skipped this path.  At any rate,
+         nothing to report here. */
+      if (! SVN_IS_VALID_REVNUM(rev))
+        continue;
+
+      /* Convert to an absolute path if it's not already. */
+      if (! svn_dirent_is_absolute(path))
+        SVN_ERR(svn_dirent_get_absolute(&path, path, iter_pool));
+      path = svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
+                                                             path), iter_pool);
 
-          if (SVN_IS_VALID_REVNUM(rev))
-            SVN_ERR(svn_cmdline_printf(iter_pool,
-                                       _("  Updated '%s' to r%ld.\n"),
-                                       path_local, rev));
-        }
-      else
-        {
-          /* ### Notify about targets for which there's no
-             ### result_rev?  Can we even get here?  */
-        }
+      /* Print an update summary for this target, removing the current
+         working directory prefix from PATH (if PATH is at or under
+         $CWD), and converting the path to local style for display. */
+      SVN_ERR(svn_cmdline_printf(iter_pool, _("  Updated '%s' to r%ld.\n"),
+                                 path, rev));
     }
 
   svn_pool_destroy(iter_pool);
@@ -109,6 +110,7 @@ svn_cl__update(apr_getopt_t *os,
   svn_boolean_t depth_is_sticky;
   struct svn_cl__check_externals_failed_notify_baton nwb;
   apr_array_header_t *result_revs;
+  int i;
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
@@ -119,6 +121,16 @@ svn_cl__update(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
+  /* If any targets are URLs, display error message and exit. */
+  for (i = 0; i < targets->nelts; i++)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+      if (svn_path_is_url(target))
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' is not a local path"), target);
+    }
+
   /* If using changelists, convert targets into a set of paths that
      match the specified changelist(s). */
   if (opt_state->changelists)
@@ -169,7 +181,7 @@ svn_cl__update(apr_getopt_t *os,
 
   if (nwb.had_externals_error)
     return svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS, NULL,
-                            _("Failure occured processing one or more "
+                            _("Failure occurred processing one or more "
                               "externals definitions"));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/performance/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/authz_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/authz_tests.py Wed Dec  8 21:53:38 2010
@@ -1020,9 +1020,6 @@ def wc_wc_copy_revert(sbox):
 
   wc_wc_copy(sbox)
 
-  # Fails with a "No write-lock" error, as does "rm --force", on a
-  # path under A2.  Multiple repeats fail on different paths until the
-  # command completes.  No longer applies with op_depth.
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'revert', '--recursive', sbox.ospath('A2'))
   
@@ -1092,10 +1089,8 @@ test_list = [ None,
               Skip(authz_access_required_at_repo_root2,
                    svntest.main.is_ra_type_file),
               Skip(multiple_matches, svntest.main.is_ra_type_file),
-              Wimp("Needs op_depth", Skip(wc_wc_copy,
-                   svntest.main.is_ra_type_file)),
-              Wimp("Redundant with op_depth", Skip(wc_wc_copy_revert,
-                   svntest.main.is_ra_type_file)),
+              Skip(wc_wc_copy, svntest.main.is_ra_type_file),
+              Skip(wc_wc_copy_revert, svntest.main.is_ra_type_file),
               Skip(authz_recursive_ls,
                    svntest.main.is_ra_type_file),
              ]

Modified: subversion/branches/performance/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/basic_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/basic_tests.py Wed Dec  8 21:53:38 2010
@@ -211,16 +211,6 @@ def basic_update(sbox):
     "update xx/xx", [], [],
     'update', '--quiet', xx_path)
 
-  # URL's are also skipped.
-  urls = ('http://localhost/a/b/c', 'http://localhost', 'svn://localhost')
-  for url in urls:
-    exit_code, out, err = svntest.actions.run_and_verify_svn(
-      "update " + url,
-      ["Skipped '"+url+"'\n",
-      "Summary of conflicts:\n",
-      "  Skipped paths: 1\n"], [],
-      'update', url)
-
 #----------------------------------------------------------------------
 def basic_mkdir_url(sbox):
   "basic mkdir URL"
@@ -2486,12 +2476,14 @@ def basic_add_svn_format_file(sbox):
   svntest.actions.run_and_verify_status(wc_dir, output)
 
 # Issue 2586, Unhelpful error message: Unrecognized URL scheme for ''
+# See also input_validation_tests.py:invalid_mkdir_targets(), which tests
+# the same thing the other way around.
 def basic_mkdir_mix_targets(sbox):
   "mkdir mix url and local path should error"
 
   sbox.build()
   Y_url = sbox.repo_url + '/Y'
-  expected_error = ".*Illegal repository URL 'subdir'"
+  expected_error = "svn: Cannot mix repository and working copy targets"
 
   svntest.actions.run_and_verify_svn(None, None, expected_error,
                                      'mkdir', '-m', 'log_msg', Y_url, 'subdir')

Modified: subversion/branches/performance/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/copy_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/copy_tests.py Wed Dec  8 21:53:38 2010
@@ -1543,7 +1543,7 @@ def wc_to_wc_copy_deleted(sbox):
     'A/B2'         : Item(status='A ', wc_rev='-', copied='+'),
     'A/B2/E'       : Item(status='  ', wc_rev='-', copied='+'),
     'A/B2/E/beta'  : Item(status='  ', wc_rev='-', copied='+'),
-    'A/B2/E/alpha' : Item(status='D ', wc_rev=2),
+    'A/B2/E/alpha' : Item(status='D ', wc_rev='-', copied='+'),
     'A/B2/lambda'  : Item(status='D ', wc_rev='-', copied='+'),
     'A/B2/F'       : Item(status='D ', wc_rev='-', copied='+'),
     })
@@ -2411,6 +2411,8 @@ def move_dir_out_of_moved_dir(sbox):
                                         None,
                                         wc_dir)
 
+# Includes regression testing for issue #3429 ("svn mv A B; svn mv B A"
+# generates replace without history).
 def move_file_back_and_forth(sbox):
   "move a moved file back to original location"
 
@@ -2420,25 +2422,27 @@ def move_file_back_and_forth(sbox):
   rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
   rho_move_path = os.path.join(wc_dir, 'A', 'D', 'rho_moved')
 
-  # Move A/D/G/rho to A/D/rho_moved
+  # Move A/D/G/rho away from and then back to its original path
   svntest.actions.run_and_verify_svn(None, None, [], 'mv',
                                      rho_path, rho_move_path)
-
-  # Move the moved file: A/D/rho_moved to A/B/F/rho_move_moved
   svntest.actions.run_and_verify_svn(None, None, [], 'mv',
                                      rho_move_path, rho_path)
 
-  # Created expected output tree for 'svn ci':
+  # Check expected status before commit
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/D/G/rho' : Item(status='R ', copied='+', wc_rev='-'),
+    })
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Commit, and check expected output and status
   expected_output = svntest.wc.State(wc_dir, {
     'A/D/G/rho' : Item(verb='Replacing'),
     })
-
-  # Create expected status tree
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({
     'A/D/G/rho' : Item(status='  ', wc_rev=2),
     })
-
   svntest.actions.run_and_verify_commit(wc_dir,
                                         expected_output,
                                         expected_status,
@@ -2446,6 +2450,8 @@ def move_file_back_and_forth(sbox):
                                         wc_dir)
 
 
+# Includes regression testing for issue #3429 ("svn mv A B; svn mv B A"
+# generates replace without history).
 def move_dir_back_and_forth(sbox):
   "move a moved dir back to original location"
 
@@ -2474,6 +2480,23 @@ def move_dir_back_and_forth(sbox):
   svntest.actions.run_and_verify_svn(None, None, expected_err,
                                      'mv', D_move_path, D_path)
 
+  if svntest.main.wc_is_singledb(wc_dir):
+    # Verify that the status indicates a replace with history
+    expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+    expected_status.add({
+      'A/D'               : Item(status='R ', copied='+', wc_rev='-'),
+      'A/D/G'             : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/pi'          : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/rho'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/G/tau'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/gamma'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H'             : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/chi'         : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/omega'       : Item(status='  ', copied='+', wc_rev='-'),
+      'A/D/H/psi'         : Item(status='  ', copied='+', wc_rev='-'),
+      })
+    svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
 def copy_move_added_paths(sbox):
   "copy and move added paths without commits"
 
@@ -4422,10 +4445,10 @@ def move_dir_containing_move(sbox):
       'A/B_tmp'               : Item(status='A ', copied='+', wc_rev='-'),
       # alpha has a revision that isn't reported by status.
       'A/B_tmp/E'             : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_tmp/E/alpha'       : Item(status='D ', wc_rev='?', entry_rev='1'),
+      'A/B_tmp/E/alpha'       : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_tmp/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_tmp/E/beta'        : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_tmp/F'             : Item(status='D ', wc_rev='?'),
+      'A/B_tmp/F'             : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_tmp/F_moved'       : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_tmp/lambda'        : Item(status='  ', copied='+', wc_rev='-'),
     })
@@ -4445,12 +4468,11 @@ def move_dir_containing_move(sbox):
                          'A/B_tmp/lambda')
   expected_status.add({
       'A/B_moved'               : Item(status='A ', copied='+', wc_rev='-'),
-      # alpha has a revision that isn't reported by status.
       'A/B_moved/E'             : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_moved/E/alpha'       : Item(status='D ', wc_rev='?', entry_rev='1'),
+      'A/B_moved/E/alpha'       : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_moved/E/alpha_moved' : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_moved/E/beta'        : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B_moved/F'             : Item(status='D ', wc_rev='?'),
+      'A/B_moved/F'             : Item(status='D ', copied='+', wc_rev='-'),
       'A/B_moved/F_moved'       : Item(status='A ', copied='+', wc_rev='-'),
       'A/B_moved/lambda'        : Item(status='  ', copied='+', wc_rev='-'),
     })
@@ -4769,8 +4791,7 @@ def copy_delete_undo(sbox, use_revert):
 
   # Delete a child
   svntest.main.run_svn(wc_dir, 'rm', sbox.ospath('A/B/E-copied/alpha'))
-  expected_status.tweak('A/B/E-copied/alpha', status='D ', copied=None,
-                        wc_rev='?', entry_rev='1')
+  expected_status.tweak('A/B/E-copied/alpha', status='D ')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # Undo the whole copy

Modified: subversion/branches/performance/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/diff_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/diff_tests.py Wed Dec  8 21:53:38 2010
@@ -3713,6 +3713,42 @@ def diff_git_with_props(sbox):
 
   svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff', 
                                      '--git', wc_dir)
+
+def diff_git_with_props_on_dir(sbox):
+  "diff in git format showing prop changes on dir"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Now commit the local mod, creating rev 2.
+  expected_output = svntest.wc.State(wc_dir, {
+    '.' : Item(verb='Sending'),
+    })
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    '' : Item(status='  ', wc_rev=2),
+    })
+
+  svntest.main.run_svn(None, 'ps', 'a','b', wc_dir)
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+  was_cwd = os.getcwd()
+  os.chdir(wc_dir)
+  expected_output = make_git_diff_header(".", "", "revision 1",
+                                         "revision 2",
+                                         add=False, text_changes=False) + [
+      "\n",
+      "Property changes on: \n",
+      "___________________________________________________________________\n",
+      "Added: a\n",
+      "## -0,0 +1 ##\n",
+      "+b\n",
+  ]
+
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'diff',
+                                     '-c2', '--git')
+  os.chdir(was_cwd)
 ########################################################################
 #Run the tests
 
@@ -3775,7 +3811,8 @@ test_list = [ None,
               diff_prop_missing_context,
               diff_prop_multiple_hunks,
               diff_git_empty_files,
-              diff_git_with_props,
+              diff_git_with_props, 
+              diff_git_with_props_on_dir,
               ]
 
 if __name__ == '__main__':

Modified: subversion/branches/performance/subversion/tests/cmdline/entries_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/entries_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/entries_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/entries_tests.py Wed Dec  8 21:53:38 2010
@@ -233,12 +233,9 @@ def deletion_details(sbox):
   entries = svntest.main.run_entriesdump(D2_G_path)
   check_names(entries, 'pi')
 
-  # case (1) of the DELETED nodes COPIED handling (see comment in
-  # read_entries). we are a deletion of a copied subtree. thus, extra
-  # work at commit time. thus, not COPIED.
   # oh, and this sucker has a URL, too
   validate(entries['pi'], url='%s/A/D2/G/pi' % sbox.repo_url,
-           copied=False, schedule=SCHEDULE_DELETE)
+           copied=True, schedule=SCHEDULE_DELETE)
 
   ### hmm. somehow, subtrees can be *added* over a *deleted* subtree.
   ### maybe this can happen via 'svn merge' ? ... the operations below

Modified: subversion/branches/performance/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/externals_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/externals_tests.py Wed Dec  8 21:53:38 2010
@@ -1007,8 +1007,7 @@ def cannot_move_or_remove_file_externals
   # Bring the working copy up to date and check that the file the file
   # external is switched to still exists.
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
 
   open(os.path.join(wc_dir, 'A', 'D', 'gamma')).close()
 
@@ -1036,8 +1035,7 @@ def can_place_file_external_into_dir_ext
   # Bring the working copy up to date and check that the file the file
   # external is switched to still exists.
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
 
   beta1_path = os.path.join(wc_dir, 'A', 'B', 'E', 'beta')
   beta1_contents = open(beta1_path).read()
@@ -1064,8 +1062,7 @@ def can_place_file_external_into_dir_ext
                                       None,
                                       expected_error,
                                       1,
-                                      'up',
-                                      repo_url, wc_dir)
+                                      'up', wc_dir)
 
 #----------------------------------------------------------------------
 
@@ -1082,8 +1079,7 @@ def external_into_path_with_spaces(sbox)
   change_external(wc_dir, ext)
 
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
   probe_paths_exist([
       os.path.join(wc_dir, 'A', 'copy of D'),
       os.path.join(wc_dir, 'A', 'another copy of D'),
@@ -1334,8 +1330,7 @@ def relegate_external(sbox):
   externals_desc = '^/A/B/E        external'
   change_external(A_path, externals_desc)
   svntest.actions.run_and_verify_svn(None, None, [],
-                                     'up',
-                                     repo_url, wc_dir)
+                                     'up', wc_dir)
 
   # create another repository
   other_repo_dir, other_repo_url = sbox.add_repo_path('other')

Modified: subversion/branches/performance/subversion/tests/cmdline/input_validation_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/input_validation_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/input_validation_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/input_validation_tests.py Wed Dec  8 21:53:38 2010
@@ -234,6 +234,20 @@ def invalid_relocate_targets(sbox):
   run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'relocate',
                            "^/", "^/", "^/")
 
+# See also basic_tests.py:basic_mkdir_mix_targets(), which tests
+# the same thing the other way around.
+def invalid_mkdir_targets(sbox):
+  "invalid targets for 'mkdir'"
+  sbox.build(read_only=True)
+  run_and_verify_svn_in_wc(sbox, "svn: Cannot mix repository and working "
+                           "copy targets", 'mkdir', "folder", "^/folder")
+
+def invalid_update_targets(sbox):
+  "non-working copy paths for 'update'"
+  sbox.build(read_only=True)
+  run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'update',
+                           "^/")
+
 ########################################################################
 # Run the tests
 
@@ -261,6 +275,8 @@ test_list = [ None,
               invalid_patch_targets,
               invalid_switch_targets,
               invalid_relocate_targets,
+              invalid_mkdir_targets,
+              invalid_update_targets,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/performance/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/merge_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/merge_tests.py Wed Dec  8 21:53:38 2010
@@ -13340,7 +13340,7 @@ def natural_history_filtering(sbox):
   #
   #   7) Merge all available revisions from 'branch1' to 'branch2'.
   #      'branch2' should have explicit merginfo for both 'branch1' *and* for
-  #      the revisions on 'trunk' which occured after 'branch2' was copied as
+  #      the revisions on 'trunk' which occurred after 'branch2' was copied as
   #      these are not part of 'branch2's natural history.
 
   sbox.build()

Modified: subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svntest/actions.py Wed Dec  8 21:53:38 2010
@@ -1852,7 +1852,6 @@ def inject_conflict_into_wc(sbox, state_
                                       conflicting_contents, contents,
                                       merged_rev)
   exit_code, output, errput = main.run_svn(None, "up", "-r", str(merged_rev),
-                                           sbox.repo_url + "/" + state_path,
                                            file_path)
   if expected_status:
     expected_status.tweak(state_path, wc_rev=merged_rev)

Modified: subversion/branches/performance/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/svntest/main.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/svntest/main.py Wed Dec  8 21:53:38 2010
@@ -731,7 +731,7 @@ def create_repos(path):
     # (e.g. due to a missing 'svnadmin' binary).
     raise SVNRepositoryCreateFailure("".join(stderr).rstrip())
 
-  # Allow unauthenticated users to write to the repos, for ra_svn testing.
+  # Require authentication to write to the repos, for ra_svn testing.
   file_write(get_svnserve_conf_file_path(path),
              "[general]\nauth-access = write\n");
   if options.enable_sasl:

Modified: subversion/branches/performance/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/switch_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/switch_tests.py Wed Dec  8 21:53:38 2010
@@ -558,10 +558,10 @@ def relocate_deleted_missing_copied(sbox
   expected_status.add({
     'A/D2'         : Item(status='A ', wc_rev='-', copied='+'),
     'A/D2/gamma'   : Item(status='  ', wc_rev='-', copied='+'),
-    'A/D2/G'       : Item(status='D ', wc_rev='?'),
-    'A/D2/G/pi'    : Item(status='D ', wc_rev='?'),
-    'A/D2/G/rho'   : Item(status='D ', wc_rev='?'),
-    'A/D2/G/tau'   : Item(status='D ', wc_rev='?'),
+    'A/D2/G'       : Item(status='D ', wc_rev='-', copied='+'),
+    'A/D2/G/pi'    : Item(status='D ', wc_rev='-', copied='+'),
+    'A/D2/G/rho'   : Item(status='D ', wc_rev='-', copied='+'),
+    'A/D2/G/tau'   : Item(status='D ', wc_rev='-', copied='+'),
     'A/D2/H'       : Item(status='  ', wc_rev='-', copied='+'),
     'A/D2/H/chi'   : Item(status='  ', wc_rev='-', copied='+'),
     'A/D2/H/omega' : Item(status='  ', wc_rev='-', copied='+'),
@@ -614,7 +614,7 @@ def relocate_deleted_missing_copied(sbox
                         'A/D2/H', 'A/D2/H/chi', 'A/D2/H/omega', 'A/D2/H/psi',
                         wc_rev='-')
   expected_status.tweak('A/D2/G', 'A/D2/G/pi', 'A/D2/G/rho', 'A/D2/G/tau',
-                        wc_rev='?')
+                        copied='+', wc_rev='-')
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output,
                                         expected_disk,

Modified: subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/upgrade_tests.py Wed Dec  8 21:53:38 2010
@@ -697,17 +697,20 @@ def delete_in_copy_upgrade(sbox):
   wc_dir = sbox.wc_dir
   replace_sbox_with_tarfile(sbox, 'delete-in-copy.tar.bz2')
 
-  # Doesn't work, creates spurious base nodes for the copy
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'upgrade', sbox.wc_dir)
 
+  # This doesn't fail with SVN_WC__OP_DEPTH but doesn't do the right
+  # thing either: B-copied looks like a copy where E and F are
+  # not-present rather than deleted.
+
   expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
   expected_status.add({
       'A/B-copied'         : Item(status='A ', copied='+', wc_rev='-'),
       'A/B-copied/lambda'  : Item(status='  ', copied='+', wc_rev='-'),
-      'A/B-copied/E'       : Item(status='D ', wc_rev='?'),
-      'A/B-copied/E/alpha' : Item(status='D ', wc_rev='?'),
-      'A/B-copied/E/beta'  : Item(status='D ', wc_rev='?'),
+      'A/B-copied/E'       : Item(status='D ', copied='+', wc_rev='-'),
+      'A/B-copied/E/alpha' : Item(status='D ', copied='+', wc_rev='-'),
+      'A/B-copied/E/beta'  : Item(status='D ', copied='+', wc_rev='-'),
       'A/B-copied/F'       : Item(status='  ', copied='+', wc_rev='-'),
       })
   run_and_verify_status_no_server(sbox.wc_dir, expected_status)

Modified: subversion/branches/performance/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_wc/db-test.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_wc/db-test.c Wed Dec  8 21:53:38 2010
@@ -75,7 +75,8 @@
 #define MD5_2 "5d41402abc4b2a76b9719d911017c592"
 #define SHA1_1 "aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d"
 
-#define I_TC_DATA "((conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
+#define F_TC_DATA "(conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
+#define G_TC_DATA "(conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
 
 static const char * const TESTING_DATA = (
    /* Load our test data.
@@ -262,7 +263,13 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
    "insert into actual_node values ("
    "  1, 'I', '', null, null, null, null, null, 'changelist', null, "
-   "'" I_TC_DATA "', null, null, null, null);"
+   "  null, null, null, null, null);"
+   "insert into actual_node values ("
+   "  1, 'F', '', null, null, null, null, null, null, null, "
+   "  '" F_TC_DATA "', null, null, null, null);"
+   "insert into actual_node values ("
+   "  1, 'G', '', null, null, null, null, null, null, null, "
+   "  '" G_TC_DATA "', null, null, null, null);"
    "  "
    "insert into nodes values ("
    "  1, 'M', 0, '', 1, 'M', null, 'normal', "

Modified: subversion/branches/performance/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/tests/libsvn_wc/entries-compat.c?rev=1043705&r1=1043704&r2=1043705&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/performance/subversion/tests/libsvn_wc/entries-compat.c Wed Dec  8 21:53:38 2010
@@ -75,7 +75,8 @@
 #define MD5_1 "2d18c5e57e84c5b8a5e9a6e13fa394dc"
 #define MD5_2 "5d41402abc4b2a76b9719d911017c592"
 
-#define I_TC_DATA "((conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) (conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file)) )"
+#define F_TC_DATA "(conflict F file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
+#define G_TC_DATA "(conflict G file update edited deleted (version 22 " ROOT_ONE " 1 2 branch1/ft/F none) (version 22 " ROOT_ONE " 1 3 branch1/ft/F file))"
 
 static const char * const TESTING_DATA = (
    /* Load our test data.
@@ -262,7 +263,13 @@ static const char * const TESTING_DATA =
   "  null, null, null, null);"
    "insert into actual_node values ("
    "  1, 'I', '', null, null, null, null, null, 'changelist', null, "
-   "'" I_TC_DATA "', null, null, null, null);"
+   "  null, null, null, null, null);"
+   "insert into actual_node values ("
+   "  1, 'F', '', null, null, null, null, null, null, null, "
+   "  '" F_TC_DATA "', null, null, null, null);"
+   "insert into actual_node values ("
+   "  1, 'G', '', null, null, null, null, null, null, null, "
+   "  '" G_TC_DATA "', null, null, null, null);"
    "  "
    "insert into nodes values ("
    "  1, 'M', 0, '', 1, 'M', 1, 'normal', "