You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/08/06 17:04:23 UTC

svn commit: r983010 - in /subversion/branches/issue-2779-dev: ./ subversion/include/ subversion/libsvn_ra_neon/ subversion/libsvn_ra_serf/ subversion/libsvn_wc/ subversion/svnrdump/ subversion/tests/cmdline/ subversion/tests/cmdline/svntest/

Author: cmpilato
Date: Fri Aug  6 15:04:22 2010
New Revision: 983010

URL: http://svn.apache.org/viewvc?rev=983010&view=rev
Log:
Sync branch with trunk changes. (Merged /subversion/trunk:r982797-982983)

Modified:
    subversion/branches/issue-2779-dev/   (props changed)
    subversion/branches/issue-2779-dev/subversion/include/svn_error_codes.h
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/commit.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/fetch.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/lock.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/options.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/ra_neon.h
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/session.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/util.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/blame.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/replay.c
    subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/update.c
    subversion/branches/issue-2779-dev/subversion/libsvn_wc/status.c
    subversion/branches/issue-2779-dev/subversion/libsvn_wc/update_editor.c
    subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.c
    subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.h
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/merge_tests.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/patch_tests.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/schedule_tests.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/actions.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/main.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/sandbox.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/switch_tests.py
    subversion/branches/issue-2779-dev/subversion/tests/cmdline/update_tests.py

Propchange: subversion/branches/issue-2779-dev/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug  6 15:04:22 2010
@@ -34,4 +34,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:965496-982796
+/subversion/trunk:965496-983008

Modified: subversion/branches/issue-2779-dev/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/include/svn_error_codes.h?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/issue-2779-dev/subversion/include/svn_error_codes.h Fri Aug  6 15:04:22 2010
@@ -974,6 +974,11 @@ SVN_ERROR_START
              SVN_ERR_RA_SERF_CATEGORY_START + 2,
              "Initialization of the GSSAPI context failed")
 
+  /** @since New in 1.7. */
+  SVN_ERRDEF(SVN_ERR_RA_SERF_WRAPPED_ERROR,
+             SVN_ERR_RA_SERF_CATEGORY_START + 3,
+             "While handling serf response:")
+
   /* libsvn_auth errors */
 
        /* this error can be used when an auth provider doesn't have

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/commit.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/commit.c Fri Aug  6 15:04:22 2010
@@ -416,8 +416,8 @@ static svn_error_t * do_checkout(commit_
      ### place result into res->wr_url and return it */
 
   /* create/prep the request */
-  request =
-    svn_ra_neon__request_create(cc->ras, "CHECKOUT", vsn_url, pool);
+  SVN_ERR(svn_ra_neon__request_create(&request, cc->ras, "CHECKOUT", vsn_url,
+                                      pool));
 
   /* ### store this into cc to avoid pool growth */
   body = apr_psprintf(request->pool,
@@ -807,9 +807,8 @@ static svn_error_t * commit_delete_entry
                                 APR_HASH_KEY_STRING)))
         apr_hash_set(child_tokens, path, APR_HASH_KEY_STRING, token);
 
-
-      request =
-        svn_ra_neon__request_create(parent->cc->ras, "DELETE", child, pool);
+      SVN_ERR(svn_ra_neon__request_create(&request, parent->cc->ras, "DELETE",
+                                          child, pool));
 
       err = svn_ra_neon__assemble_locktoken_body(&locks_list,
                                                  child_tokens, request->pool);
@@ -1274,7 +1273,8 @@ static svn_error_t * commit_close_file(v
       svn_error_t *err = SVN_NO_ERROR;
 
       /* create/prep the request */
-      request = svn_ra_neon__request_create(cc->ras, "PUT", url, pool);
+      SVN_ERR(svn_ra_neon__request_create(&request, cc->ras, "PUT", url,
+                                          pool));
 
       extra_headers = apr_hash_make(request->pool);
 
@@ -1355,7 +1355,6 @@ static svn_error_t * commit_close_edit(v
                                       cc->disable_merge_response,
                                       pool));
   SVN_ERR(delete_activity(edit_baton, pool));
-  SVN_ERR(svn_ra_neon__maybe_store_auth_info(cc->ras, pool));
 
   if (cc->callback && commit_info->revision != SVN_INVALID_REVNUM)
     SVN_ERR(cc->callback(commit_info, cc->callback_baton, pool));

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/fetch.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/fetch.c Fri Aug  6 15:04:22 2010
@@ -394,7 +394,7 @@ static svn_error_t *custom_get_request(s
       delta_base = NULL;
     }
 
-  request = svn_ra_neon__request_create(ras, "GET", url, pool);
+  SVN_ERR(svn_ra_neon__request_create(&request, ras, "GET", url, pool));
 
   if (delta_base)
     {
@@ -1112,7 +1112,6 @@ svn_error_t *svn_ra_neon__get_latest_rev
                                              ras, ras->root.path,
                                              SVN_INVALID_REVNUM, pool));
     }
-  SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
 
   return NULL;
 }
@@ -2442,8 +2441,7 @@ static svn_error_t * reporter_finish_rep
          _("REPORT response handling failed to complete the editor drive"));
     }
 
-  /* store auth info if we can. */
-  return svn_ra_neon__maybe_store_auth_info(rb->ras, pool);
+  return SVN_NO_ERROR;
 }
 
 static const svn_ra_reporter3_t ra_neon_reporter = {

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/lock.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/lock.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/lock.c Fri Aug  6 15:04:22 2010
@@ -259,7 +259,7 @@ do_lock(svn_lock_t **lock,
                                _("Failed to parse URI '%s'"), url);
     }
 
-  req = svn_ra_neon__request_create(ras, "LOCK", uri.path, pool);
+  SVN_ERR(svn_ra_neon__request_create(&req, ras, "LOCK", uri.path, pool));
   ne_uri_free(&uri);
 
   lrb->pool = pool;
@@ -532,7 +532,7 @@ svn_ra_neon__get_lock_internal(svn_ra_ne
   url = apr_pstrdup(pool, uri.path);
   ne_uri_free(&uri);
 
-  req = svn_ra_neon__request_create(ras, "PROPFIND", url, pool);
+  SVN_ERR(svn_ra_neon__request_create(&req, ras, "PROPFIND", url, pool));
 
   lrb->pool = pool;
   lrb->xml_table = lock_elements;

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/options.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/options.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/options.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/options.c Fri Aug  6 15:04:22 2010
@@ -266,7 +266,8 @@ svn_ra_neon__exchange_capabilities(svn_r
   if (relocation_location)
     *relocation_location = NULL;
 
-  req = svn_ra_neon__request_create(ras, "OPTIONS", ras->url->data, pool);
+  SVN_ERR(svn_ra_neon__request_create(&req, ras, "OPTIONS", ras->url->data,
+                                      pool));
 
   /* ### Use a symbolic name somewhere for this MIME type? */
   ne_add_request_header(req->ne_req, "Content-Type", "text/xml");

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/ra_neon.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/ra_neon.h?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/ra_neon.h (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/ra_neon.h Fri Aug  6 15:04:22 2010
@@ -200,8 +200,9 @@ typedef struct {
  *
  * Register a pool cleanup for any allocated Neon resources.
  */
-svn_ra_neon__request_t *
-svn_ra_neon__request_create(svn_ra_neon__session_t *sess,
+svn_error_t *
+svn_ra_neon__request_create(svn_ra_neon__request_t **request,
+                            svn_ra_neon__session_t *sess,
                             const char *method, const char *url,
                             apr_pool_t *pool);
 

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/session.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/session.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/session.c Fri Aug  6 15:04:22 2010
@@ -1172,7 +1172,6 @@ static svn_error_t *svn_ra_neon__do_get_
       SVN_ERR(svn_ra_neon__search_for_starting_props(&rsrc, &lopped_path,
                                                      ras, ras->url->data,
                                                      pool));
-      SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
 
       if (! ras->uuid)
         {

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/util.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_neon/util.c Fri Aug  6 15:04:22 2010
@@ -354,21 +354,27 @@ path_from_url(const char *url)
   return *p == '\0' ? "/" : p;
 }
 
-svn_ra_neon__request_t *
-svn_ra_neon__request_create(svn_ra_neon__session_t *sess,
+svn_error_t *
+svn_ra_neon__request_create(svn_ra_neon__request_t **request,
+                            svn_ra_neon__session_t *sess,
                             const char *method, const char *url,
                             apr_pool_t *pool)
 {
   apr_pool_t *reqpool = svn_pool_create(pool);
-  svn_ra_neon__request_t *req = apr_pcalloc(reqpool, sizeof(*req));
+  svn_ra_neon__request_t *req;
+  const char *path;
+
+    /* If there is auth credentials in this session, store it if we can. */
+  SVN_ERR(svn_ra_neon__maybe_store_auth_info(sess, pool));
 
   /* We never want to send Neon an absolute URL, since that can cause
      problems with some servers (for example, those that may be accessed
      using different server names from different locations, or those that
      want to rewrite the incoming URL).  If the URL passed in is absolute,
      convert it to a path-absolute relative URL. */
-  const char *path = path_from_url(url);
+  path = path_from_url(url);
 
+  req = apr_pcalloc(reqpool, sizeof(*req));
   req->ne_sess = sess->main_session_busy ? sess->ne_sess2 : sess->ne_sess;
   req->ne_req = ne_request_create(req->ne_sess, method, path);
   req->sess = sess;
@@ -387,7 +393,8 @@ svn_ra_neon__request_create(svn_ra_neon_
                             dav_request_cleanup,
                             apr_pool_cleanup_null);
 
-  return req;
+  *request = req;
+  return SVN_NO_ERROR;
 }
 
 static apr_status_t
@@ -1308,14 +1315,16 @@ svn_ra_neon__parsed_request(svn_ra_neon_
                             apr_pool_t *pool)
 {
   /* create/prep the request */
-  svn_ra_neon__request_t* req = svn_ra_neon__request_create(sess, method, url,
-                                                           pool);
-  svn_error_t *err = parsed_request(req,
-                                    sess, method, url, body, body_file,
-                                    set_parser,
-                                    startelm_cb, cdata_cb, endelm_cb,
-                                    baton, extra_headers, status_code,
-                                    spool_response, pool);
+  svn_ra_neon__request_t* req;
+  svn_error_t *err;
+
+  SVN_ERR(svn_ra_neon__request_create(&req, sess, method, url, pool));
+
+  err = parsed_request(req, sess, method, url, body, body_file,
+                       set_parser, startelm_cb, cdata_cb, endelm_cb,
+                       baton, extra_headers, status_code, spool_response,
+                       pool);
+
   svn_ra_neon__request_destroy(req);
   return err;
 }
@@ -1330,10 +1339,11 @@ svn_ra_neon__simple_request(int *code,
                             const char *body,
                             int okay_1, int okay_2, apr_pool_t *pool)
 {
-  svn_ra_neon__request_t *req =
-    svn_ra_neon__request_create(ras, method, url, pool);
+  svn_ra_neon__request_t *req;
   svn_error_t *err;
 
+  SVN_ERR(svn_ra_neon__request_create(&req, ras, method, url, pool));
+
   /* we don't need the status parser: it's attached to the request
      and detected errors will be returned there... */
   (void) multistatus_parser_create(req);

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/blame.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/blame.c Fri Aug  6 15:04:22 2010
@@ -330,7 +330,7 @@ end_blame(svn_ra_serf__xml_parser_t *par
   else if (state == TXDELTA &&
            strcmp(name.name, "txdelta") == 0)
     {
-      svn_stream_close(info->stream);
+      SVN_ERR(svn_stream_close(info->stream));
 
       svn_ra_serf__xml_pop_state(parser);
     }

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/replay.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/replay.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/replay.c Fri Aug  6 15:04:22 2010
@@ -720,6 +720,7 @@ svn_ra_serf__replay_range(svn_ra_session
   while (active_reports || rev <= end_revision)
     {
       apr_status_t status;
+      svn_error_t *err;
       svn_ra_serf__list_t *done_list;
       svn_ra_serf__list_t *done_reports = NULL;
       replay_context_t *replay_ctx;
@@ -804,8 +805,12 @@ svn_ra_serf__replay_range(svn_ra_session
       status = serf_context_run(session->context, session->timeout,
                                 pool);
 
+      err = session->pending_error;
+      session->pending_error = NULL;
+
       if (APR_STATUS_IS_TIMEUP(status))
         {
+          svn_error_clear(err);
           return svn_error_create(SVN_ERR_RA_DAV_CONN_TIMEOUT,
                                   NULL,
                                   _("Connection timed out"));
@@ -824,10 +829,9 @@ svn_ra_serf__replay_range(svn_ra_session
           active_reports--;
         }
 
+      SVN_ERR(err);
       if (status)
         {
-          SVN_ERR(session->pending_error);
-
           return svn_error_wrap_apr(status,
                                     _("Error retrieving replay REPORT (%d)"),
                                     status);

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/update.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/update.c Fri Aug  6 15:04:22 2010
@@ -741,6 +741,11 @@ error_fetch(serf_request_t *request,
   serf_request_set_handler(request,
                            svn_ra_serf__response_discard_handler, NULL);
 
+  /* Some errors would be handled by serf; make sure they really make
+     the update fail by wrapping it in a different error. */
+  if (!SERF_BUCKET_READ_ERROR(err->apr_err))
+    return svn_error_create(SVN_ERR_RA_SERF_WRAPPED_ERROR, err, NULL);
+
   return err;
 }
 
@@ -1066,7 +1071,8 @@ handle_stream(serf_request_t *request,
 
           written_len = len;
 
-          svn_stream_write(fetch_ctx->target_stream, data, &written_len);
+          SVN_ERR(svn_stream_write(fetch_ctx->target_stream, data,
+                                   &written_len));
         }
 
       if (APR_STATUS_IS_EOF(status))
@@ -1273,9 +1279,9 @@ start_report(svn_ra_serf__xml_parser_t *
              _("Missing revision attr in target-revision element"));
         }
 
-      ctx->update_editor->set_target_revision(ctx->update_baton,
-                                              SVN_STR_TO_REV(rev),
-                                              ctx->sess->pool);
+      SVN_ERR(ctx->update_editor->set_target_revision(ctx->update_baton,
+                                                      SVN_STR_TO_REV(rev),
+                                                      ctx->sess->pool));
     }
   else if (state == NONE && strcmp(name.name, "open-directory") == 0)
     {
@@ -1511,9 +1517,9 @@ start_report(svn_ra_serf__xml_parser_t *
 
       SVN_ERR(open_dir(info->dir));
 
-      ctx->update_editor->absent_directory(file_name,
-                                           info->dir->dir_baton,
-                                           info->dir->pool);
+      SVN_ERR(ctx->update_editor->absent_directory(file_name,
+                                                   info->dir->dir_baton,
+                                                   info->dir->pool));
     }
   else if ((state == OPEN_DIR || state == ADD_DIR) &&
            strcmp(name.name, "absent-file") == 0)
@@ -1534,9 +1540,9 @@ start_report(svn_ra_serf__xml_parser_t *
 
       SVN_ERR(open_dir(info->dir));
 
-      ctx->update_editor->absent_file(file_name,
-                                      info->dir->dir_baton,
-                                      info->dir->pool);
+      SVN_ERR(ctx->update_editor->absent_file(file_name,
+                                              info->dir->dir_baton,
+                                              info->dir->pool));
     }
   else if (state == OPEN_DIR || state == ADD_DIR)
     {
@@ -2306,17 +2312,23 @@ finish_report(void *report_baton,
 
   while (!report->done || report->active_fetches || report->active_propfinds)
     {
+      svn_error_t *err;
       status = serf_context_run(sess->context, sess->timeout, pool);
+
+      err = sess->pending_error;
+      sess->pending_error = SVN_NO_ERROR;
+
       if (APR_STATUS_IS_TIMEUP(status))
         {
+          svn_error_clear(err);
           return svn_error_create(SVN_ERR_RA_DAV_CONN_TIMEOUT,
                                   NULL,
                                   _("Connection timed out"));
         }
+
+      SVN_ERR(err);
       if (status)
         {
-          SVN_ERR(sess->pending_error);
-
           return svn_error_wrap_apr(status, _("Error retrieving REPORT (%d)"),
                                     status);
         }

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_wc/status.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_wc/status.c Fri Aug  6 15:04:22 2010
@@ -1280,7 +1280,6 @@ get_dir_status(const struct walk_status_
           /* Versioned node */
           svn_wc__db_status_t node_status;
           svn_wc__db_kind_t node_kind;
-          svn_boolean_t hidden;
 
           SVN_ERR(svn_wc__db_read_info(&node_status, &node_kind, NULL, NULL,
                                    NULL, NULL, NULL, NULL, NULL, NULL, NULL,

Modified: subversion/branches/issue-2779-dev/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/libsvn_wc/update_editor.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/issue-2779-dev/subversion/libsvn_wc/update_editor.c Fri Aug  6 15:04:22 2010
@@ -2143,12 +2143,19 @@ do_entry_deletion(struct edit_baton *eb,
 
   if (tree_conflict != NULL)
     {
-      /* When we raise a tree conflict on a directory, we want to avoid
+      /* When we raise a tree conflict on a node, we want to avoid
        * making any changes inside it. (Will an update ever try to make
-       * further changes to or inside a directory it's just deleted?) */
-      SVN_ERR(svn_wc__loggy_add_tree_conflict(&work_item, eb->db, dir_abspath,
-                                              tree_conflict, pool));
-      SVN_ERR(svn_wc__db_wq_add(eb->db, dir_abspath, work_item, pool));
+       * further changes to or inside a directory it's just deleted?)
+       *
+       * ### BH: Only if a new node is added in it's place.
+       *          See svn_delta.h for further details. */
+
+      /* ### Note that we still add this on the parent of a node, so it is
+         ### safe to add it now, while we remove the node later */
+      SVN_ERR(svn_wc__db_op_set_tree_conflict(eb->db,
+                                              tree_conflict->local_abspath,
+                                              tree_conflict,
+                                              pool));
 
       SVN_ERR(remember_skipped_tree(eb, local_abspath));
 
@@ -2165,13 +2172,6 @@ do_entry_deletion(struct edit_baton *eb,
            * we must schedule the existing content for re-addition as a copy
            * of what it was, but with its local modifications preserved. */
 
-          /* Run the log in the parent dir, to record the tree conflict.
-           * Do this before schedule_existing_item_for_re_add(), in case
-           * that needs to modify the same entries. */
-          SVN_ERR(svn_wc__wq_run(eb->db, dir_abspath,
-                                 eb->cancel_func, eb->cancel_baton,
-                                 pool));
-
           SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, TRUE,
                                                pool));
 
@@ -2189,19 +2189,17 @@ do_entry_deletion(struct edit_baton *eb,
       else if (tree_conflict->reason == svn_wc_conflict_reason_replaced)
         {
           /* The item was locally replaced with something else. We should
-           * keep the existing item schedule-replace, but we also need to
-           * update the BASE rev of the item to the revision we are updating
-           * to. Otherwise, the replace cannot be committed because the item
-           * is considered out-of-date, and it cannot be updated either because
-           * we're here to do just that. */
-
-          /* Run the log in the parent dir, to record the tree conflict.
-           * Do this before schedule_existing_item_for_re_add(), in case
-           * that needs to modify the same entries. */
-          SVN_ERR(svn_wc__wq_run(eb->db, dir_abspath,
-                                 eb->cancel_func, eb->cancel_baton,
-                                 pool));
+           * remove the BASE node below the new working node, which turns
+           * the replacement in an addition.
+           */
+
+          /* ### This does something similar, but not exactly what is
+             ### required: Copy working to working and then delete
+             ### BASE_NODE. Not exactly right, but not
+             ### completely wrong as the result is the same.
 
+             ### It only misses the explicit target check for adding
+             ### back a not-present node. */
           SVN_ERR(svn_wc__db_temp_op_make_copy(eb->db, local_abspath, TRUE,
                                                pool));
 

Modified: subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.c?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.c Fri Aug  6 15:04:22 2010
@@ -33,6 +33,12 @@
 
 #include "load_editor.h"
 
+#ifdef SVN_DEBUG
+#define LDR_DBG(x) SVN_DBG(x)
+#else
+#define LDR_DBG(x) while(0)
+#endif
+
 static svn_error_t *
 commit_callback(const svn_commit_info_t *commit_info,
                 void *baton,
@@ -56,7 +62,7 @@ new_revision_record(void **revision_bato
 
   rb = apr_pcalloc(pool, sizeof(*rb));
   pb = parse_baton;
-  pb->pool = svn_pool_create(pool);
+  rb->pool = svn_pool_create(pool);
   rb->pb = pb;
 
   for (hi = apr_hash_first(pool, headers); hi; hi = apr_hash_next(hi))
@@ -72,12 +78,12 @@ new_revision_record(void **revision_bato
       if (strcmp(hname, SVN_REPOS_DUMPFILE_REVISION_NUMBER) == 0)
         rb->rev = atoi(hval);
     }
+
   /* Set the commit_editor/ commit_edit_baton to NULL and wait for
      them to be created in new_node_record */
-  
   rb->pb->commit_editor = NULL;
   rb->pb->commit_edit_baton = NULL;
-  rb->revprop_table = apr_hash_make(pb->pool);
+  rb->revprop_table = apr_hash_make(rb->pool);
 
   *revision_baton = rb;
   return SVN_NO_ERROR;
@@ -100,17 +106,19 @@ new_node_record(void **node_baton,
                 void *revision_baton,
                 apr_pool_t *pool)
 {
+  const struct svn_delta_editor_t *commit_editor;
   struct node_baton *nb;
   struct revision_baton *rb;
+  struct directory_baton *child_db;
   apr_hash_index_t *hi;
-  void *file_baton;
   void *child_baton;
-  const struct svn_delta_editor_t *commit_editor;
   void *commit_edit_baton;
-  void *root_baton;
+  char *ancestor_path;
+  apr_array_header_t *residual_path;
+  int i;
 
   rb = revision_baton;
-  nb = apr_pcalloc(rb->pb->pool, sizeof(*nb));
+  nb = apr_pcalloc(rb->pool, sizeof(*nb));
   nb->rb = rb;
 
   nb->copyfrom_path = NULL;
@@ -120,23 +128,41 @@ new_node_record(void **node_baton,
   commit_edit_baton = rb->pb->commit_edit_baton;
 
   /* If the creation of commit_editor is pending, create it now and
-     open_root on it */
+     open_root on it; also create a top-level directory baton. */
   if (!commit_editor) {
+
+      if (rb->revprop_table)
+        {
+          /* Clear revprops that we aren't allowed to set with the commit */
+          apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_AUTHOR,
+                       APR_HASH_KEY_STRING, NULL);
+          apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_DATE,
+                       APR_HASH_KEY_STRING, NULL);
+        }
+
       SVN_ERR(svn_ra_get_commit_editor3(rb->pb->session, &commit_editor,
                                         &commit_edit_baton, rb->revprop_table,
                                         commit_callback, NULL, NULL, FALSE,
-                                        rb->pb->pool));
+                                        rb->pool));
 
       rb->pb->commit_editor = commit_editor;
       rb->pb->commit_edit_baton = commit_edit_baton;
 
       SVN_ERR(commit_editor->open_root(commit_edit_baton, rb->rev - 1,
-                                       rb->pb->pool, &root_baton));
-      rb->dir_baton = root_baton;
+                                       rb->pool, &child_baton));
+
+      LDR_DBG(("Opened root %p\n", child_baton));
 
+      /* child_db corresponds to the root directory baton here */
+      child_db = apr_pcalloc(rb->pool, sizeof(*child_db));
+      child_db->baton = child_baton;
+      child_db->depth = 0;
+      child_db->parent = NULL;
+      child_db->relpath = svn_relpath_canonicalize("/", rb->pool);
+      rb->db = child_db;
   }
 
-  for (hi = apr_hash_first(rb->pb->pool, headers); hi; hi = apr_hash_next(hi))
+  for (hi = apr_hash_first(rb->pool, headers); hi; hi = apr_hash_next(hi))
     {
       const void *key;
       void *val;
@@ -149,7 +175,7 @@ new_node_record(void **node_baton,
       /* Parse the different kinds of headers we can encounter and
          stuff them into the node_baton for writing later */
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_PATH) == 0)
-        nb->path = apr_pstrdup(rb->pb->pool, hval);
+        nb->path = apr_pstrdup(rb->pool, hval);
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_KIND) == 0)
         nb->kind = strcmp(hval, "file") == 0 ? svn_node_file : svn_node_dir;
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_ACTION) == 0)
@@ -166,37 +192,120 @@ new_node_record(void **node_baton,
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV) == 0)
         nb->copyfrom_rev = atoi(hval);
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH) == 0)
+          nb->copyfrom_path =
+            svn_path_url_add_component2(rb->pb->root_url,
+                                        apr_pstrdup(rb->pool, hval),
+                                        rb->pool);
+    }
+
+  if (svn_path_compare_paths(svn_relpath_dirname(nb->path, pool),
+                             rb->db->baton) != 0)
+    {
+      /* Before attempting to handle the action, call open_directory
+         for all the path components and set the directory baton
+         accordingly */
+      ancestor_path =
+        svn_relpath_get_longest_ancestor(nb->path,
+                                         rb->db->relpath, pool);
+      residual_path =
+        svn_path_decompose(svn_relpath_skip_ancestor(nb->path,
+                                                     ancestor_path),
+                           rb->pool);
+
+      /* First close all as many directories as there are after
+         skip_ancestor, and then open fresh directories */
+      for (i = 0; i < residual_path->nelts; i ++)
+        {
+          /* Don't worry about destroying the actual rb->db object,
+             since the pool we're using has the lifetime of one
+             revision anyway */
+          LDR_DBG(("Closing dir %p\n", rb->db->baton));
+          SVN_ERR(commit_editor->close_directory(rb->db->baton, rb->pool));
+          rb->db = rb->db->parent;
+        }
+        
+      for (i = 0; i < residual_path->nelts; i ++)
         {
-          /* Due to a historical detail in the commit editor, it
-             demands that the copyfrom_path includes the URI to the
-             repository; to implement this, the edit_baton structure
-             from commit.c had to be imported as a commit_edit_baton
-             structure in load_editor.h */
-          nb->copyfrom_path = svn_path_url_add_component2(rb->pb->root_url,
-                                           apr_pstrdup(rb->pb->pool, hval),
-                                           rb->pb->pool);
+          SVN_ERR(commit_editor->open_directory(residual_path->elts + i,
+                                                rb->db->baton,
+                                                rb->rev - 1,
+                                                rb->pool, &child_baton));
+          LDR_DBG(("Opened dir %p\n", child_baton));
+          child_db = apr_pcalloc(rb->pool, sizeof(*child_db));
+          child_db->baton = child_baton;
+          child_db->depth = rb->db->depth + 1;
+          child_db->relpath = svn_relpath_join(rb->db->relpath,
+                                               residual_path->elts + i,
+                                               rb->pool);
+          rb->db = child_db;
         }
+
     }
 
   switch (nb->action)
     {
     case svn_node_action_add:
-      if (nb->kind == svn_node_file)
+      switch (nb->kind)
         {
-          SVN_ERR(commit_editor->add_file(nb->path, nb->rb->dir_baton,
-                                          nb->copyfrom_path, nb->copyfrom_rev,
-                                          rb->pb->pool, &file_baton));
-          nb->file_baton = file_baton;
+        case svn_node_file:
+          SVN_ERR(commit_editor->add_file(nb->path, rb->db->baton,
+                                          nb->copyfrom_path,
+                                          nb->copyfrom_rev,
+                                          rb->pool, &(nb->file_baton)));
+          LDR_DBG(("Adding file %s to dir %p as %p\n", nb->path, rb->db->baton, nb->file_baton));
+          break;
+        case svn_node_dir:
+          SVN_ERR(commit_editor->add_directory(nb->path, rb->db->baton,
+                                               nb->copyfrom_path,
+                                               nb->copyfrom_rev,
+                                               rb->pool, &child_baton));
+          LDR_DBG(("Adding dir %s to dir %p as %p\n", nb->path, rb->db->baton, child_baton));
+          child_db = apr_pcalloc(rb->pool, sizeof(*child_db));
+          child_db->baton = child_baton;
+          child_db->depth = rb->db->depth + 1;
+          child_db->relpath = svn_relpath_join(rb->db->relpath,
+                                               residual_path->elts + i,
+                                               rb->pool);
+          rb->db = child_db;
+          break;
+        default:
+          break;
         }
-      else if(nb->kind == svn_node_dir)
+      break;
+    case svn_node_action_change:
+      switch (nb->kind)
         {
-          SVN_ERR(commit_editor->add_directory(nb->path, nb->rb->dir_baton,
-                                               nb->copyfrom_path, nb->copyfrom_rev,
-                                               rb->pb->pool, &child_baton));
-          nb->rb->dir_baton = child_baton;
+        case svn_node_file:
+          /* open_file to set the file_baton so we can apply props,
+             txdelta to it */
+          SVN_ERR(commit_editor->open_file(nb->path, rb->db->baton,
+                                           SVN_INVALID_REVNUM, rb->pool,
+                                           &(nb->file_baton)));
+          break;
+        default:
+          /* The directory baton has already been set */
+          break;
         }
       break;
-    default:
+    case svn_node_action_delete:
+      switch (nb->kind)
+        {
+        case svn_node_file:
+          LDR_DBG(("Deleting file %s in %p\n", nb->path, rb->db->baton));
+          SVN_ERR(commit_editor->delete_entry(nb->path, rb->rev,
+                                              rb->db->baton, rb->pool));
+          break;
+        case svn_node_dir:
+          LDR_DBG(("Deleting dir %s in %p\n", nb->path, rb->db->baton));
+          SVN_ERR(commit_editor->delete_entry(nb->path, rb->rev,
+                                              rb->db->baton, rb->pool));
+          break;
+        default:
+          break;
+        }
+      break;
+    case svn_node_action_replace:
+      /* Absent in dumpstream; represented as a delete + add */
       break;
     }
 
@@ -213,22 +322,20 @@ set_revision_property(void *baton,
   rb = baton;
 
   if (rb->rev > 0)
-    {
-      apr_hash_set(rb->revprop_table, apr_pstrdup(rb->pb->pool, name),
-                   APR_HASH_KEY_STRING, svn_string_dup(value, rb->pb->pool));
-    }
+    apr_hash_set(rb->revprop_table, apr_pstrdup(rb->pool, name),
+                 APR_HASH_KEY_STRING, svn_string_dup(value, rb->pool));
   else
     /* Special handling for revision 0; this is safe because the
        commit_editor hasn't been created yet. */
     svn_ra_change_rev_prop(rb->pb->session, rb->rev, name, value,
-                           rb->pb->pool);
+                           rb->pool);
 
   /* Remember any datestamp/ author that passes through (see comment
      in close_revision). */
   if (!strcmp(name, SVN_PROP_REVISION_DATE))
-    rb->datestamp = svn_string_dup(value, rb->pb->pool);
+    rb->datestamp = svn_string_dup(value, rb->pool);
   if (!strcmp(name, SVN_PROP_REVISION_AUTHOR))
-    rb->author = svn_string_dup(value, rb->pb->pool);
+    rb->author = svn_string_dup(value, rb->pool);
 
   return SVN_NO_ERROR;
 }
@@ -243,13 +350,14 @@ set_node_property(void *baton,
   apr_pool_t *pool;
   nb = baton;
   commit_editor = nb->rb->pb->commit_editor;
-  pool = nb->rb->pb->pool;
+  pool = nb->rb->pool;
 
+  LDR_DBG(("Applying properties on %p\n", nb->file_baton));
   if (nb->kind == svn_node_file)
     SVN_ERR(commit_editor->change_file_prop(nb->file_baton, name,
                                             value, pool));
   else
-    SVN_ERR(commit_editor->change_dir_prop(nb->rb->dir_baton, name,
+    SVN_ERR(commit_editor->change_dir_prop(nb->rb->db->baton, name,
                                            value, pool));
 
   return SVN_NO_ERROR;
@@ -264,13 +372,13 @@ delete_node_property(void *baton,
   apr_pool_t *pool;
   nb = baton;
   commit_editor = nb->rb->pb->commit_editor;
-  pool = nb->rb->pb->pool;
+  pool = nb->rb->pool;
 
   if (nb->kind == svn_node_file)
     SVN_ERR(commit_editor->change_file_prop(nb->file_baton, name,
                                             NULL, pool));
   else
-    SVN_ERR(commit_editor->change_dir_prop(nb->rb->dir_baton, name,
+    SVN_ERR(commit_editor->change_dir_prop(nb->rb->db->baton, name,
                                            NULL, pool));
 
   return SVN_NO_ERROR;
@@ -279,6 +387,7 @@ delete_node_property(void *baton,
 static svn_error_t *
 remove_node_props(void *baton)
 {
+  /* ### Not implemented */
   return SVN_NO_ERROR;
 }
 
@@ -298,11 +407,15 @@ apply_textdelta(svn_txdelta_window_handl
   struct node_baton *nb;
   const struct svn_delta_editor_t *commit_editor;
   apr_pool_t *pool;
+
   nb = node_baton;
   commit_editor = nb->rb->pb->commit_editor;
-  pool = nb->rb->pb->pool;
-  return commit_editor->apply_textdelta(nb->file_baton, NULL, pool,
-                                        handler, handler_baton);
+  pool = nb->rb->pool;
+  SVN_ERR(commit_editor->apply_textdelta(nb->file_baton, NULL /* base_checksum */, 
+                                         pool, handler, handler_baton));
+  LDR_DBG(("Applying textdelta to %p\n", nb->file_baton));
+
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *
@@ -310,16 +423,18 @@ close_node(void *baton)
 {
   struct node_baton *nb;
   const struct svn_delta_editor_t *commit_editor;
-  apr_pool_t * pool;
+
   nb = baton;
-  pool = nb->rb->pb->pool;
   commit_editor = nb->rb->pb->commit_editor;
+
   if (nb->kind == svn_node_file)
-    SVN_ERR(commit_editor->close_file(nb->file_baton, NULL,
-                                      pool));
-  else if (nb->kind == svn_node_dir)
-    SVN_ERR(commit_editor->close_directory(nb->rb->dir_baton,
-                                           pool));
+    {
+      SVN_ERR(commit_editor->close_file(nb->file_baton, NULL, nb->rb->pool));
+      LDR_DBG(("Closing file %p\n", nb->file_baton));
+    }
+
+  /* The svn_node_dir case is handled in close_revision */
+
   return SVN_NO_ERROR;
 }
 
@@ -336,20 +451,30 @@ close_revision(void *baton)
 
   /* r0 doesn't have a corresponding commit_editor; we fake it */
   if (rb->rev == 0)
-    SVN_ERR(svn_cmdline_printf(rb->pb->pool, "* Loaded revision 0\n"));
-  else
-    SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pb->pool));
+    SVN_ERR(svn_cmdline_printf(rb->pool, "* Loaded revision 0\n"));
+  else {
+    /* Close all pending open directories, and then close the edit
+       session itself */
+    while (rb->db && rb->db->parent)
+      {
+        LDR_DBG(("Closing dir %p\n", rb->db->baton));
+        SVN_ERR(commit_editor->close_directory(rb->db->baton, rb->pool));
+        rb->db = rb->db->parent;
+      }
+    LDR_DBG(("Closing edit on %p\n", commit_edit_baton));
+    SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pool));
+  }
 
   /* svn_fs_commit_txn rewrites the datestamp/ author property-
      rewrite it by hand after closing the commit_editor. */
   SVN_ERR(svn_ra_change_rev_prop(rb->pb->session, rb->rev,
                                  SVN_PROP_REVISION_DATE,
-                                 rb->datestamp, rb->pb->pool));
+                                 rb->datestamp, rb->pool));
   SVN_ERR(svn_ra_change_rev_prop(rb->pb->session, rb->rev,
                                  SVN_PROP_REVISION_AUTHOR,
-                                 rb->author, rb->pb->pool));
+                                 rb->author, rb->pool));
 
-  svn_pool_destroy(rb->pb->pool);
+  svn_pool_destroy(rb->pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.h?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.h (original)
+++ subversion/branches/issue-2779-dev/subversion/svnrdump/load_editor.h Fri Aug  6 15:04:22 2010
@@ -38,7 +38,18 @@ struct parse_baton
   svn_ra_session_t *session;
   const char *uuid;
   const char *root_url;
-  apr_pool_t *pool;
+};
+
+/**
+ * Use to wrap the dir_context_t in commit.c so we can keep track of
+ * depth, relpath and parent for open_directory and close_directory.
+ */
+struct directory_baton
+{
+  void *baton;
+  const char *relpath;
+  int depth;
+  struct directory_baton *parent;
 };
 
 /**
@@ -71,8 +82,8 @@ struct revision_baton
   const svn_string_t *author;
 
   struct parse_baton *pb;
+  struct directory_baton *db;
   apr_pool_t *pool;
-  void *dir_baton;                    /* Keep track of dirs */
 };
 
 /**

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/merge_tests.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/merge_tests.py Fri Aug  6 15:04:22 2010
@@ -6788,6 +6788,8 @@ def merge_loses_mergeinfo(sbox):
     '' : Item(status=' U'),
     })
   expected_disk = wc.State('', {'J': Item()})
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected_disk.remove('J')
   expected_status = wc.State(A_C_wc_dir,
                              { ''    : Item(wc_rev=4, status=' M'),
                                'J'   : Item(wc_rev=4, status='D ')
@@ -6809,6 +6811,8 @@ def merge_loses_mergeinfo(sbox):
     'J'       : Item(),
     ''        : Item(props={SVN_PROP_MERGEINFO : '/A/B:3'}),
     })
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected_disk.remove('J')
   expected_status = wc.State(A_C_wc_dir,
                              { ''    : Item(wc_rev=4, status=' M'),
                                'K'   : Item(status='A ',
@@ -13775,6 +13779,8 @@ def no_self_referential_filtering_on_add
     'D/H/psi'   : Item("New content"),
     'D/H/omega' : Item("New content"),
     })
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected_A_COPY_2_disk.remove('C')
   expected_A_COPY_2_skip = wc.State(A_COPY_2_path, { })
   svntest.actions.run_and_verify_merge(A_COPY_2_path, None, None,
                                        sbox.repo_url + '/A', None,

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/patch_tests.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/patch_tests.py Fri Aug  6 15:04:22 2010
@@ -998,6 +998,9 @@ def patch_add_new_dir(sbox):
   })
   expected_disk.remove('A/B/E/alpha')
   expected_disk.remove('A/B/E/beta')
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected_disk.remove('A/B/E')
+    expected_disk.remove('A/C')
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.add({

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/schedule_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/schedule_tests.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/schedule_tests.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/schedule_tests.py Fri Aug  6 15:04:22 2010
@@ -575,8 +575,7 @@ def add_recursive_already_versioned(sbox
 
   wc_dir = sbox.wc_dir
 
-  if svntest.actions.make_repo_and_wc(sbox):
-    return 1
+  svntest.actions.make_repo_and_wc(sbox)
 
   # Create some files, then schedule them for addition
   delta_path = sbox.ospath('delta')

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/svnrdump_tests.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/svnrdump_tests.py Fri Aug  6 15:04:22 2010
@@ -175,10 +175,8 @@ test_list = [ None,
               basic_dump,
               revision_0_dump,
               revision_0_load,
-              XFail(XFail(skeleton_load, svntest.main.is_ra_type_dav),
-                    svntest.main.is_ra_type_svn),
-              Wimp("Need to interpret response 501", copy_and_modify_load,
-                   svntest.main.is_ra_type_dav),
+              skeleton_load,
+              copy_and_modify_load,
               Wimp("Need to fix headers in RA layer", copy_and_modify_dump),
              ]
 

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/actions.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/actions.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/actions.py Fri Aug  6 15:04:22 2010
@@ -44,7 +44,7 @@ def no_relocate_validation():
 def do_relocate_validation():
   os.environ['SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_RELOCATE_VALIDATION'] = 'no'
 
-def setup_pristine_repository():
+def setup_pristine_greek_repository():
   """Create the pristine repository and 'svn import' the greek tree"""
 
   # these directories don't exist out of the box, so we may have to create them
@@ -55,8 +55,8 @@ def setup_pristine_repository():
     os.makedirs(main.general_repo_dir) # this also creates all the intermediate dirs
 
   # If there's no pristine repos, create one.
-  if not os.path.exists(main.pristine_dir):
-    main.create_repos(main.pristine_dir)
+  if not os.path.exists(main.pristine_greek_repos_dir):
+    main.create_repos(main.pristine_greek_repos_dir)
 
     # if this is dav, gives us access rights to import the greek tree.
     if main.is_ra_type_dav():
@@ -72,7 +72,7 @@ def setup_pristine_repository():
     exit_code, output, errput = main.run_svn(None, 'import', '-m',
                                              'Log message for revision 1.',
                                              main.greek_dump_dir,
-                                             main.pristine_url)
+                                             main.pristine_greek_repos_url)
 
     # check for any errors from the import
     if len(errput):
@@ -105,9 +105,9 @@ def setup_pristine_repository():
 
     # Finally, disallow any changes to the "pristine" repos.
     error_msg = "Don't modify the pristine repository"
-    create_failing_hook(main.pristine_dir, 'start-commit', error_msg)
-    create_failing_hook(main.pristine_dir, 'pre-lock', error_msg)
-    create_failing_hook(main.pristine_dir, 'pre-revprop-change', error_msg)
+    create_failing_hook(main.pristine_greek_repos_dir, 'start-commit', error_msg)
+    create_failing_hook(main.pristine_greek_repos_dir, 'pre-lock', error_msg)
+    create_failing_hook(main.pristine_greek_repos_dir, 'pre-revprop-change', error_msg)
 
 
 ######################################################################
@@ -116,7 +116,7 @@ def guarantee_empty_repository(path):
   """Guarantee that a local svn repository exists at PATH, containing
   nothing."""
 
-  if path == main.pristine_dir:
+  if path == main.pristine_greek_repos_dir:
     print("ERROR:  attempt to overwrite the pristine repos!  Aborting.")
     sys.exit(1)
 
@@ -127,19 +127,19 @@ def guarantee_empty_repository(path):
 # Used by every test, so that they can run independently of  one
 # another. Every time this routine is called, it recursively copies
 # the `pristine repos' to a new location.
-# Note: make sure setup_pristine_repository was called once before
+# Note: make sure setup_pristine_greek_repository was called once before
 # using this function.
 def guarantee_greek_repository(path):
   """Guarantee that a local svn repository exists at PATH, containing
   nothing but the greek-tree at revision 1."""
 
-  if path == main.pristine_dir:
+  if path == main.pristine_greek_repos_dir:
     print("ERROR:  attempt to overwrite the pristine repos!  Aborting.")
     sys.exit(1)
 
   # copy the pristine repository to PATH.
   main.safe_rmtree(path)
-  if main.copy_repos(main.pristine_dir, path, 1):
+  if main.copy_repos(main.pristine_greek_repos_dir, path, 1):
     print("ERROR:  copying repository failed.")
     sys.exit(1)
 
@@ -2312,7 +2312,8 @@ def deep_trees_run_tests_scheme_for_upda
 
   j = os.path.join
 
-  sbox.build()
+  if not sbox.is_built():
+    sbox.build()
   wc_dir = sbox.wc_dir
 
 
@@ -2553,7 +2554,8 @@ def deep_trees_run_tests_scheme_for_swit
 
   j = os.path.join
 
-  sbox.build()
+  if not sbox.is_built():
+    sbox.build()
   wc_dir = sbox.wc_dir
 
 

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/main.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/main.py Fri Aug  6 15:04:22 2010
@@ -161,7 +161,7 @@ entriesdump_binary = os.path.abspath('en
 
 # Location to the pristine repository, will be calculated from test_area_url
 # when we know what the user specified for --url.
-pristine_url = None
+pristine_greek_repos_url = None
 
 # Global variable to track all of our options
 options = None
@@ -187,7 +187,7 @@ general_wc_dir = os.path.join(work_dir, 
 temp_dir = os.path.join(work_dir, 'local_tmp')
 
 # (derivatives of the tmp dir.)
-pristine_dir = os.path.join(temp_dir, "repos")
+pristine_greek_repos_dir = os.path.join(temp_dir, "repos")
 greek_dump_dir = os.path.join(temp_dir, "greekfiles")
 default_config_dir = os.path.abspath(os.path.join(temp_dir, "config"))
 
@@ -1419,7 +1419,7 @@ def run_tests(test_list, serial_only = F
         appropriate exit code.
   """
 
-  global pristine_url
+  global pristine_greek_repos_url
   global svn_binary
   global svnadmin_binary
   global svnlook_binary
@@ -1483,8 +1483,8 @@ def run_tests(test_list, serial_only = F
       parser.error("invalid test number, range of numbers, " +
                    "or function '%s'\n" % arg)
 
-  # Calculate pristine_url from test_area_url.
-  pristine_url = options.test_area_url + '/' + pathname2url(pristine_dir)
+  # Calculate pristine_greek_repos_url from test_area_url.
+  pristine_greek_repos_url = options.test_area_url + '/' + pathname2url(pristine_greek_repos_dir)
 
   if options.use_jsvn:
     if options.svn_bin is None:
@@ -1537,7 +1537,7 @@ def run_tests(test_list, serial_only = F
     create_config_dir(default_config_dir)
 
     # Setup the pristine repository
-    svntest.actions.setup_pristine_repository()
+    svntest.actions.setup_pristine_greek_repository()
 
   # Run the tests.
   exit_code = _internal_run_tests(test_list, testnums, options.parallel)

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/sandbox.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/sandbox.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/sandbox.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/sandbox.py Fri Aug  6 15:04:22 2010
@@ -51,8 +51,8 @@ class Sandbox:
       self.repo_url = (svntest.main.options.test_area_url + '/'
                        + svntest.main.pathname2url(self.repo_dir))
     else:
-      self.repo_dir = svntest.main.pristine_dir
-      self.repo_url = svntest.main.pristine_url
+      self.repo_dir = svntest.main.pristine_greek_repos_dir
+      self.repo_url = svntest.main.pristine_greek_repos_url
 
     ### TODO: Move this into to the build() method
     # For dav tests we need a single authz file which must be present,
@@ -96,11 +96,8 @@ class Sandbox:
        and check out a WC from it (unless CREATE_WC is false). Change the
        sandbox's name to NAME. See actions.make_repo_and_wc() for details."""
     self._set_name(name, read_only)
-    if svntest.actions.make_repo_and_wc(self, create_wc, read_only):
-      raise svntest.Failure("Could not build repository and sandbox '%s'"
-                            % self.name)
-    else:
-      self._is_built = True
+    svntest.actions.make_repo_and_wc(self, create_wc, read_only)
+    self._is_built = True
 
   def add_test_path(self, path, remove=True):
     self.test_paths.append(path)
@@ -155,7 +152,7 @@ class Sandbox:
         sbox.cleanup_test_paths()
     # cleanup all test specific working copies and repositories
     for path in self.test_paths:
-      if not path is svntest.main.pristine_dir:
+      if not path is svntest.main.pristine_greek_repos_dir:
         _cleanup_test_path(path)
 
   def is_built(self):

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/switch_tests.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/switch_tests.py Fri Aug  6 15:04:22 2010
@@ -2476,6 +2476,8 @@ j = os.path.join
 def tree_conflicts_on_switch_1_1(sbox):
   "tree conflicts 1.1: tree del, leaf edit on switch"
 
+  sbox.build()
+
   # use case 1, as in notes/tree-conflicts/use-cases.txt
   # 1.1) local tree delete, incoming leaf edit
 
@@ -2493,6 +2495,10 @@ def tree_conflicts_on_switch_1_1(sbox):
   })
 
   expected_disk = disk_empty_dirs.copy()
+  if  svntest.main.wc_is_singledb(sbox.wc_dir):
+    expected_disk.remove('D/D1', 'DF/D1', 'DD/D1', 'DD/D1/D2',
+                         'DDF/D1', 'DDF/D1/D2',
+                         'DDD/D1', 'DDD/D1/D2', 'DDD/D1/D2/D3')
 
   # The files delta, epsilon, and zeta are incoming additions, but since
   # they are all within locally deleted trees they should also be schedule
@@ -2560,6 +2566,8 @@ def tree_conflicts_on_switch_1_1(sbox):
 def tree_conflicts_on_switch_1_2(sbox):
   "tree conflicts 1.2: tree del, leaf del on switch"
 
+  sbox.build()
+
   # 1.2) local tree delete, incoming leaf delete
 
   expected_output = deep_trees_conflict_output.copy()
@@ -2599,6 +2607,10 @@ def tree_conflicts_on_switch_1_2(sbox):
   expected_disk.remove('D/D1',
                        'DD/D1/D2',
                        'DDD/D1/D2/D3')
+  if svntest.main.wc_is_singledb(sbox.wc_dir):
+    expected_disk.remove('DF/D1', 'DD/D1',
+                         'DDF/D1', 'DDF/D1/D2',
+                         'DDD/D1', 'DDD/D1/D2')
 
   expected_info = {
     'F/alpha' : {

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/update_tests.py?rev=983010&r1=983009&r2=983010&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/update_tests.py Fri Aug  6 15:04:22 2010
@@ -4418,6 +4418,8 @@ def tree_conflicts_on_update_1_1(sbox):
   # use case 1, as in notes/tree-conflicts/use-cases.txt
   # 1.1) local tree delete, incoming leaf edit
 
+  sbox.build()
+
   expected_output = deep_trees_conflict_output.copy()
   expected_output.add({
     'DDF/D1/D2'         : Item(status='D '),
@@ -4432,6 +4434,10 @@ def tree_conflicts_on_update_1_1(sbox):
   })
 
   expected_disk = disk_empty_dirs.copy()
+  if svntest.main.wc_is_singledb(sbox.wc_dir):
+    expected_disk.remove('D/D1', 'DF/D1', 'DD/D1', 'DD/D1/D2',
+                         'DDF/D1', 'DDF/D1/D2',
+                         'DDD/D1', 'DDD/D1/D2', 'DDD/D1/D2/D3')
 
   # The files delta, epsilon, and zeta are incoming additions, but since
   # they are all within locally deleted trees they should also be schedule
@@ -4500,6 +4506,8 @@ def tree_conflicts_on_update_1_2(sbox):
 
   # 1.2) local tree delete, incoming leaf delete
 
+  sbox.build()
+
   expected_output = deep_trees_conflict_output.copy()
   expected_output.add({
     'DDD/D1/D2'         : Item(status='D '),
@@ -4537,6 +4545,10 @@ def tree_conflicts_on_update_1_2(sbox):
   expected_disk.remove('D/D1',
                        'DD/D1/D2',
                        'DDD/D1/D2/D3')
+  if svntest.main.wc_is_singledb(sbox.wc_dir):
+    expected_disk.remove('DF/D1', 'DD/D1',
+                         'DDF/D1', 'DDF/D1/D2',
+                         'DDD/D1', 'DDD/D1/D2')
 
   expected_info = {
     'F/alpha' : {