You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/09/20 22:16:16 UTC

svn commit: r999098 [7/8] - in /subversion/branches/performance: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org/tigris/subversion/javahl/ subversion/bindings/javahl/...

Modified: subversion/branches/performance/subversion/libsvn_wc/wc_db_pdh.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/wc_db_pdh.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/wc_db_pdh.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/wc_db_pdh.c Mon Sep 20 20:16:13 2010
@@ -85,52 +85,6 @@ get_old_version(int *version,
   return SVN_NO_ERROR;
 }
 
-#ifndef SVN_WC__SINGLE_DB
-/* The filesystem has a directory at LOCAL_RELPATH. Examine the metadata
-   to determine if a *file* was supposed to be there.
-
-   ### this function is only required for per-dir .svn support. once all
-   ### metadata is collected in a single wcroot, then we won't need to
-   ### look in subdirs for other metadata.  */
-static svn_error_t *
-determine_obstructed_file(svn_boolean_t *obstructed_file,
-                          const 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;
-
-  SVN_ERR_ASSERT(wcroot->sdb != NULL && wcroot->wc_id != UNKNOWN_WC_ID);
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                    STMT_SELECT_WORKING_IS_FILE));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                            wcroot->wc_id,
-                            local_relpath));
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-  if (have_row)
-    {
-      *obstructed_file = svn_sqlite__column_boolean(stmt, 0);
-    }
-  else
-    {
-      SVN_ERR(svn_sqlite__reset(stmt));
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                        STMT_SELECT_BASE_IS_FILE));
-      SVN_ERR(svn_sqlite__bindf(stmt, "is",
-                                wcroot->wc_id,
-                                local_relpath));
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-      if (have_row)
-        *obstructed_file = svn_sqlite__column_boolean(stmt, 0);
-    }
-
-  return svn_sqlite__reset(stmt);
-}
-#endif
-
 
 /* */
 static svn_error_t *
@@ -326,12 +280,10 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
   (*wcroot)->sdb = sdb;
   (*wcroot)->wc_id = wc_id;
   (*wcroot)->format = format;
-#ifdef SVN_WC__SINGLE_DB
   /* 8 concurrent locks is probably more than a typical wc_ng based svn client
      uses. */
   (*wcroot)->owned_locks = apr_array_make(result_pool, 8,
                                           sizeof(svn_wc__db_wclock_t));
-#endif
 
   /* SDB will be NULL for pre-NG working copies. We only need to run a
      cleanup when the SDB is present.  */
@@ -392,7 +344,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
   const char *build_relpath;
   svn_wc__db_pdh_t *found_pdh = NULL;
   svn_wc__db_pdh_t *child_pdh;
-  svn_boolean_t obstruction_possible = FALSE;
   svn_sqlite__db_t *sdb;
   svn_boolean_t moved_upwards = FALSE;
   svn_boolean_t always_check = FALSE;
@@ -473,14 +424,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
       /* Start the local_relpath empty. If *this* directory contains the
          wc.db, then relpath will be the empty string.  */
       build_relpath = "";
-
-      /* It is possible that LOCAL_ABSPATH was *intended* to be a file,
-         but we just found a directory in its place. After we build
-         the PDH, then we'll examine the parent to see how it describes
-         this particular path.
-
-         ### this is only possible with per-dir wc.db databases.  */
-      obstruction_possible = TRUE;
     }
 
   /* LOCAL_ABSPATH refers to a directory at this point. The PDH corresponding
@@ -548,16 +491,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
 
       moved_upwards = TRUE;
 
-      /* An obstruction is no longer possible.
-
-         Example: we were given "/some/file" and "file" turned out to be
-         a directory. We did not find an SDB at "/some/file/.svn/wc.db",
-         so we are now going to look at "/some/.svn/wc.db". That SDB will
-         contain the correct information for "file".
-
-         ### obstruction is only possible with per-dir wc.db databases.  */
-      obstruction_possible = FALSE;
-
       /* Is the parent directory recorded in our hash?  */
       found_pdh = apr_hash_get(db->dir_data,
                                local_abspath, APR_HASH_KEY_STRING);
@@ -614,10 +547,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
                             NULL, UNKNOWN_WC_ID, wc_format,
                             db->auto_upgrade, db->enforce_empty_wq,
                             db->state_pool, scratch_pool));
-
-      /* Don't test for a directory obstructing a versioned file. The wc-1
-         code can manage that itself.  */
-      obstruction_possible = FALSE;
     }
 
   {
@@ -631,96 +560,6 @@ svn_wc__db_pdh_parse_local_abspath(svn_w
     *local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
   }
 
-  /* Check to see if this (versioned) directory is obstructing what should
-     be a file in the parent directory.
-
-     ### obstruction is only possible with per-dir wc.db databases.  */
-  if (obstruction_possible)
-    {
-      const char *parent_dir;
-      svn_wc__db_pdh_t *parent_pdh;
-
-      /* We should NOT have moved up a directory.  */
-      assert(!moved_upwards);
-
-      /* Get/make a PDH for the parent.  */
-      parent_dir = svn_dirent_dirname(local_abspath, scratch_pool);
-      parent_pdh = apr_hash_get(db->dir_data, parent_dir, APR_HASH_KEY_STRING);
-      if (parent_pdh == NULL || parent_pdh->wcroot == NULL)
-        {
-          svn_error_t *err = svn_wc__db_util_open_db(&sdb, parent_dir,
-                                                     SDB_FILE, smode,
-                                                     db->state_pool,
-                                                     scratch_pool);
-          if (err)
-            {
-              if (err->apr_err != SVN_ERR_SQLITE_ERROR
-                  && !APR_STATUS_IS_ENOENT(err->apr_err))
-                return svn_error_return(err);
-              svn_error_clear(err);
-
-              /* No parent, so we're at a wcroot apparently. An obstruction
-                 is (therefore) not possible.  */
-              parent_pdh = NULL;
-            }
-          else
-            {
-              /* ### construct this according to per-dir semantics.  */
-              if (parent_pdh == NULL)
-                {
-                  parent_pdh = apr_pcalloc(db->state_pool,
-                                           sizeof(*parent_pdh));
-                  parent_pdh->local_abspath = apr_pstrdup(db->state_pool,
-                                                          parent_dir);
-                }
-              else
-                {
-                  /* The PDH should have been built correctly (so far).  */
-                  SVN_ERR_ASSERT(strcmp(parent_pdh->local_abspath,
-                                        parent_dir) == 0);
-                }
-
-              SVN_ERR(svn_wc__db_pdh_create_wcroot(&parent_pdh->wcroot,
-                                    parent_pdh->local_abspath,
-                                    sdb,
-                                    1 /* ### hack.  */,
-                                    FORMAT_FROM_SDB,
-                                    db->auto_upgrade, db->enforce_empty_wq,
-                                    db->state_pool, scratch_pool));
-
-              apr_hash_set(db->dir_data,
-                           parent_pdh->local_abspath, APR_HASH_KEY_STRING,
-                           parent_pdh);
-
-              (*pdh)->parent = parent_pdh;
-            }
-        }
-
-#ifndef SVN_WC__SINGLE_DB
-      if (parent_pdh)
-        {
-          const char *lookfor_relpath = svn_dirent_basename(local_abspath,
-                                                            scratch_pool);
-
-          /* Was there supposed to be a file sitting here?  */
-          SVN_ERR(determine_obstructed_file(&(*pdh)->obstructed_file,
-                                            parent_pdh->wcroot,
-                                            lookfor_relpath,
-                                            scratch_pool));
-
-          /* If we determined that a file was supposed to be at the
-             LOCAL_ABSPATH requested, then return the PDH and LOCAL_RELPATH
-             which describes that file.  */
-          if ((*pdh)->obstructed_file)
-            {
-              *pdh = parent_pdh;
-              *local_relpath = apr_pstrdup(result_pool, lookfor_relpath);
-              return SVN_NO_ERROR;
-            }
-        }
-#endif
-    }
-
   /* The PDH is complete. Stash it into DB.  */
   apr_hash_set(db->dir_data,
                (*pdh)->local_abspath, APR_HASH_KEY_STRING,

Modified: subversion/branches/performance/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/wc_db_private.h?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/performance/subversion/libsvn_wc/wc_db_private.h Mon Sep 20 20:16:13 2010
@@ -84,11 +84,9 @@ typedef struct svn_wc__db_wcroot_t {
      format has not (yet) been determined, this will be UNKNOWN_FORMAT.  */
   int format;
 
-#ifdef SVN_WC__SINGLE_DB
   /* Array of svn_wc__db_wclock_t fields (not pointers!).
      Typically just one or two locks maximum. */
   apr_array_header_t *owned_locks;
-#endif
 
 } svn_wc__db_wcroot_t;
 
@@ -98,15 +96,6 @@ typedef struct svn_wc__db_wcroot_t {
  * a given working copy directory.
  */
 typedef struct svn_wc__db_pdh_t {
-#ifndef SVN_WC__SINGLE_DB
-  /* This (versioned) working copy directory is obstructing what *should*
-     be a file in the parent directory (according to its metadata).
-
-     Note: this PDH should probably be ignored (or not created).
-
-     ### obstruction is only possible with per-dir wc.db databases.  */
-  svn_boolean_t obstructed_file;
-#endif
 
   /* The absolute path to this working copy directory. */
   const char *local_abspath;
@@ -117,11 +106,6 @@ typedef struct svn_wc__db_pdh_t {
   /* The parent directory's per-dir information. */
   struct svn_wc__db_pdh_t *parent;
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Whether this process owns a write-lock on this directory. */
-  svn_boolean_t locked;
-#endif
-
   /* Hold onto the old-style access baton that corresponds to this PDH.  */
   svn_wc_adm_access_t *adm_access;
 } svn_wc__db_pdh_t;

Modified: subversion/branches/performance/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/workqueue.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/performance/subversion/libsvn_wc/workqueue.c Mon Sep 20 20:16:13 2010
@@ -42,7 +42,6 @@
 
 /* Workqueue operation names.  */
 #define OP_REVERT "revert"
-#define OP_KILLME "killme"
 #define OP_BASE_REMOVE "base-remove"
 #define OP_DELETION_POSTCOMMIT "deletion-postcommit"
 /* Arguments of OP_POSTCOMMIT:
@@ -297,7 +296,6 @@ run_revert(svn_wc__db_t *db,
     {
       SVN__NOT_IMPLEMENTED();
     }
-#ifdef SVN_WC__SINGLE_DB
   else if (kind == svn_wc__db_kind_dir)
     {
       svn_node_kind_t disk_kind;
@@ -306,7 +304,6 @@ run_revert(svn_wc__db_t *db,
       if (disk_kind == svn_node_none)
         SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
     }
-#endif
 
   if (kind == svn_wc__db_kind_dir)
     parent_abspath = local_abspath;
@@ -532,134 +529,6 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
 }
 
 /* ------------------------------------------------------------------------ */
-#ifndef SVN_WC__SINGLE_DB
-/* OP_KILLME  */
-
-/* Process the OP_KILLME work item WORK_ITEM.
- * See svn_wc__wq_add_killme() which generates this work item.
- * Implements (struct work_item_dispatch).func. */
-static svn_error_t *
-run_killme(svn_wc__db_t *db,
-           const svn_skel_t *work_item,
-           const char *wri_abspath,
-           svn_cancel_func_t cancel_func,
-           void *cancel_baton,
-           apr_pool_t *scratch_pool)
-{
-  const svn_skel_t *arg1 = work_item->children->next;
-  const char *dir_abspath;
-  svn_boolean_t adm_only;
-  svn_wc__db_status_t status;
-  svn_revnum_t original_revision;
-  svn_revnum_t parent_revision;
-  const char *repos_relpath;
-  const char *repos_root_url;
-  const char *repos_uuid;
-  svn_error_t *err;
-  apr_int64_t val;
-
-  /* We need a NUL-terminated path, so copy it out of the skel.  */
-  dir_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
-  SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
-  adm_only = (val != 0);
-
-  err = svn_wc__db_base_get_info(&status, NULL, &original_revision,
-                                 NULL, NULL, NULL,
-                                 NULL, NULL, NULL,
-                                 NULL, NULL, NULL,
-                                 NULL, NULL, NULL,
-                                 db, dir_abspath,
-                                 scratch_pool, scratch_pool);
-  if (err)
-    {
-      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-        return svn_error_return(err);
-
-      /* The administrative area in the subdir is gone, and the subdir
-         is also removed from its parent's record.  */
-      svn_error_clear(err);
-
-      /* When we removed the directory, if ADM_ONLY was TRUE, then that
-         has definitely been done and there is nothing left to do.
-
-         If ADM_ONLY was FALSE, then the subdir and its contents were
-         removed *before* the administrative was removed. Anything that
-         may be left are unversioned nodes. We don't want to do anything
-         to those, so we're done for this case, too.  */
-      return SVN_NO_ERROR;
-    }
-  if (status == svn_wc__db_status_obstructed)
-    {
-      /* The subdir's administrative area has already been removed, but
-         there was still an entry in the parent. Whatever is in that
-         record, it doesn't matter. The subdir has been handled already.  */
-      return SVN_NO_ERROR;
-    }
-
-  SVN_ERR(svn_wc__db_read_info(NULL, NULL, &parent_revision,
-                               NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL,
-                               db, svn_dirent_dirname(dir_abspath,
-                                                      scratch_pool),
-                               scratch_pool, scratch_pool));
-
-  /* Remember the repository this node is associated with.  */
-  SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
-                                     &repos_uuid,
-                                     db, dir_abspath,
-                                     scratch_pool, scratch_pool));
-
-  /* Blow away the administrative directories, and possibly the working
-     copy tree too. */
-  err = svn_wc__internal_remove_from_revision_control(
-          db, dir_abspath,
-          !adm_only /* destroy_wf */, FALSE /* instant_error */,
-          cancel_func, cancel_baton,
-          scratch_pool);
-  if (err && err->apr_err != SVN_ERR_WC_LEFT_LOCAL_MOD)
-    return svn_error_return(err);
-  svn_error_clear(err);
-
-  /* If revnum of this dir is greater than parent's revnum, then
-     recreate 'deleted' entry in parent. */
-  if (original_revision > parent_revision)
-    {
-      SVN_ERR(svn_wc__db_base_add_absent_node(
-                db, dir_abspath,
-                repos_relpath, repos_root_url, repos_uuid,
-                original_revision, svn_wc__db_kind_dir,
-                svn_wc__db_status_not_present,
-                NULL, NULL,
-                scratch_pool));
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__wq_add_killme(svn_wc__db_t *db,
-                      const char *dir_abspath,
-                      svn_boolean_t adm_only,
-                      apr_pool_t *scratch_pool)
-{
-  svn_skel_t *work_item = svn_skel__make_empty_list(scratch_pool);
-
-  /* The skel still points at DIR_ABSPATH, but the skel will be serialized
-     just below in the wq_add call.  */
-  svn_skel__prepend_int(adm_only, work_item, scratch_pool);
-  svn_skel__prepend_str(dir_abspath, work_item, scratch_pool);
-  svn_skel__prepend_str(OP_KILLME, work_item, scratch_pool);
-
-  SVN_ERR(svn_wc__db_wq_add(db, dir_abspath, work_item, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-#endif
-
-/* ------------------------------------------------------------------------ */
 /* OP_REMOVE_BASE  */
 
 /* Removes a BASE_NODE and all it's data, leaving any adds and copies as is.
@@ -687,15 +556,7 @@ remove_base_node(svn_wc__db_t *db,
                                &have_work, NULL, NULL,
                                db, local_abspath, scratch_pool, scratch_pool));
 
-#ifndef SVN_WC__SINGLE_DB
-  if (!have_base)
-    return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                             _("Node '%s' not found."),
-                             svn_dirent_local_style(local_abspath,
-                                                    scratch_pool));
-#else
   SVN_ERR_ASSERT(have_base); /* Verified in caller and _base_get_children() */
-#endif
 
   if (wrk_status == svn_wc__db_status_normal
       || wrk_status == svn_wc__db_status_not_present
@@ -740,17 +601,8 @@ remove_base_node(svn_wc__db_t *db,
 
   if (base_status == svn_wc__db_status_normal
       && wrk_status != svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-      && wrk_status != svn_wc__db_status_obstructed_add
-#endif
       && wrk_status != svn_wc__db_status_excluded)
     {
-#ifndef SVN_WC__SINGLE_DB
-      if (base_kind == svn_wc__db_kind_dir)
-        SVN_ERR(svn_wc__adm_destroy(db, local_abspath, cancel_func, cancel_baton,
-                                    scratch_pool));
-#endif
-
       if (wrk_status != svn_wc__db_status_deleted
           && (base_kind == svn_wc__db_kind_file
               || base_kind == svn_wc__db_kind_symlink))
@@ -758,10 +610,7 @@ remove_base_node(svn_wc__db_t *db,
           SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
         }
       else if (base_kind == svn_wc__db_kind_dir
-#ifdef SVN_WC__SINGLE_DB
-               && wrk_status != svn_wc__db_status_deleted
-#endif
-              )
+               && wrk_status != svn_wc__db_status_deleted)
         {
           svn_error_t *err = svn_io_dir_remove_nonrecursive(local_abspath,
                                                             scratch_pool);
@@ -779,9 +628,6 @@ remove_base_node(svn_wc__db_t *db,
       SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath, scratch_pool));
     }
   else if (wrk_status == svn_wc__db_status_added
-#ifndef SVN_WC__SINGLE_DB
-           || wrk_status == svn_wc__db_status_obstructed_add
-#endif
            || (have_work && wrk_status == svn_wc__db_status_excluded))
     /* ### deletes of working additions should fall in this case, but
        ### we can't express these without the 4th tree */
@@ -833,18 +679,6 @@ run_base_remove(svn_wc__db_t *db,
                                            &repos_uuid,
                                            db, local_abspath, scratch_pool,
                                            scratch_pool));
-
-#ifndef SVN_WC__SINGLE_DB
-      /* ### When LOCAL_ABSPATH is obstructed, we might not receive a valid
-         ### revision here. For the small time that is left until Single-DB
-         ### just mark the not-present node as revision 0, as we are not
-         ### interested in the revision of not-present nodes anyway.
-
-         ### Triggered by update_tests.py 15: issue #919, updates that delete
-       */
-      if (!SVN_IS_VALID_REVNUM(revision))
-        revision = 0;
-#endif
     }
 
   SVN_ERR(remove_base_node(db, local_abspath,
@@ -853,16 +687,15 @@ run_base_remove(svn_wc__db_t *db,
 
   if (keep_not_present)
     {
-      SVN_ERR(svn_wc__db_base_add_absent_node(db, local_abspath,
-                                              repos_relpath,
-                                              repos_root_url,
-                                              repos_uuid,
-                                              revision,
-                                              kind,
-                                              svn_wc__db_status_not_present,
-                                              NULL,
-                                              NULL,
-                                              scratch_pool));
+      SVN_ERR(svn_wc__db_base_add_not_present_node(db, local_abspath,
+                                                   repos_relpath,
+                                                   repos_root_url,
+                                                   repos_uuid,
+                                                   revision,
+                                                   kind,
+                                                   NULL,
+                                                   NULL,
+                                                   scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -931,40 +764,6 @@ run_deletion_postcommit(svn_wc__db_t *db
       const char *repos_uuid;
       svn_revnum_t parent_revision;
 
-#ifndef SVN_WC__SINGLE_DB
-      /* If we are suppose to delete "this dir", drop a 'killme' file
-         into my own administrative dir as a signal for svn_wc__run_log()
-         to blow away the administrative area after it is finished
-         processing this logfile.  */
-      if (kind == svn_wc__db_kind_dir)
-        {
-          svn_boolean_t keep_local;
-
-          /* Bump the revision number of this_dir anyway, so that it
-             might be higher than its parent's revnum.  If it's
-             higher, then the process that sees KILLME and destroys
-             the directory can also place a 'deleted' dir entry in the
-             parent. */
-          SVN_ERR(svn_wc__db_temp_op_set_rev_and_repos_relpath(db,
-                                                               local_abspath,
-                                                               new_revision,
-                                                               FALSE,
-                                                               NULL, NULL,
-                                                               NULL, FALSE,
-                                                               scratch_pool));
-
-          SVN_ERR(svn_wc__db_temp_determine_keep_local(&keep_local, db,
-                                                       local_abspath,
-                                                       scratch_pool));
-
-          /* Ensure the directory is deleted later.  */
-          return svn_error_return(svn_wc__wq_add_killme(
-                                    db, local_abspath,
-                                    keep_local /* adm_only */,
-                                    scratch_pool));
-        }
-#endif
-
       /* Get hold of repository info, if we are going to need it,
          before deleting the file, */
       SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, &parent_revision, NULL,
@@ -993,11 +792,10 @@ run_deletion_postcommit(svn_wc__db_t *db
              lie;  therefore, it must remember the file as being
              'deleted' for a while.  Create a new, uninteresting
              ghost entry:  */
-          SVN_ERR(svn_wc__db_base_add_absent_node(
+          SVN_ERR(svn_wc__db_base_add_not_present_node(
                     db, local_abspath,
                     repos_relpath, repos_root_url, repos_uuid,
                     new_revision, kind,
-                    svn_wc__db_status_not_present,
                     NULL, NULL,
                     scratch_pool));
         }
@@ -1308,11 +1106,7 @@ log_do_committed(svn_wc__db_t *db,
                                        db, child_abspath, iterpool, iterpool));
 
           /* Committing a deletion should remove the local nodes.  */
-          if (child_status == svn_wc__db_status_deleted
-#ifndef SVN_WC__SINGLE_DB
-              || child_status == svn_wc__db_status_obstructed_delete
-#endif
-              )
+          if (child_status == svn_wc__db_status_deleted)
             {
               SVN_ERR(svn_wc__internal_remove_from_revision_control(
                         db, child_abspath,
@@ -1475,12 +1269,6 @@ log_do_committed(svn_wc__db_t *db,
       return SVN_NO_ERROR;
   }
 
-#ifndef SVN_WC__SINGLE_DB
-  /* Make sure we have a parent stub in a clean/unmodified state.  */
-  SVN_ERR(svn_wc__db_temp_set_parent_stub_to_normal(db, local_abspath,
-                                                    TRUE, scratch_pool));
-#endif
-
   return SVN_NO_ERROR;
 }
 
@@ -2453,10 +2241,6 @@ static const struct work_item_dispatch d
   { OP_PRISTINE_GET_TRANSLATED, run_pristine_get_translated },
   { OP_POSTUPGRADE, run_postupgrade },
 
-#ifndef SVN_WC__SINGLE_DB
-  { OP_KILLME, run_killme },
-#endif
-
   /* Sentinel.  */
   { NULL }
 };

Modified: subversion/branches/performance/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_wc/workqueue.h?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/performance/subversion/libsvn_wc/workqueue.h Mon Sep 20 20:16:13 2010
@@ -213,17 +213,6 @@ svn_wc__wq_build_base_remove(svn_skel_t 
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 
-#ifndef SVN_WC__SINGLE_DB
-/* Handle the old "KILLME" concept -- perform the actual deletion of a
-   subdir (or just its admin area) during post-commit processing of a
-   deleted subdir.  */
-svn_error_t *
-svn_wc__wq_add_killme(svn_wc__db_t *db,
-                      const char *adm_abspath,
-                      svn_boolean_t adm_only,
-                      apr_pool_t *scratch_pool);
-#endif
-
 
 /* ### Temporary helper to store text conflict marker locations as a wq
    ### operation. Eventually the data must be stored in the pristine store+db

Modified: subversion/branches/performance/subversion/mod_dav_svn/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/mod_dav_svn/authz.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/mod_dav_svn/authz.c (original)
+++ subversion/branches/performance/subversion/mod_dav_svn/authz.c Mon Sep 20 20:16:13 2010
@@ -32,17 +32,12 @@
 #include "dav_svn.h"
 
 
-/* Convert incoming REV and PATH from request R into a version-resource URI
-   for REPOS and perform a GET subrequest on it.  This will invoke any authz
-   modules loaded into apache.  Return TRUE if the subrequest succeeds, FALSE
-   otherwise. If REV is SVN_INVALID_REVNUM, then we look at HEAD.
-*/
-static svn_boolean_t
-allow_read(request_rec *r,
-           const dav_svn_repos *repos,
-           const char *path,
-           svn_revnum_t rev,
-           apr_pool_t *pool)
+svn_boolean_t
+dav_svn__allow_read(request_rec *r,
+                    const dav_svn_repos *repos,
+                    const char *path,
+                    svn_revnum_t rev,
+                    apr_pool_t *pool)
 {
   const char *uri;
   request_rec *subreq;
@@ -176,7 +171,7 @@ authz_read(svn_boolean_t *allowed,
     }
 
   /* We have a (rev, path) pair to check authorization on. */
-  *allowed = allow_read(arb->r, arb->repos, revpath, rev, pool);
+  *allowed = dav_svn__allow_read(arb->r, arb->repos, revpath, rev, pool);
 
   return SVN_NO_ERROR;
 }
@@ -195,10 +190,10 @@ dav_svn__authz_read_func(dav_svn__authz_
 
 
 svn_boolean_t
-dav_svn__allow_read(const dav_resource *resource,
-                   svn_revnum_t rev,
-                   apr_pool_t *pool)
+dav_svn__allow_read_resource(const dav_resource *resource,
+                             svn_revnum_t rev,
+                             apr_pool_t *pool)
 {
-  return allow_read(resource->info->r, resource->info->repos,
-                    resource->info->repos_path, rev, pool);
+  return dav_svn__allow_read(resource->info->r, resource->info->repos,
+                             resource->info->repos_path, rev, pool);
 }

Modified: subversion/branches/performance/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/mod_dav_svn/dav_svn.h?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/performance/subversion/mod_dav_svn/dav_svn.h Mon Sep 20 20:16:13 2010
@@ -645,12 +645,13 @@ dav_svn__get_deleted_rev_report(const da
 /*** posts/ ***/
 
 /* The list of Subversion's custom POSTs. */
-/* ### should move these report names to a public header to share with
-   ### the client (and third parties). */
+/* ### TODO:  Populate this list and transmit its contents in the
+   ### OPTIONS response.
 static const char * dav_svn__posts_list[] = {
   "create-txn",
   NULL
 };
+*/
 
 /* The various POST handlers, defined in posts/, and used by repos.c.  */
 dav_error *
@@ -672,17 +673,32 @@ typedef struct
 } dav_svn__authz_read_baton;
 
 
-/* Convert incoming RESOURCE and revision REV into a version-resource URI and
-   perform a GET subrequest on it.  This will invoke any authz modules loaded
-   into apache. Return TRUE if the subrequest succeeds, FALSE otherwise.
+/* Return TRUE iff the current user (as determined by Apache's
+   authentication system) has permission to read PATH in REPOS at REV
+   (where an invalid REV means "HEAD").  This will invoke any authz
+   modules loaded into Apache unless this Subversion location has been
+   configured to bypass those in favor of a direct lookup in the
+   Subversion authz subsystem.  Use POOL for any temporary allocation.
+*/
+svn_boolean_t
+dav_svn__allow_read(request_rec *r,
+                    const dav_svn_repos *repos,
+                    const char *path,
+                    svn_revnum_t rev,
+                    apr_pool_t *pool);
 
-   If REV is SVN_INVALID_REVNUM, then we look at HEAD.
-   Use POOL for any temporary allocation.
+/* Return TRUE iff the current user (as determined by Apache's
+   authentication system) has permission to read RESOURCE in REV
+   (where an invalid REV means "HEAD").  This will invoke any authz
+   modules loaded into Apache unless this Subversion location has been
+   configured to bypass those in favor of a direct lookup in the
+   Subversion authz subsystem.  Use POOL for any temporary allocation.
 */
 svn_boolean_t
-dav_svn__allow_read(const dav_resource *resource,
-                   svn_revnum_t rev,
-                   apr_pool_t *pool);
+dav_svn__allow_read_resource(const dav_resource *resource,
+                             svn_revnum_t rev,
+                             apr_pool_t *pool);
+
 
 /* If authz is enabled in the specified BATON, return a read authorization
    function. Otherwise, return NULL. */

Modified: subversion/branches/performance/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/mod_dav_svn/liveprops.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/performance/subversion/mod_dav_svn/liveprops.c Mon Sep 20 20:16:13 2010
@@ -144,7 +144,7 @@ get_path_revprop(svn_string_t **propval,
 {
   *propval = NULL;
 
-  if (! dav_svn__allow_read(resource, committed_rev, pool))
+  if (! dav_svn__allow_read_resource(resource, committed_rev, pool))
     return SVN_NO_ERROR;
 
   /* Get the property of the created revision. The authz is already

Modified: subversion/branches/performance/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/mod_dav_svn/lock.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/mod_dav_svn/lock.c (original)
+++ subversion/branches/performance/subversion/mod_dav_svn/lock.c Mon Sep 20 20:16:13 2010
@@ -458,7 +458,8 @@ get_locks(dav_lockdb *lockdb,
 
   /* If the resource's fs path is unreadable, we don't want to say
      anything about locks attached to it.*/
-  if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+  if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+                                     resource->pool))
     return dav_new_error(resource->pool, HTTP_FORBIDDEN,
                          DAV_ERR_LOCK_SAVE_LOCK,
                          "Path is not accessible.");
@@ -518,7 +519,8 @@ find_lock(dav_lockdb *lockdb,
 
   /* If the resource's fs path is unreadable, we don't want to say
      anything about locks attached to it.*/
-  if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+  if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+                                     resource->pool))
     return dav_new_error(resource->pool, HTTP_FORBIDDEN,
                          DAV_ERR_LOCK_SAVE_LOCK,
                          "Path is not accessible.");
@@ -596,7 +598,8 @@ has_locks(dav_lockdb *lockdb, const dav_
 
   /* If the resource's fs path is unreadable, we don't want to say
      anything about locks attached to it.*/
-  if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+  if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+                                     resource->pool))
     return dav_new_error(resource->pool, HTTP_FORBIDDEN,
                          DAV_ERR_LOCK_SAVE_LOCK,
                          "Path is not accessible.");
@@ -639,7 +642,8 @@ append_locks(dav_lockdb *lockdb,
 
   /* If the resource's fs path is unreadable, we don't allow a lock to
      be created on it. */
-  if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+  if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+                                     resource->pool))
     return dav_new_error(resource->pool, HTTP_FORBIDDEN,
                          DAV_ERR_LOCK_SAVE_LOCK,
                          "Path is not accessible.");
@@ -806,7 +810,8 @@ remove_lock(dav_lockdb *lockdb,
 
   /* If the resource's fs path is unreadable, we don't allow a lock to
      be removed from it. */
-  if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+  if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+                                     resource->pool))
     return dav_new_error(resource->pool, HTTP_FORBIDDEN,
                          DAV_ERR_LOCK_SAVE_LOCK,
                          "Path is not accessible.");
@@ -891,7 +896,8 @@ refresh_locks(dav_lockdb *lockdb,
 
   /* If the resource's fs path is unreadable, we don't want to say
      anything about locks attached to it.*/
-  if (! dav_svn__allow_read(resource, SVN_INVALID_REVNUM, resource->pool))
+  if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
+                                     resource->pool))
     return dav_new_error(resource->pool, HTTP_FORBIDDEN,
                          DAV_ERR_LOCK_SAVE_LOCK,
                          "Path is not accessible.");

Modified: subversion/branches/performance/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/mod_dav_svn/repos.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/performance/subversion/mod_dav_svn/repos.c Mon Sep 20 20:16:13 2010
@@ -3120,6 +3120,7 @@ deliver(const dav_resource *resource, ap
       apr_hash_t *entries;
       apr_pool_t *entry_pool;
       apr_array_header_t *sorted;
+      svn_revnum_t dir_rev = SVN_INVALID_REVNUM;
       int i;
 
       /* XML schema for the directory index if xslt_uri is set:
@@ -3197,6 +3198,7 @@ deliver(const dav_resource *resource, ap
         }
       else
         {
+          dir_rev = svn_fs_revision_root_revision(resource->info->root.root);
           serr = svn_fs_dir_entries(&entries, resource->info->root.root,
                                     resource->info->repos_path, resource->pool);
           if (serr != NULL)
@@ -3305,9 +3307,31 @@ deliver(const dav_resource *resource, ap
           const char *name = item->key;
           const char *href = name;
           svn_boolean_t is_dir = (entry->kind == svn_node_dir);
+          const char *repos_relpath = NULL;
 
           svn_pool_clear(entry_pool);
 
+          /* DIR_REV is set to a valid revision if we're looking at
+             the entries of a versioned directory.  Otherwise, we're
+             looking at a parent-path listing. */
+          if (SVN_IS_VALID_REVNUM(dir_rev))
+            {
+              repos_relpath = svn_path_join(resource->info->repos_path,
+                                            name, entry_pool);
+              if (! dav_svn__allow_read(resource->info->r,
+                                        resource->info->repos,
+                                        repos_relpath,
+                                        dir_rev,
+                                        entry_pool))
+                continue;
+            }
+          else
+            {
+              /* ### TODO:  We could test for readability of the root
+                     directory of each repository and hide those that
+                     the user can't see. */
+            }
+
           /* append a trailing slash onto the name for directories. we NEED
              this for the href portion so that the relative reference will
              descend properly. for the visible portion, it is just nice. */
@@ -3933,6 +3957,7 @@ do_walk(walker_ctx_t *ctx, int depth)
   apr_size_t uri_len;
   apr_size_t repos_len;
   apr_hash_t *children;
+  apr_pool_t *iterpool;
 
   /* Clear the temporary pool. */
   svn_pool_clear(ctx->info.pool);
@@ -4008,6 +4033,7 @@ do_walk(walker_ctx_t *ctx, int depth)
                                 params->pool);
 
   /* iterate over the children in this collection */
+  iterpool = svn_pool_create(params->pool);
   for (hi = apr_hash_first(params->pool, children); hi; hi = apr_hash_next(hi))
     {
       const void *key;
@@ -4015,6 +4041,8 @@ do_walk(walker_ctx_t *ctx, int depth)
       void *val;
       svn_fs_dirent_t *dirent;
 
+      svn_pool_clear(iterpool);
+
       /* fetch one of the children */
       apr_hash_this(hi, &key, &klen, &val);
       dirent = val;
@@ -4022,7 +4050,16 @@ do_walk(walker_ctx_t *ctx, int depth)
       /* authorize access to this resource, if applicable */
       if (params->walk_type & DAV_WALKTYPE_AUTH)
         {
-          /* ### how/what to do? */
+          const char *repos_relpath =
+            apr_pstrcat(iterpool, 
+                        apr_pstrmemdup(iterpool,
+                                       ctx->repos_path->data,
+                                       ctx->repos_path->len),
+                        key, NULL);
+          if (! dav_svn__allow_read(ctx->info.r, ctx->info.repos,
+                                    repos_relpath, ctx->info.root.rev,
+                                    iterpool))
+            continue;
         }
 
       /* append this child to our buffers */
@@ -4063,6 +4100,9 @@ do_walk(walker_ctx_t *ctx, int depth)
       ctx->uri->len = uri_len;
       ctx->repos_path->len = repos_len;
     }
+  
+  svn_pool_destroy(iterpool);
+
   return NULL;
 }
 

Modified: subversion/branches/performance/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/cl.h?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/cl.h (original)
+++ subversion/branches/performance/subversion/svn/cl.h Mon Sep 20 20:16:13 2010
@@ -229,6 +229,7 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t show_diff;        /* produce diff output */
   svn_boolean_t internal_diff;    /* override diff_cmd in config file */
   svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
+  svn_boolean_t old_patch_target_names; /* Use target names from old side */
 } svn_cl__opt_state_t;
 
 

Modified: subversion/branches/performance/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/conflict-callbacks.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/performance/subversion/svn/conflict-callbacks.c Mon Sep 20 20:16:13 2010
@@ -59,23 +59,33 @@ svn_cl__conflict_baton_make(svn_cl__acce
 svn_cl__accept_t
 svn_cl__accept_from_word(const char *word)
 {
-  if (strcmp(word, SVN_CL__ACCEPT_POSTPONE) == 0)
+  /* Shorthand options are consistent with  svn_cl__conflict_handler(). */
+  if (strcmp(word, SVN_CL__ACCEPT_POSTPONE) == 0
+      || strcmp(word, "p") == 0)
     return svn_cl__accept_postpone;
   if (strcmp(word, SVN_CL__ACCEPT_BASE) == 0)
+    /* ### shorthand? */
     return svn_cl__accept_base;
   if (strcmp(word, SVN_CL__ACCEPT_WORKING) == 0)
+    /* ### shorthand? */
     return svn_cl__accept_working;
-  if (strcmp(word, SVN_CL__ACCEPT_MINE_CONFLICT) == 0)
+  if (strcmp(word, SVN_CL__ACCEPT_MINE_CONFLICT) == 0
+      || strcmp(word, "mc") == 0)
     return svn_cl__accept_mine_conflict;
-  if (strcmp(word, SVN_CL__ACCEPT_THEIRS_CONFLICT) == 0)
+  if (strcmp(word, SVN_CL__ACCEPT_THEIRS_CONFLICT) == 0
+      || strcmp(word, "tc") == 0)
     return svn_cl__accept_theirs_conflict;
-  if (strcmp(word, SVN_CL__ACCEPT_MINE_FULL) == 0)
+  if (strcmp(word, SVN_CL__ACCEPT_MINE_FULL) == 0
+      || strcmp(word, "mf") == 0)
     return svn_cl__accept_mine_full;
-  if (strcmp(word, SVN_CL__ACCEPT_THEIRS_FULL) == 0)
+  if (strcmp(word, SVN_CL__ACCEPT_THEIRS_FULL) == 0
+      || strcmp(word, "tf") == 0)
     return svn_cl__accept_theirs_full;
-  if (strcmp(word, SVN_CL__ACCEPT_EDIT) == 0)
+  if (strcmp(word, SVN_CL__ACCEPT_EDIT) == 0
+      || strcmp(word, "e") == 0)
     return svn_cl__accept_edit;
-  if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0)
+  if (strcmp(word, SVN_CL__ACCEPT_LAUNCH) == 0
+      || strcmp(word, "l") == 0)
     return svn_cl__accept_launch;
   /* word is an invalid action. */
   return svn_cl__accept_invalid;
@@ -493,6 +503,7 @@ svn_cl__conflict_handler(svn_wc_conflict
 
           if (strcmp(answer, "s") == 0)
             {
+              /* These are used in svn_cl__accept_from_word(). */
               SVN_ERR(svn_cmdline_fprintf(stderr, subpool,
               _("\n"
                 "  (e)  edit             - change merged file in an editor\n"

Modified: subversion/branches/performance/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/main.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/main.c (original)
+++ subversion/branches/performance/subversion/svn/main.c Mon Sep 20 20:16:13 2010
@@ -122,6 +122,7 @@ typedef enum {
   opt_show_diff,
   opt_internal_diff,
   opt_use_git_diff_format,
+  opt_old_patch_target_names,
 } svn_cl__longopt_t;
 
 /* Option codes and descriptions for the command line client.
@@ -357,6 +358,10 @@ const apr_getopt_option_t svn_cl__option
   {"reverse-diff", opt_reverse_diff, 0,
                     N_("apply the unidiff in reverse\n"
                        "                             "
+                       "This option also reverses patch target names; the\n"
+                       "                             "
+                       "--old-patch-target-names option will prevent this.\n"
+                       "                             "
                        "[alias: --rd]")},
   {"ignore-whitespace", opt_ignore_whitespace, 0,
                        N_("ignore whitespace during pattern matching\n"
@@ -373,6 +378,19 @@ const apr_getopt_option_t svn_cl__option
   {"git", opt_use_git_diff_format, 0,
                        N_("use git's extended diff format\n")},
                   
+  {"old-patch-target-names", opt_old_patch_target_names, 0,
+                       N_("use target names from the old side of a patch.\n"
+                       "                             "
+                       "If a diff header contains\n"
+                       "                             "
+                       "  --- foo.c\n"
+                       "                             "
+                       "  +++ foo.c.new\n"
+                       "                             "
+                       "this option will cause the name \"foo.c\" to be used\n"
+                       "                             "
+                       "[alias: --optn]")},
+
   /* Long-opt Aliases
    *
    * These have NULL desriptions, but an option code that matches some
@@ -403,6 +421,7 @@ const apr_getopt_option_t svn_cl__option
   {"idiff",         opt_internal_diff, 0, NULL},
   {"nul",           opt_no_unlock, 0, NULL},
   {"keep-lock",     opt_no_unlock, 0, NULL},
+  {"optn",          opt_old_patch_target_names, 0, NULL},
 
   {0,               0, 0, 0},
 };
@@ -852,7 +871,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  do not agree with.\n"
      ),
     {'q', opt_dry_run, opt_strip_count, opt_reverse_diff,
-     opt_ignore_whitespace} },
+     opt_ignore_whitespace, opt_old_patch_target_names} },
 
   { "propdel", svn_cl__propdel, {"pdel", "pd"}, N_
     ("Remove a property from files, dirs, or revisions.\n"
@@ -1788,6 +1807,9 @@ main(int argc, const char *argv[])
       case opt_use_git_diff_format:
         opt_state.use_git_diff_format = TRUE;
         break;
+      case opt_old_patch_target_names:
+        opt_state.old_patch_target_names = TRUE;
+        break;
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */

Modified: subversion/branches/performance/subversion/svn/patch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/patch-cmd.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/patch-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/patch-cmd.c Mon Sep 20 20:16:13 2010
@@ -74,6 +74,7 @@ svn_cl__patch(apr_getopt_t *os,
 
   SVN_ERR(svn_client_patch(abs_patch_path, abs_target_path,
                            opt_state->dry_run, opt_state->strip_count,
+                           opt_state->old_patch_target_names,
                            opt_state->reverse_diff,
                            opt_state->ignore_whitespace,
                            TRUE, NULL, NULL, ctx, pool, pool));

Modified: subversion/branches/performance/subversion/svn/upgrade-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svn/upgrade-cmd.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svn/upgrade-cmd.c (original)
+++ subversion/branches/performance/subversion/svn/upgrade-cmd.c Mon Sep 20 20:16:13 2010
@@ -31,6 +31,7 @@
 #include "svn_client.h"
 #include "svn_error_codes.h"
 #include "svn_error.h"
+#include "svn_path.h"
 #include "cl.h"
 #include "svn_private_config.h"
 
@@ -59,6 +60,19 @@ svn_cl__upgrade(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
+  /* Don't even attempt to modify the working copy if any of the
+   * targets look like URLs. URLs are invalid input. */
+  for (i = 0; i < targets->nelts; i++)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+      if (svn_path_is_url(target))
+        return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  target));
+    }
+
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)
     {

Modified: subversion/branches/performance/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svnrdump/dump_editor.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/performance/subversion/svnrdump/dump_editor.c Mon Sep 20 20:16:13 2010
@@ -33,6 +33,12 @@
 
 #define ARE_VALID_COPY_ARGS(p,r) ((p) && SVN_IS_VALID_REVNUM(r))
 
+#ifdef SVN_DEBUG
+#define LDR_DBG(x) SVN_DBG(x)
+#else
+#define LDR_DBG(x) while(0)
+#endif
+
 /* The baton used by the dump editor. */
 struct dump_edit_baton {
   /* The output stream we write the dumpfile to */
@@ -113,7 +119,7 @@ make_dir_baton(const char *path,
   new_db->copyfrom_rev = copyfrom_rev;
   new_db->added = added;
   new_db->written_out = FALSE;
-  new_db->deleted_entries = apr_hash_make(pool);
+  new_db->deleted_entries = apr_hash_make(eb->pool);
 
   return new_db;
 }
@@ -197,10 +203,10 @@ dump_node(struct dump_edit_baton *eb,
           apr_pool_t *pool)
 {
   /* Remove leading slashes from path and copyfrom_path */
-  if (path && strcmp(path, "/"))
+  if (path)
     path = ((*path == '/') ? path + 1 : path);
   
-  if (copyfrom_path && strcmp(copyfrom_path, "/"))
+  if (copyfrom_path)
     copyfrom_path = ((*copyfrom_path == '/') ?
                      copyfrom_path + 1 : copyfrom_path);
 
@@ -315,6 +321,7 @@ open_root(void *edit_baton,
   struct dump_edit_baton *eb = edit_baton;
   /* Allocate a special pool for the edit_baton to avoid pool
      lifetime issues */
+
   eb->pool = svn_pool_create(pool);
   eb->props = apr_hash_make(eb->pool);
   eb->deleted_props = apr_hash_make(eb->pool);
@@ -322,6 +329,8 @@ open_root(void *edit_baton,
 
   *root_baton = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
                                edit_baton, NULL, FALSE, pool);
+  LDR_DBG(("open_root %p\n", *root_baton));
+
   return SVN_NO_ERROR;
 }
 
@@ -332,14 +341,15 @@ delete_entry(const char *path,
              apr_pool_t *pool)
 {
   struct dir_baton *pb = parent_baton;
-  const char *mypath = apr_pstrdup(pool, path);
+
+  LDR_DBG(("delete_entry %s\n", path));
 
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
   /* Add this path to the deleted_entries of the parent directory
      baton. */
-  apr_hash_set(pb->deleted_entries, mypath, APR_HASH_KEY_STRING, pb);
+  apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, pb);
 
   return SVN_NO_ERROR;
 }
@@ -358,6 +368,8 @@ add_directory(const char *path,
     = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb, pb, TRUE, pool);
   svn_boolean_t is_copy;
 
+  LDR_DBG(("add_directory %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -398,6 +410,8 @@ open_directory(const char *path,
   const char *copyfrom_path = NULL;
   svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
 
+  LDR_DBG(("open_directory %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -423,14 +437,19 @@ close_directory(void *dir_baton,
 {
   struct dir_baton *db = dir_baton;
   struct dump_edit_baton *eb = db->eb;
+  apr_pool_t *iterpool;
   apr_hash_index_t *hi;
-  apr_pool_t *iterpool = svn_pool_create(pool);
+
+  LDR_DBG(("close_directory %p\n", dir_baton));
+
+  /* Create a pool just for iterations to allocate a loop variable */
+  iterpool = svn_pool_create(pool);
 
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(eb, &(eb->dump_props_pending), TRUE, pool));
 
-  /* Dump the directory entries */
-  for (hi = apr_hash_first(pool, db->deleted_entries); hi;
+  /* Dump the deleted directory entries */
+  for (hi = apr_hash_first(iterpool, db->deleted_entries); hi;
        hi = apr_hash_next(hi))
     {
       const void *key;
@@ -438,12 +457,11 @@ close_directory(void *dir_baton,
       apr_hash_this(hi, &key, NULL, NULL);
       path = key;
 
-      svn_pool_clear(iterpool);
-
       SVN_ERR(dump_node(db->eb, path, svn_node_unknown, svn_node_action_delete,
-                        FALSE, NULL, SVN_INVALID_REVNUM, iterpool));
+                        FALSE, NULL, SVN_INVALID_REVNUM, pool));
     }
 
+  svn_hash__clear(db->deleted_entries, pool);
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
@@ -460,6 +478,8 @@ add_file(const char *path,
   void *val;
   svn_boolean_t is_copy;
 
+  LDR_DBG(("add_file %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -500,6 +520,8 @@ open_file(const char *path,
   const char *copyfrom_path = NULL;
   svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
 
+  LDR_DBG(("open_file %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -530,6 +552,8 @@ change_dir_prop(void *parent_baton,
 {
   struct dir_baton *db = parent_baton;
 
+  LDR_DBG(("change_dir_prop %p\n", parent_baton));
+
   if (svn_property_kind(NULL, name) != svn_prop_regular_kind)
     return SVN_NO_ERROR;
 
@@ -566,6 +590,8 @@ change_file_prop(void *file_baton,
 {
   struct dump_edit_baton *eb = file_baton;
 
+  LDR_DBG(("change_file_prop %p\n", file_baton));
+
   if (svn_property_kind(NULL, name) != svn_prop_regular_kind)
     return SVN_NO_ERROR;
 
@@ -620,6 +646,8 @@ apply_textdelta(void *file_baton, const 
   hb->pool = handler_pool;
   hb->eb = eb;
 
+  LDR_DBG(("apply_textdelta %p\n", file_baton));
+
   /* Use a temporary file to measure the text-content-length */
   SVN_ERR(svn_stream_open_unique(&(hb->delta_filestream), &hb->delta_abspath,
                                  NULL, svn_io_file_del_none, hb->pool,
@@ -650,6 +678,8 @@ close_file(void *file_baton,
   svn_stream_t *delta_filestream;
   apr_finfo_t *info = apr_pcalloc(pool, sizeof(apr_finfo_t));
 
+  LDR_DBG(("close_file %p\n", file_baton));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(eb, &(eb->dump_props_pending), FALSE, pool));
 
@@ -737,6 +767,7 @@ static svn_error_t *
 close_edit(void *edit_baton, apr_pool_t *pool)
 {
   struct dump_edit_baton *eb = edit_baton;
+  LDR_DBG(("close_edit\n"));
   svn_pool_destroy(eb->pool);
 
   return SVN_NO_ERROR;

Modified: subversion/branches/performance/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svnrdump/load_editor.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/performance/subversion/svnrdump/load_editor.c Mon Sep 20 20:16:13 2010
@@ -30,9 +30,15 @@
 #include "svn_path.h"
 #include "svn_ra.h"
 #include "svn_io.h"
+#include "svn_private_config.h"
+
+#include <apr_network_io.h>
 
 #include "load_editor.h"
 
+#define SVNRDUMP_PROP_LOCK SVN_PROP_PREFIX "rdump-lock"
+#define LOCK_RETRIES 10
+
 #ifdef SVN_DEBUG
 #define LDR_DBG(x) SVN_DBG(x)
 #else
@@ -50,6 +56,66 @@ commit_callback(const svn_commit_info_t 
   return SVN_NO_ERROR;
 }
 
+/* Acquire a lock (of sorts) on the repository associated with the
+ * given RA SESSION. This lock is just a revprop change attempt in a
+ * time-delay loop. This function is duplicated by svnsync in main.c.
+ *
+ * ### TODO: Make this function more generic and
+ * expose it through a header for use by other Subversion
+ * applications to avoid duplication.
+ */
+static svn_error_t *
+get_lock(svn_ra_session_t *session, apr_pool_t *pool)
+{
+  char hostname_str[APRMAXHOSTLEN + 1] = { 0 };
+  svn_string_t *mylocktoken, *reposlocktoken;
+  apr_status_t apr_err;
+  apr_pool_t *subpool;
+  int i;
+
+  apr_err = apr_gethostname(hostname_str, sizeof(hostname_str), pool);
+  if (apr_err)
+    return svn_error_wrap_apr(apr_err, _("Can't get local hostname"));
+
+  mylocktoken = svn_string_createf(pool, "%s:%s", hostname_str,
+                                   svn_uuid_generate(pool));
+
+  subpool = svn_pool_create(pool);
+
+  for (i = 0; i < LOCK_RETRIES; ++i)
+    {
+      svn_pool_clear(subpool);
+
+      SVN_ERR(svn_ra_rev_prop(session, 0, SVNRDUMP_PROP_LOCK, &reposlocktoken,
+                              subpool));
+
+      if (reposlocktoken)
+        {
+          /* Did we get it? If so, we're done, otherwise we sleep. */
+          if (strcmp(reposlocktoken->data, mylocktoken->data) == 0)
+            return SVN_NO_ERROR;
+          else
+            {
+              SVN_ERR(svn_cmdline_printf
+                      (pool, _("Failed to get lock on destination "
+                               "repos, currently held by '%s'\n"),
+                       reposlocktoken->data));
+
+              apr_sleep(apr_time_from_sec(1));
+            }
+        }
+      else if (i < LOCK_RETRIES - 1)
+        {
+          /* Except in the very last iteration, try to set the lock. */
+          SVN_ERR(svn_ra_change_rev_prop(session, 0, SVNRDUMP_PROP_LOCK,
+                                         mylocktoken, subpool));
+        }
+    }
+
+  return svn_error_createf(APR_EINVAL, NULL,
+                           _("Couldn't get lock on destination repos "
+                             "after %d attempts"), i);
+}
 
 static svn_error_t *
 new_revision_record(void **revision_baton,
@@ -539,13 +605,11 @@ drive_dumpstream_loader(svn_stream_t *st
   struct parse_baton *pb;
   pb = parse_baton;
 
-  /* ### TODO: Figure out if we're allowed to set revprops before
-     ### we're too late and mess up the repository. svnsync uses some
-     ### sort of locking mechanism. */
-
+  SVN_ERR(get_lock(session, pool));
   SVN_ERR(svn_ra_get_repos_root2(session, &(pb->root_url), pool));
   SVN_ERR(svn_repos_parse_dumpstream2(stream, parser, parse_baton,
                                       NULL, NULL, pool));
+  SVN_ERR(svn_ra_change_rev_prop(session, 0, SVNRDUMP_PROP_LOCK, NULL, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/performance/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svnserve/cyrus_auth.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/performance/subversion/svnserve/cyrus_auth.c Mon Sep 20 20:16:13 2010
@@ -297,13 +297,13 @@ svn_error_t *cyrus_auth_request(svn_ra_s
                  SVN_CONFIG_SECTION_SASL,
                  SVN_CONFIG_OPTION_MIN_SSF,
                  "0");
-  secprops.min_ssf = atoi(val);
+  SVN_ERR(svn_cstring_atoui(&secprops.min_ssf, val));
 
   svn_config_get(b->cfg, &val,
                  SVN_CONFIG_SECTION_SASL,
                  SVN_CONFIG_OPTION_MAX_SSF,
                  "256");
-  secprops.max_ssf = atoi(val);
+  SVN_ERR(svn_cstring_atoui(&secprops.max_ssf, val));
 
   /* Set security properties. */
   result = sasl_setprop(sasl_ctx, SASL_SEC_PROPS, &secprops);

Modified: subversion/branches/performance/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svnserve/main.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svnserve/main.c (original)
+++ subversion/branches/performance/subversion/svnserve/main.c Mon Sep 20 20:16:13 2010
@@ -44,11 +44,13 @@
 #include "svn_path.h"
 #include "svn_opt.h"
 #include "svn_repos.h"
+#include "svn_string.h"
 #include "svn_fs.h"
 #include "svn_version.h"
 #include "svn_io.h"
 
 #include "svn_private_config.h"
+#include "private/svn_dep_compat.h"
 #include "winservice.h"
 
 #ifdef HAVE_UNISTD_H
@@ -502,7 +504,17 @@ int main(int argc, const char *argv[])
           break;
 
         case SVNSERVE_OPT_LISTEN_PORT:
-          port = atoi(arg);
+          {
+            apr_uint64_t val;
+
+            err = svn_cstring_strtoui64(&val, arg, 0, APR_UINT16_MAX, 10);
+            if (err)
+              return svn_cmdline_handle_exit_error(
+                       svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, err,
+                                         _("Invalid port '%s'"), arg),
+                       pool, "svnserve: ");
+            port = (apr_uint16_t)val;
+          }
           break;
 
         case SVNSERVE_OPT_LISTEN_HOST:

Modified: subversion/branches/performance/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svnserve/serve.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svnserve/serve.c (original)
+++ subversion/branches/performance/subversion/svnserve/serve.c Mon Sep 20 20:16:13 2010
@@ -1452,6 +1452,14 @@ static svn_error_t *get_dir(svn_ra_svn_c
           svn_pool_clear(subpool);
 
           file_path = svn_uri_join(full_path, name, subpool);
+
+          if (! lookup_access(subpool, b, conn, svn_authz_read,
+                              file_path, FALSE))
+            {
+              apr_hash_set(entries, name, APR_HASH_KEY_STRING, NULL);
+              continue;
+            }
+
           entry = apr_pcalloc(pool, sizeof(*entry));
 
           if (dirent_fields & SVN_DIRENT_KIND)

Modified: subversion/branches/performance/subversion/svnsync/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/svnsync/main.c?rev=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/svnsync/main.c (original)
+++ subversion/branches/performance/subversion/svnsync/main.c Mon Sep 20 20:16:13 2010
@@ -285,7 +285,13 @@ check_lib_versions(void)
 
 
 /* Acquire a lock (of sorts) on the repository associated with the
- * given RA SESSION.
+ * given RA SESSION. This lock is just a revprop change attempt in a
+ * time-delay loop. This function is duplicated by svnrdump in
+ * load_editor.c.
+ *
+ * ### TODO: Make this function more generic and
+ * expose it through a header for use by other Subversion
+ * applications to avoid duplication.
  */
 static svn_error_t *
 get_lock(svn_ra_session_t *session, apr_pool_t *pool)

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=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/authz_tests.py Mon Sep 20 20:16:13 2010
@@ -1026,6 +1026,40 @@ def wc_wc_copy_revert(sbox):
   expected_status.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta')
   svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
 
+def authz_recursive_ls(sbox):
+  "recursive ls with private subtrees"
+
+  sbox.build(create_wc = False)
+  local_dir = sbox.wc_dir
+  write_restrictive_svnserve_conf(sbox.repo_dir)
+
+  write_authz_file(sbox, {'/'       : '* = r',
+                          '/A/B/E'  : '* =',
+                          '/A/mu'   : '* =',
+                          })
+  expected_entries = [
+    'A/',
+    'A/B/',
+    'A/B/F/',
+    'A/B/lambda',
+    'A/C/',
+    'A/D/',
+    'A/D/G/',
+    'A/D/G/pi',
+    'A/D/G/rho',
+    'A/D/G/tau',
+    'A/D/H/',
+    'A/D/H/chi',
+    'A/D/H/omega',
+    'A/D/H/psi',
+    'A/D/gamma',
+    'iota',
+    ]
+  svntest.actions.run_and_verify_svn('recursive ls from /',
+                                     map(lambda x: x + '\n', expected_entries),
+                                     [], 'ls', '-R',
+                                     sbox.repo_url)
+
 ########################################################################
 # Run the tests
 
@@ -1057,6 +1091,8 @@ test_list = [ None,
               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),
              ]
 
 if __name__ == '__main__':

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=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/copy_tests.py Mon Sep 20 20:16:13 2010
@@ -3799,106 +3799,6 @@ def allow_unversioned_parent_for_copy_sr
                                      wc2_dir,
                                      copy_to_path)
 
-
-#----------------------------------------------------------------------
-# Issue #2986
-def replaced_local_source_for_incoming_copy(sbox):
-  "update receives copy, but local source is replaced"
-  sbox.build()
-  wc_dir = sbox.wc_dir
-  other_wc_dir = wc_dir + '-other'
-
-  # These paths are for regular content testing.
-  tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
-  rho_url = sbox.repo_url + '/A/D/G/rho'
-  pi_url = sbox.repo_url + '/A/D/G/pi'
-  other_G_path = os.path.join(other_wc_dir, 'A', 'D', 'G')
-  other_rho_path = os.path.join(other_G_path, 'rho')
-
-  # These paths are for properties testing.
-  H_path = os.path.join(wc_dir, 'A', 'D', 'H')
-  chi_path = os.path.join(H_path, 'chi')
-  psi_path = os.path.join(H_path, 'psi')
-  omega_path = os.path.join(H_path, 'omega')
-  psi_url = sbox.repo_url + '/A/D/H/psi'
-  chi_url = sbox.repo_url + '/A/D/H/chi'
-  other_H_path = os.path.join(other_wc_dir, 'A', 'D', 'H')
-  other_psi_path = os.path.join(other_H_path, 'psi')
-  other_omega_path = os.path.join(other_H_path, 'omega')
-
-  # Prepare for properties testing.  If the regular content bug
-  # reappears, we still want to be able to test for the property bug
-  # independently.  That means making two files have the same content,
-  # to avoid encountering the checksum error that might reappear in a
-  # regression.  So here we do that, as well as set the marker
-  # property that we'll check for later.  The reason to set the marker
-  # property in this commit, rather than later, is so that we pass the
-  # conditional in update_editor.c:locate_copyfrom() that compares the
-  # revisions.
-  svntest.main.file_write(chi_path, "Same contents for two files.\n")
-  svntest.main.file_write(psi_path, "Same contents for two files.\n")
-  svntest.actions.run_and_verify_svn(None, None, [], 'propset',
-                                     'chi-prop', 'chi-val', chi_path)
-  svntest.actions.run_and_verify_svn(None, None, [], 'ci',
-                                     '-m', 'identicalize contents', wc_dir);
-  svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
-
-  # Make the duplicate working copy.
-  svntest.main.safe_rmtree(other_wc_dir)
-  shutil.copytree(wc_dir, other_wc_dir)
-
-  try:
-    ## Test properties. ##
-
-    # Commit a replacement from the first working copy.
-    svntest.actions.run_and_verify_svn(None, None, [], 'rm',
-                                       omega_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'cp',
-                                       psi_url, omega_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'ci',
-                                       '-m', 'a propset and a copy', wc_dir);
-
-    # Now schedule a replacement in the second working copy, then update
-    # to receive the replacement from the first working copy, with the
-    # source being the now-scheduled-replace file.
-    svntest.actions.run_and_verify_svn(None, None, [], 'rm',
-                                       other_psi_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'cp',
-                                       chi_url, other_psi_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                       other_wc_dir)
-    exit_code, output, errput = svntest.main.run_svn(None, 'proplist',
-                                                     '-v', other_omega_path)
-    if len(errput):
-      raise svntest.Failure("unexpected error output: %s" % errput)
-    if len(output):
-      raise svntest.Failure("unexpected properties found on '%s': %s"
-                            % (other_omega_path, output))
-
-    ## Test regular content. ##
-
-    # Commit a replacement from the first working copy.
-    svntest.actions.run_and_verify_svn(None, None, [], 'rm',
-                                       tau_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'cp',
-                                       rho_url, tau_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'ci',
-                                       '-m', 'copy rho to tau', wc_dir);
-
-    # Now schedule a replacement in the second working copy, then update
-    # to receive the replacement from the first working copy, with the
-    # source being the now-scheduled-replace file.
-    svntest.actions.run_and_verify_svn(None, None, [], 'rm',
-                                       other_rho_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'cp',
-                                       pi_url, other_rho_path);
-    svntest.actions.run_and_verify_svn(None, None, [], 'up',
-                                       other_wc_dir)
-
-  finally:
-    svntest.main.safe_rmtree(other_wc_dir)
-
-
 def unneeded_parents(sbox):
   "svn cp --parents FILE_URL DIR_URL"
 
@@ -4771,60 +4671,6 @@ def move_added_nodes(sbox):
   expected_status.add({'X/Z' : Item(status='A ', wc_rev='0')})
   svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
 
-def locate_wrong_origin(sbox):
-  "update editor locates invalid file source"
-
-  sbox.build()
-
-  iota = os.path.join(sbox.wc_dir, 'iota')
-  gamma = os.path.join(sbox.wc_dir, 'A/D/gamma')
-
-  D1 = os.path.join(sbox.wc_dir, 'D1')
-  D2 = os.path.join(sbox.wc_dir, 'D2')
-
-  main.run_svn(None, 'mkdir', D1, D2)
-  main.run_svn(None, 'cp', iota, os.path.join(D1, 'iota'))
-  main.run_svn(None, 'cp', gamma, os.path.join(D2, 'iota'))
-
-  main.run_svn(None, 'ci', sbox.wc_dir, '-m', 'Add 2*iotas in r2')
-  main.run_svn(None, 'rm', D1)
-
-  main.run_svn(None, 'ci', sbox.wc_dir, '-m', 'Why?')
-
-  main.run_svn(None, 'cp', D2, D1)
-  main.run_svn(None, 'ci', sbox.wc_dir, '-m', 'Replace one iota')
-
-  # <= 1.6 needs a new checkout here to reproduce, but not since r961831.
-  # so we just perform an update
-  main.run_svn(None, 'up', sbox.wc_dir)
-
-  main.run_svn(None, 'cp', sbox.repo_url + '/D1/iota@2',
-               sbox.repo_url + '/iobeta', '-m', 'Copy iota')
-
-
-  expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 4)
-  expected_status.add({
-    'D1'                : Item(status='  ', wc_rev='4'),
-    'D1/iota'           : Item(status='  ', wc_rev='4'),
-    'D2'                : Item(status='  ', wc_rev='4'),
-    'D2/iota'           : Item(status='  ', wc_rev='4'),
-  })
-  svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status)
-
-  # The next update receives an add_file('/D1/iota', 2), which it then tries
-  # to locate in the local working copy. It finds a '/D1/iota' in the expected
-  # place, with a last-changed revision of 2 and a local revision of HEAD-1
-  #
-  # locate_copyfrom identifies this file as correct because 
-  #     * last-mod <= 2 and
-  #     * 2 <= REV
-  #
-  # Luckily close_file() receives an expected_checksum which makes us fail, or
-  # we would have a completely broken working copy
-
-  # So this gives a Checksum mismatch error.
-  main.run_svn(None, 'up', sbox.wc_dir)
-
 # This test currently fails, but should work ok once we move to single DB
 def copy_over_deleted_dir(sbox):
   "copy a directory over a deleted directory"
@@ -4910,7 +4756,6 @@ test_list = [ None,
               copy_make_parents_repo_repo,
               URI_encoded_repos_to_wc,
               allow_unversioned_parent_for_copy_src,
-              replaced_local_source_for_incoming_copy,
               unneeded_parents,
               double_parents_with_url,
               copy_into_absent_dir,
@@ -4929,9 +4774,6 @@ test_list = [ None,
               changed_data_should_match_checkout,
               XFail(changed_dir_data_should_match_checkout),
               move_added_nodes,
-              # Serf needs a different testcase for this issue
-              XFail(Skip(locate_wrong_origin,
-                         svntest.main.is_ra_type_dav_serf)),
               copy_over_deleted_dir,
              ]
 

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=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/externals_tests.py Mon Sep 20 20:16:13 2010
@@ -1554,7 +1554,7 @@ def update_modify_file_external(sbox):
 
   # Update to modify the file external, this asserts in update_editor.c
   expected_output = svntest.wc.State(wc_dir, {
-      'A/external'      : Item(status='E '),
+      'A/external'      : Item(status='U '),
     })
   expected_disk.tweak('A/mu', 'A/external',
                       contents=expected_disk.desc['A/mu'].contents
@@ -1600,7 +1600,7 @@ test_list = [ None,
               relegate_external,
               wc_repos_file_externals,
               merge_target_with_externals,
-              XFail(update_modify_file_external),
+              update_modify_file_external,
              ]
 
 if __name__ == '__main__':

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=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/input_validation_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/input_validation_tests.py Mon Sep 20 20:16:13 2010
@@ -166,6 +166,13 @@ def invalid_merge_args(sbox):
   run_and_verify_svn_in_wc(sbox, "svn: Path '.*' does not exist",
                            'merge', '-c42', '^/mu', 'nonexistent')
 
+def invalid_wcpath_upgrade(sbox):
+  "non-working copy paths for 'upgrade'"
+  sbox.build(read_only=True)
+  for target in _invalid_wc_path_targets:
+    run_and_verify_svn_in_wc(sbox, "svn:.*is not a local path", 'upgrade',
+                             target, target)
+
 
 ########################################################################
 # Run the tests
@@ -184,6 +191,7 @@ test_list = [ None,
               invalid_import_args,
               invalid_log_targets,
               invalid_merge_args,
+              invalid_wcpath_upgrade,
              ]
 
 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=999098&r1=999097&r2=999098&view=diff
==============================================================================
--- subversion/branches/performance/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/performance/subversion/tests/cmdline/merge_tests.py Mon Sep 20 20:16:13 2010
@@ -14922,32 +14922,6 @@ def merge_automatic_conflict_resolution(
                                        A_COPY_path)
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'revert', '--recursive', wc_dir)
-  # Issue #3514 fails here with an error similar to:
-  #
-  # ..\..\..\subversion\svn\util.c:900: (apr_err=125007)
-  #..\..\..\subversion\libsvn_client\merge.c:9408: (apr_err=125007)
-  #..\..\..\subversion\libsvn_client\merge.c:8054: (apr_err=125007)
-  #..\..\..\subversion\libsvn_client\merge.c:7733: (apr_err=125007)
-  #..\..\..\subversion\libsvn_client\merge.c:4870: (apr_err=125007)
-  #..\..\..\subversion\libsvn_repos\reporter.c:1266: (apr_err=125007)
-  #..\..\..\subversion\libsvn_repos\reporter.c:1197: (apr_err=125007)
-  #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
-  #..\..\..\subversion\libsvn_repos\reporter.c:854: (apr_err=125007)
-  #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
-  #..\..\..\subversion\libsvn_repos\reporter.c:854: (apr_err=125007)
-  #..\..\..\subversion\libsvn_repos\reporter.c:1135: (apr_err=125007)
-  #..\..\..\subversion\libsvn_client\repos_diff.c:861: (apr_err=125007)
-  #..\..\..\subversion\libsvn_client\merge.c:1511: (apr_err=125007)
-  #..\..\..\subversion\libsvn_wc\merge.c:1309: (apr_err=125007)
-  #..\..\..\subversion\libsvn_wc\merge.c:1252: (apr_err=125007)
-  #..\..\..\subversion\libsvn_wc\merge.c:914: (apr_err=125007)
-  #..\..\..\subversion\libsvn_wc\merge.c:794: (apr_err=125007)
-  #..\..\..\subversion\libsvn_wc\merge.c:460: (apr_err=125007)
-  #..\..\..\subversion\libsvn_wc\log.c:921: (apr_err=125007)
-  #..\..\..\subversion\libsvn_wc\log.c:878: (apr_err=125007)
-  #svn: Path 'C:\DOCUME~1\pburba\LOCALS~1\Temp\tempfile.149.tmp' is not a
-  # child of 'C:\SVN\src-trunk\Debug\subversion\tests\cmdline\svn-test-work\
-  # working_copies\merge_tests-137\A_COPY\D\H'
   svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
                                        sbox.repo_url + '/A', None,
                                        expected_output,
@@ -14963,16 +14937,11 @@ def merge_automatic_conflict_resolution(
   svntest.actions.run_and_verify_svn(None, None, [],
                                      'revert', '--recursive', wc_dir)
   # Test --accept base
-  #
-  # Make a working change to A_COPY/D/H/psi.
-  svntest.main.file_write(psi_COPY_path, "WORKING.\n")
   expected_output = wc.State(A_COPY_path, {'D/H/psi' : Item(status='U ')})
   expected_elision_output = wc.State(A_COPY_path, {
     })
-  expected_disk.tweak('D/H/psi', contents="BASE")
+  expected_disk.tweak('D/H/psi', contents="This is the file 'psi'.\n")
   expected_status.tweak('D/H/psi', status='M ')
-  # Issue #3514 fails here with an error similar to the one above for
-  # --accept theirs-full.
   svntest.actions.run_and_verify_merge(A_COPY_path, '2', '3',
                                        sbox.repo_url + '/A', None,
                                        expected_output,
@@ -16101,7 +16070,7 @@ test_list = [ None,
               copy_then_replace_via_merge,
               SkipUnless(record_only_merge,
                          server_has_mergeinfo),
-              XFail(merge_automatic_conflict_resolution),
+              merge_automatic_conflict_resolution,
               skipped_files_get_correct_mergeinfo,
               committed_case_only_move_and_revert,
               merge_into_wc_for_deleted_branch,