You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2011/03/09 21:13:33 UTC

svn commit: r1079967 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c

Author: ivan
Date: Wed Mar  9 20:13:33 2011
New Revision: 1079967

URL: http://svn.apache.org/viewvc?rev=1079967&view=rev
Log:
ra_serf: Do not send CHECKOT request when adding sub-directory to
newly added or copied directory.

* subversion/libsvn_ra_serf/commit.c
  (commit_context_t): Remove copied_entries.
  (checkout_dir, checkout_file): Use added flag of parent dir instead of 
   copied_entries hash table.
  (setup_copy_dir_headers): Do not add dir to copied_entries hash table.
  (svn_ra_serf__get_commit_editor): Remove initialization of copied_entries
   member.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/commit.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1079967&r1=1079966&r2=1079967&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Wed Mar  9 20:13:33 2011
@@ -76,7 +76,6 @@ typedef struct commit_context_t {
   apr_hash_t *lock_tokens;
   svn_boolean_t keep_locks;
   apr_hash_t *deleted_entries;   /* deleted files (for delete+add detection) */
-  apr_hash_t *copied_entries;    /* copied enties (we don't checkout these) */
 
   /* HTTP v2 stuff */
   const char *txn_name;          /* transaction name (append to txn-ish stubs */
@@ -366,9 +365,9 @@ checkout_dir(dir_context_t *dir)
 
   if (dir->parent_dir)
     {
-      /* Is our parent a copy?  If so, we're already implicitly checked out. */
-      if (apr_hash_get(dir->commit->copied_entries,
-                       dir->parent_dir->name, APR_HASH_KEY_STRING))
+      /* Is our parent newly added?  If so, we're already implicitly checked
+       * out. */
+      if (dir->parent_dir->added)
         {
           /* Implicitly checkout this dir now. */
           dir->checkout = apr_pcalloc(dir->pool, sizeof(*dir->checkout));
@@ -379,10 +378,6 @@ checkout_dir(dir_context_t *dir)
                                         svn_relpath_basename(dir->name, NULL),
                                         dir->pool);
 
-          apr_hash_set(dir->commit->copied_entries,
-                       apr_pstrdup(dir->commit->pool, dir->name),
-                       APR_HASH_KEY_STRING, (void*)1);
-
           return SVN_NO_ERROR;
         }
     }
@@ -554,18 +549,10 @@ checkout_file(file_context_t *file)
 
   if (file->parent_dir)
     {
-      dir_context_t *dir;
+      dir_context_t *dir = file->parent_dir;
 
-      dir = file->parent_dir;
-      while (dir && ! apr_hash_get(file->commit->copied_entries,
-                                   dir->name, APR_HASH_KEY_STRING))
-        {
-          dir = dir->parent_dir;
-        }
-
-
-      /* Is our parent a copy?  If so, we're already implicitly checked out. */
-      if (dir)
+      /* Is our parent newly added?  If so, we're already implicitly checked out. */
+      if (dir->added)
         {
           const char *diff_path;
 
@@ -1124,10 +1111,6 @@ setup_copy_dir_headers(serf_bucket_t *he
   dir->checkout->activity_url = dir->commit->activity_url;
   dir->checkout->resource_url = apr_pstrdup(dir->checkout->pool, uri.path);
 
-  apr_hash_set(dir->commit->copied_entries,
-               apr_pstrdup(dir->commit->pool, dir->name), APR_HASH_KEY_STRING,
-               (void*)1);
-
   return SVN_NO_ERROR;
 }
 
@@ -2316,7 +2299,6 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   ctx->keep_locks = keep_locks;
 
   ctx->deleted_entries = apr_hash_make(ctx->pool);
-  ctx->copied_entries = apr_hash_make(ctx->pool);
 
   editor = svn_delta_default_editor(pool);
   editor->open_root = open_root;