You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/12/27 04:13:30 UTC

svn commit: r1426110 [1/2] - in /subversion/branches/javahl-ra: ./ build/ac-macros/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_local/ subversion/libsv...

Author: vmpn
Date: Thu Dec 27 03:13:29 2012
New Revision: 1426110

URL: http://svn.apache.org/viewvc?rev=1426110&view=rev
Log:
On the javahl-ra branch:

Bring up-to-date with trunk@1409164

Modified:
    subversion/branches/javahl-ra/   (props changed)
    subversion/branches/javahl-ra/build/ac-macros/apache.m4
    subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h
    subversion/branches/javahl-ra/subversion/include/svn_client.h
    subversion/branches/javahl-ra/subversion/libsvn_client/add.c
    subversion/branches/javahl-ra/subversion/libsvn_client/client.h
    subversion/branches/javahl-ra/subversion/libsvn_client/commit.c
    subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c
    subversion/branches/javahl-ra/subversion/libsvn_client/ra.c
    subversion/branches/javahl-ra/subversion/libsvn_client/revisions.c
    subversion/branches/javahl-ra/subversion/libsvn_delta/compat.c
    subversion/branches/javahl-ra/subversion/libsvn_delta/debug_editor.c
    subversion/branches/javahl-ra/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/javahl-ra/subversion/libsvn_ra_local/split_url.c
    subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c
    subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c
    subversion/branches/javahl-ra/subversion/libsvn_ra_serf/util.c
    subversion/branches/javahl-ra/subversion/libsvn_ra_svn/client.c
    subversion/branches/javahl-ra/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/info.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/node.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/props.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/status.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/update_editor.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/wc.h
    subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.c
    subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db.h
    subversion/branches/javahl-ra/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/javahl-ra/subversion/mod_dav_svn/authz.c
    subversion/branches/javahl-ra/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/javahl-ra/subversion/mod_dav_svn/repos.c
    subversion/branches/javahl-ra/subversion/svn/add-cmd.c
    subversion/branches/javahl-ra/subversion/svn/import-cmd.c
    subversion/branches/javahl-ra/subversion/svn/main.c
    subversion/branches/javahl-ra/subversion/svnadmin/main.c
    subversion/branches/javahl-ra/subversion/svnlook/main.c
    subversion/branches/javahl-ra/subversion/svnmucc/svnmucc.c
    subversion/branches/javahl-ra/subversion/tests/cmdline/autoprop_tests.py
    subversion/branches/javahl-ra/subversion/tests/cmdline/import_tests.py
    subversion/branches/javahl-ra/subversion/tests/cmdline/special_tests.py
    subversion/branches/javahl-ra/subversion/tests/cmdline/svnmucc_tests.py
    subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/main.py
    subversion/branches/javahl-ra/subversion/tests/cmdline/svntest/verify.py
    subversion/branches/javahl-ra/subversion/tests/libsvn_client/client-test.c
    subversion/branches/javahl-ra/subversion/tests/libsvn_subr/dirent_uri-test.c

Propchange: subversion/branches/javahl-ra/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1407275-1409164

Modified: subversion/branches/javahl-ra/build/ac-macros/apache.m4
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/build/ac-macros/apache.m4?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/build/ac-macros/apache.m4 (original)
+++ subversion/branches/javahl-ra/build/ac-macros/apache.m4 Thu Dec 27 03:13:29 2012
@@ -97,7 +97,7 @@ if test -n "$APXS" && test "$APXS" != "n
       apache_minor_version_wanted_regex="0"
       ;;
     1)
-      apache_minor_version_wanted_regex=["[1-4]"]
+      apache_minor_version_wanted_regex=["[1-5]"]
       ;;
     2)
       apache_minor_version_wanted_regex=["[3-5]"]

Modified: subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/javahl-ra/subversion/include/private/svn_wc_private.h Thu Dec 27 03:13:29 2012
@@ -669,35 +669,6 @@ svn_wc__node_get_pre_ng_status_data(svn_
                                     apr_pool_t *result_pool,
                                     apr_pool_t *scratch_pool);
 
-
-/**
- * Return the location of the base for this node's next commit,
- * reflecting any local tree modifications affecting this node.
- *
- * Get the base location of @a local_abspath using @a wc_ctx.  If @a
- * local_abspath is not in the working copy, return @c
- * SVN_ERR_WC_PATH_NOT_FOUND.
- *
- * If this node has no uncommitted changes, return the same location as
- * svn_wc__node_get_base().
- *
- * If this node is moved-here or copied-here (possibly as part of a replace),
- * return the location of the copy/move source. Do the same even when the node
- * has been removed from a recursive copy (subpath excluded from the copy).
- *
- * Else, if this node is locally added, return SVN_INVALID_REVNUM/NULL, or
- * if locally deleted or replaced, return the revert-base location.
- */
-svn_error_t *
-svn_wc__node_get_commit_base(svn_revnum_t *revision,
-                             const char **repos_relpath,
-                             const char **repos_root_url,
-                             const char **repos_uuid,
-                             svn_wc_context_t *wc_ctx,
-                             const char *local_abspath,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool);
-
 /**
  * Fetch lock information (if any) for @a local_abspath using @a wc_ctx:
  *

Modified: subversion/branches/javahl-ra/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/include/svn_client.h?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/include/svn_client.h (original)
+++ subversion/branches/javahl-ra/subversion/include/svn_client.h Thu Dec 27 03:13:29 2012
@@ -1524,18 +1524,43 @@ svn_client_switch(svn_revnum_t *result_r
  * behaviour only when recursing into an already versioned directory with @a
  * force.)
  *
+ * If @a no_autoprops is TRUE, don't set any autoprops on added files. If
+ * @a no_autoprops is FALSE then all added files have autprops set as per
+ * the auto-props list in @a ctx->config and the value of any
+ * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest
+ * parents of @a path which are already under version control.
+ *
  * If @a add_parents is TRUE, recurse up @a path's directory and look for
  * a versioned directory.  If found, add all intermediate paths between it
  * and @a path.  If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.
  *
+ * @a scratch_pool is used for temporary allocations only.
+ *
  * @par Important:
  * This is a *scheduling* operation.  No changes will
  * happen to the repository until a commit occurs.  This scheduling
  * can be removed with svn_client_revert2().
  *
- * @since New in 1.5.
+ * @since New in 1.8.
  */
 svn_error_t *
+svn_client_add5(const char *path,
+                svn_depth_t depth,
+                svn_boolean_t force,
+                svn_boolean_t no_ignore,
+                svn_boolean_t no_autoprops,
+                svn_boolean_t add_parents,
+                svn_client_ctx_t *ctx,
+                apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_client_add3(), but with @a no_autoprops always set to
+ * FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
 svn_client_add4(const char *path,
                 svn_depth_t depth,
                 svn_boolean_t force,
@@ -1852,7 +1877,7 @@ typedef svn_error_t *(*svn_client_import
  * actions: #svn_wc_notify_commit_added,
  * #svn_wc_notify_commit_postfix_txdelta.
  *
- * Use @a pool for any temporary allocation.
+ * Use @a scratch_pool for any temporary allocation.
  *
  * If non-NULL, @a revprop_table is a hash table holding additional,
  * custom revision properties (<tt>const char *</tt> names mapped to
@@ -1879,6 +1904,13 @@ typedef svn_error_t *(*svn_client_import
  * if the target is part of a WC the import ignores any existing
  * properties.)
  *
+ * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If
+ * @a no_autoprops is FALSE then all imported files have autprops set as per
+ * the auto-props list in @a ctx->config and the value of any
+ * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set
+ * on @a url if @a url is already under versioned control, or the nearest parents
+ * of @a path which are already under version control if not.
+ *
  * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
  * node type is unknown, such as device files and pipes.
  *
@@ -1897,6 +1929,7 @@ svn_client_import5(const char *path,
                    const char *url,
                    svn_depth_t depth,
                    svn_boolean_t no_ignore,
+                   svn_boolean_t no_autoprops,
                    svn_boolean_t ignore_unknown_node_types,
                    const apr_hash_t *revprop_table,
                    svn_client_import_filter_func_t filter_callback,
@@ -1908,7 +1941,7 @@ svn_client_import5(const char *path,
 
 /**
  * Similar to svn_client_import5(), but without support for an optional
- * @a filter_callback.
+ * @a filter_callback and @a no_autoprops always set to FALSE.
  *
  * @since New in 1.7.
  * @deprecated Provided for backward compatibility with the 1.7 API.

Modified: subversion/branches/javahl-ra/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/add.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/add.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/add.c Thu Dec 27 03:13:29 2012
@@ -201,16 +201,19 @@ svn_client__get_paths_auto_props(apr_has
   *properties = apr_hash_make(result_pool);
   *mimetype = NULL;
 
-  for (hi = apr_hash_first(scratch_pool, autoprops);
-       hi != NULL;
-       hi = apr_hash_next(hi))
-    {
-      const char *pattern = svn__apr_hash_index_key(hi);
-      apr_hash_t *propvals = svn__apr_hash_index_val(hi);
-
-      get_auto_props_for_pattern(*properties, mimetype, &have_executable,
-                                 svn_dirent_basename(path, scratch_pool),
-                                 pattern, propvals, scratch_pool);
+  if (autoprops)
+    {
+      for (hi = apr_hash_first(scratch_pool, autoprops);
+           hi != NULL;
+           hi = apr_hash_next(hi))
+        {
+          const char *pattern = svn__apr_hash_index_key(hi);
+          apr_hash_t *propvals = svn__apr_hash_index_val(hi);
+
+          get_auto_props_for_pattern(*properties, mimetype, &have_executable,
+                                     svn_dirent_basename(path, scratch_pool),
+                                     pattern, propvals, scratch_pool);
+        }
     }
 
   /* if mimetype has not been set check the file */
@@ -267,10 +270,11 @@ static svn_error_t *
 add_file(const char *local_abspath,
          svn_magic__cookie_t *magic_cookie,
          apr_hash_t *autoprops,
+         svn_boolean_t no_autoprops,
          svn_client_ctx_t *ctx,
          apr_pool_t *pool)
 {
-  apr_hash_t* properties;
+  apr_hash_t* properties = NULL;
   apr_hash_index_t *hi;
   const char *mimetype;
   svn_node_kind_t kind;
@@ -289,18 +293,21 @@ add_file(const char *local_abspath,
     }
   else
     {
-      apr_hash_t *file_autoprops;
+      apr_hash_t *file_autoprops = NULL;
 
       /* Get automatic properties */
-      /* Grab the inherited svn:auto-props and config file
-         auto-props for this file if we haven't already got them
+      /* If we are setting autoprops grab the inherited svn:auto-props and
+         config file auto-props for this file if we haven't already got them
          when iterating over the file's unversioned parents. */
-      if (autoprops == NULL)
-        SVN_ERR(svn_client__get_all_auto_props(
-          &file_autoprops, svn_dirent_dirname(local_abspath,pool),
-          ctx, pool, pool));
-      else
-        file_autoprops = autoprops;
+      if (!no_autoprops)
+        {
+          if (autoprops == NULL)
+            SVN_ERR(svn_client__get_all_auto_props(
+              &file_autoprops, svn_dirent_dirname(local_abspath,pool),
+              ctx, pool, pool));
+          else
+            file_autoprops = autoprops;
+        }
 
       /* This may fail on write-only files:
          we open them to estimate file type.
@@ -406,6 +413,7 @@ add_dir_recursive(const char *dir_abspat
                   svn_depth_t depth,
                   svn_boolean_t force,
                   svn_boolean_t no_ignore,
+                  svn_boolean_t no_autoprops,
                   svn_magic__cookie_t *magic_cookie,
                   apr_hash_t **config_autoprops,
                   svn_boolean_t refresh_ignores,
@@ -509,15 +517,16 @@ add_dir_recursive(const char *dir_abspat
             refresh_ignores = FALSE;
 
           SVN_ERR(add_dir_recursive(abspath, depth_below_here,
-                                    force, no_ignore, magic_cookie,
-                                    config_autoprops, refresh_ignores,
-                                    ignores, ctx, iterpool, iterpool));
+                                    force, no_ignore, no_autoprops,
+                                    magic_cookie, config_autoprops,
+                                    refresh_ignores, ignores, ctx,
+                                    iterpool, iterpool));
         }
       else if ((dirent->kind == svn_node_file || dirent->special)
                && depth >= svn_depth_files)
         {
-          err = add_file(abspath, magic_cookie, *config_autoprops, ctx,
-                         iterpool);
+          err = add_file(abspath, magic_cookie, *config_autoprops,
+                         no_autoprops, ctx, iterpool);
           if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
             svn_error_clear(err);
           else
@@ -963,7 +972,7 @@ svn_error_t *svn_client__get_all_ignores
   return SVN_NO_ERROR;
 }
 
-/* The main logic of the public svn_client_add4.
+/* The main logic of the public svn_client_add5.
  *
  * EXISTING_PARENT_ABSPATH is the absolute path to the first existing
  * parent directory of local_abspath. If not NULL, all missing parents
@@ -973,6 +982,7 @@ add(const char *local_abspath,
     svn_depth_t depth,
     svn_boolean_t force,
     svn_boolean_t no_ignore,
+    svn_boolean_t no_autoprops,
     const char *existing_parent_abspath,
     svn_client_ctx_t *ctx,
     apr_pool_t *scratch_pool)
@@ -1032,12 +1042,12 @@ add(const char *local_abspath,
          and pass depth along no matter what it is, so that the
          target's depth will be set correctly. */
       err = add_dir_recursive(local_abspath, depth, force, no_ignore,
-                              magic_cookie, &config_autoprops, TRUE, ignores,
-                              ctx, scratch_pool, scratch_pool);
+                              no_autoprops, magic_cookie, &config_autoprops,
+                              TRUE, ignores, ctx, scratch_pool, scratch_pool);
     }
   else if (kind == svn_node_file)
-    err = add_file(local_abspath, magic_cookie, config_autoprops, ctx,
-                   scratch_pool);
+    err = add_file(local_abspath, magic_cookie, config_autoprops,
+                   no_autoprops, ctx, scratch_pool);
   else if (kind == svn_node_none)
     {
       svn_boolean_t tree_conflicted;
@@ -1080,13 +1090,14 @@ add(const char *local_abspath,
 
 
 svn_error_t *
-svn_client_add4(const char *path,
+svn_client_add5(const char *path,
                 svn_depth_t depth,
                 svn_boolean_t force,
                 svn_boolean_t no_ignore,
+                svn_boolean_t no_autoprops,
                 svn_boolean_t add_parents,
                 svn_client_ctx_t *ctx,
-                apr_pool_t *pool)
+                apr_pool_t *scratch_pool)
 {
   const char *parent_abspath;
   const char *local_abspath;
@@ -1098,14 +1109,14 @@ svn_client_add4(const char *path,
     return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
                              _("'%s' is not a local path"), path);
 
-  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
+  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
 
   /* See if we're being asked to add a wc-root.  That's typically not
      okay, unless we're in "force" mode.  svn_wc__strictly_is_wc_root()
      will return TRUE even if LOCAL_ABSPATH is a *symlink* to a working
      copy root, which is a scenario we want to treat differently.  */
   err = svn_wc__strictly_is_wc_root(&is_wc_root, ctx->wc_ctx,
-                                    local_abspath, pool);
+                                    local_abspath, scratch_pool);
   if (err)
     {
       if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
@@ -1125,7 +1136,7 @@ svn_client_add4(const char *path,
       svn_boolean_t is_special;
 
       SVN_ERR(svn_io_check_special_path(local_abspath, &disk_kind, &is_special,
-                                        pool));
+                                        scratch_pool));
 
       /* A symlink can be an unversioned target and a wcroot. Lets try to add
          the symlink, which can't be a wcroot. */
@@ -1138,14 +1149,15 @@ svn_client_add4(const char *path,
             return svn_error_createf(
                                  SVN_ERR_ENTRY_EXISTS, NULL,
                                  _("'%s' is already under version control"),
-                                 svn_dirent_local_style(local_abspath, pool));
+                                 svn_dirent_local_style(local_abspath,
+                                                        scratch_pool));
         }
     }
 
   if (is_wc_root)
     parent_abspath = local_abspath; /* We will only add children */
   else
-    parent_abspath = svn_dirent_dirname(local_abspath, pool);
+    parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
 
   existing_parent_abspath = NULL;
   if (add_parents && !is_wc_root)
@@ -1153,20 +1165,20 @@ svn_client_add4(const char *path,
       apr_pool_t *subpool;
       const char *existing_parent_abspath2;
 
-      subpool = svn_pool_create(pool);
+      subpool = svn_pool_create(scratch_pool);
       SVN_ERR(find_existing_parent(&existing_parent_abspath2, ctx,
-                                   parent_abspath, pool, subpool));
+                                   parent_abspath, scratch_pool, subpool));
       if (strcmp(existing_parent_abspath2, parent_abspath) != 0)
         existing_parent_abspath = existing_parent_abspath2;
       svn_pool_destroy(subpool);
     }
 
   SVN_WC__CALL_WITH_WRITE_LOCK(
-    add(local_abspath, depth, force, no_ignore, existing_parent_abspath,
-        ctx, pool),
+    add(local_abspath, depth, force, no_ignore, no_autoprops,
+        existing_parent_abspath, ctx, scratch_pool),
     ctx->wc_ctx, (existing_parent_abspath ? existing_parent_abspath 
                                           : parent_abspath),
-    FALSE /* lock_anchor */, pool);
+    FALSE /* lock_anchor */, scratch_pool);
   return SVN_NO_ERROR;
 }
 
@@ -1398,7 +1410,7 @@ svn_client__make_local_parents(const cha
      itself is added, since it not only constraints the operation depth, but
      also defines the depth of the target directory now. Moreover, the new
      directory will have no children at all.*/
-  err = svn_client_add4(path, svn_depth_infinity, FALSE, FALSE,
+  err = svn_client_add5(path, svn_depth_infinity, FALSE, FALSE, FALSE,
                         make_parents, ctx, pool);
 
   /* If we created a new directory, but couldn't add it to version

Modified: subversion/branches/javahl-ra/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/client.h?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/client.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/client.h Thu Dec 27 03:13:29 2012
@@ -326,17 +326,18 @@ svn_client__ra_make_cb_baton(svn_wc_cont
 
 /*** Add/delete ***/
 
-/* Read automatic properties matching PATH from AUTOPROPS.  AUTOPROPS
-   is is a hash as per svn_client__get_all_auto_props.
-
-   Set *PROPERTIES to a hash containing propname/value pairs
-   (const char * keys mapping to svn_string_t * values).  *PROPERTIES
-   may be an empty hash, but will not be NULL.
-
-   Set *MIMETYPE to the mimetype, if any, or to NULL.
-
-   If MAGIC_COOKIE is not NULL and no mime-type can be determined
-   via CTX->config try to detect the mime-type with libmagic.
+/* If AUTOPROPS is not null: Then read automatic properties matching PATH
+   from AUTOPROPS.  AUTOPROPS is is a hash as per
+   svn_client__get_all_auto_props.  Set *PROPERTIES to a hash containing
+   propname/value pairs (const char * keys mapping to svn_string_t * values).
+
+   If AUTOPROPS is null then set *PROPERTIES to an empty hash.
+
+   If *MIMETYPE is null or "application/octet-stream" then check AUTOPROPS
+   for a matching svn:mime-type.  If AUTOPROPS is null or no match is found
+   and MAGIC_COOKIE is not NULL, then then try to detect the mime-type with
+   libmagic.  If a mimetype is found then add it to *PROPERTIES and set
+   *MIMETYPE to the mimetype value or NULL otherwise.
 
    Allocate the *PROPERTIES and its contents as well as *MIMETYPE, in
    RESULT_POOL.  Use SCRATCH_POOL for temporary allocations. */
@@ -628,17 +629,16 @@ svn_client__get_inheritable_props(apr_ha
 /* Create an editor for a pure repository comparison, i.e. comparing one
    repository version against the other.
 
-   DIFF_CMD/DIFF_CMD_BATON represent the callback and callback argument that
-   implement the file comparison function
+   DIFF_CALLBACKS/DIFF_CMD_BATON represent the callback that implements
+   the comparison.
 
    DEPTH is the depth to recurse.
 
    RA_SESSION is an RA session through which this editor may fetch
    properties, file contents and directory listings of the 'old' side of the
    diff. It is a separate RA session from the one through which this editor
-   is being driven.
-
-   REVISION is the start revision in the comparison.
+   is being driven. REVISION is the revision number of the 'old' side of
+   the diff.
 
    For each deleted directory, if WALK_DELETED_DIRS is true then just call
    the 'dir_deleted' callback once, otherwise call the 'file_deleted' or

Modified: subversion/branches/javahl-ra/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/commit.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/commit.c Thu Dec 27 03:13:29 2012
@@ -79,8 +79,9 @@ typedef struct import_ctx_t
   /* Collection of all possible configuration file dictated auto-props and
      svn:auto-props.  A hash mapping const char * file patterns to a
      second hash which maps const char * property names to const char *
-     property values.  Properties which don't have a value, e.g. svn:executable,
-     simply map the property name to an empty string. */
+     property values.  Properties which don't have a value, e.g.
+     svn:executable, simply map the property name to an empty string.
+     May be NULL if autoprops are disabled. */
   apr_hash_t *autoprops;
 } import_ctx_t;
 
@@ -287,7 +288,7 @@ import_file(const svn_delta_editor_t *ed
 
 /* Return in CHILDREN a mapping of basenames to dirents for the importable
  * children of DIR_ABSPATH.  EXCLUDES is a hash of absolute paths to filter
- * out.  IGNORES and MANDATORY_IGNORES, if non-NULL, are lists of basename
+ * out.  IGNORES and GLOBAL_IGNORES, if non-NULL, are lists of basename
  * patterns to filter out.
  * FILTER_CALLBACK and FILTER_BATON will be called for each absolute path,
  * allowing users to further filter the list of returned entries.
@@ -298,7 +299,7 @@ get_filtered_children(apr_hash_t **child
                       const char *dir_abspath,
                       apr_hash_t *excludes,
                       apr_array_header_t *ignores,
-                      apr_array_header_t *mandatory_ignores,
+                      apr_array_header_t *global_ignores,
                       svn_client_import_filter_func_t filter_callback,
                       void *filter_baton,
                       svn_client_ctx_t *ctx,
@@ -359,7 +360,8 @@ get_filtered_children(apr_hash_t **child
           continue;
         }
 
-      if (svn_wc_match_ignore_list(base_name, mandatory_ignores, iterpool))
+      if (global_ignores &&
+          svn_wc_match_ignore_list(base_name, global_ignores, iterpool))
         {
           apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
           continue;
@@ -392,8 +394,9 @@ import_dir(const svn_delta_editor_t *edi
            const char *edit_path,
            svn_depth_t depth,
            apr_hash_t *excludes,
-           apr_array_header_t *mandatory_ignores,
+           apr_array_header_t *global_ignores,
            svn_boolean_t no_ignore,
+           svn_boolean_t no_autoprops,
            svn_boolean_t ignore_unknown_node_types,
            svn_client_import_filter_func_t filter_callback,
            void *filter_baton,
@@ -412,8 +415,9 @@ import_children(const char *dir_abspath,
                 void *dir_baton,
                 svn_depth_t depth,
                 apr_hash_t *excludes,
-                apr_array_header_t *mandatory_ignores,
+                apr_array_header_t *global_ignores,
                 svn_boolean_t no_ignore,
+                svn_boolean_t no_autoprops,
                 svn_boolean_t ignore_unknown_node_types,
                 svn_client_import_filter_func_t filter_callback,
                 void *filter_baton,
@@ -455,7 +459,7 @@ import_children(const char *dir_abspath,
 
           SVN_ERR(import_dir(editor, dir_baton, this_abspath,
                              this_edit_path, depth_below_here, excludes,
-                             mandatory_ignores, no_ignore,
+                             global_ignores, no_ignore, no_autoprops,
                              ignore_unknown_node_types, filter_callback,
                              filter_baton, import_ctx, ctx, iterpool));
         }
@@ -508,7 +512,7 @@ import_children(const char *dir_abspath,
  * EXCLUDES is a hash whose keys are absolute paths to exclude from
  * the import (values are unused).
  *
- * MANDATORY_IGNORES is an array of const char * ignore patterns.  Any child
+ * GLOBAL_IGNORES is an array of const char * ignore patterns.  Any child
  * of LOCAL_ABSPATH which matches one or more of the patterns is not imported.
  *
  * If NO_IGNORE is FALSE, don't import files or directories that match
@@ -528,8 +532,9 @@ import_dir(const svn_delta_editor_t *edi
            const char *edit_path,
            svn_depth_t depth,
            apr_hash_t *excludes,
-           apr_array_header_t *mandatory_ignores,
+           apr_array_header_t *global_ignores,
            svn_boolean_t no_ignore,
+           svn_boolean_t no_autoprops,
            svn_boolean_t ignore_unknown_node_types,
            svn_client_import_filter_func_t filter_callback,
            void *filter_baton,
@@ -538,16 +543,11 @@ import_dir(const svn_delta_editor_t *edi
            apr_pool_t *pool)
 {
   apr_hash_t *dirents;
-  apr_array_header_t *ignores = NULL;
   void *this_dir_baton;
 
   SVN_ERR(svn_path_check_valid(local_abspath, pool));
-
-  if (!no_ignore)
-    SVN_ERR(svn_wc_get_default_ignores(&ignores, ctx->config, pool));
-
-  SVN_ERR(get_filtered_children(&dirents, local_abspath, excludes, ignores,
-                                mandatory_ignores, filter_callback,
+  SVN_ERR(get_filtered_children(&dirents, local_abspath, excludes, NULL,
+                                global_ignores, filter_callback,
                                 filter_baton, ctx, pool, pool));
 
   /* Import this directory, but not yet its children. */
@@ -578,8 +578,8 @@ import_dir(const svn_delta_editor_t *edi
 
   /* Now import the children recursively. */
   SVN_ERR(import_children(local_abspath, edit_path, dirents, editor,
-                          this_dir_baton, depth, excludes, mandatory_ignores,
-                          no_ignore, ignore_unknown_node_types,
+                          this_dir_baton, depth, excludes, global_ignores,
+                          no_ignore, no_autoprops, ignore_unknown_node_types,
                           filter_callback, filter_baton,
                           import_ctx, ctx, pool));
 
@@ -621,7 +621,7 @@ import_dir(const svn_delta_editor_t *edi
  * repository target and thus dictates which immediate children of that
  * target should be ignored and not imported.
  *
- * MANDATORY_IGNORES is an array of const char * ignore patterns which
+ * GLOBAL_IGNORES is an array of const char * ignore patterns which
  * correspond to the svn:global-ignores properties (if any) set on
  * the root of the repository target or inherited by it.
  *
@@ -647,8 +647,9 @@ import(const char *local_abspath,
        apr_hash_t *excludes,
        apr_hash_t *autoprops,
        apr_array_header_t *local_ignores,
-       apr_array_header_t *mandatory_ignores,
+       apr_array_header_t *global_ignores,
        svn_boolean_t no_ignore,
+       svn_boolean_t no_autoprops,
        svn_boolean_t ignore_unknown_node_types,
        svn_client_import_filter_func_t filter_callback,
        void *filter_baton,
@@ -656,7 +657,6 @@ import(const char *local_abspath,
        apr_pool_t *pool)
 {
   void *root_baton;
-  apr_array_header_t *ignores = NULL;
   apr_array_header_t *batons = NULL;
   const char *edit_path = "";
   import_ctx_t *import_ctx = apr_pcalloc(pool, sizeof(*import_ctx));
@@ -724,12 +724,10 @@ import(const char *local_abspath,
       svn_boolean_t ignores_match = FALSE;
 
       if (!no_ignore)
-        {
-          SVN_ERR(svn_wc_get_default_ignores(&ignores, ctx->config, pool));
-          ignores_match =
-            (svn_wc_match_ignore_list(local_abspath, ignores, pool)
-             || svn_wc_match_ignore_list(local_abspath, local_ignores, pool));
-        }
+        ignores_match =
+          (svn_wc_match_ignore_list(local_abspath, global_ignores, pool)
+           || svn_wc_match_ignore_list(local_abspath, local_ignores, pool));
+
       if (!ignores_match)
         SVN_ERR(import_file(editor, root_baton, local_abspath, edit_path,
                             dirent, import_ctx, ctx, pool));
@@ -738,38 +736,21 @@ import(const char *local_abspath,
     {
       apr_hash_t *dirents;
 
-      if (!no_ignore)
-        {
-          int i;
-
-          SVN_ERR(svn_wc_get_default_ignores(&ignores, ctx->config, pool));
-
-          /* If we are not creating new repository paths, then we are creating
-             importing new paths to an existing directory.  If that directory
-             has the svn:ignore property set on it, then we want to ignore
-             immediate children that match the pattern(s) defined by that
-             property. */
-          if (!new_entries->nelts)
-            {
-              for (i = 0; i < local_ignores->nelts; i++)
-                {
-                  const char *ignore = APR_ARRAY_IDX(local_ignores, i,
-                                                     const char *);
-                  APR_ARRAY_PUSH(ignores, const char *) = ignore;
-                }          
-            }
-        }
+      /* If we are creating a new repository directory path to import to,
+         then we disregard any svn:ignore property. */
+      if (!no_ignore && new_entries->nelts)
+        local_ignores = NULL;
 
       SVN_ERR(get_filtered_children(&dirents, local_abspath, excludes,
-                                    ignores, mandatory_ignores,
+                                    local_ignores, global_ignores,
                                     filter_callback, filter_baton, ctx,
                                     pool, pool));
 
       SVN_ERR(import_children(local_abspath, edit_path, dirents, editor,
-                              root_baton, depth, excludes, mandatory_ignores,
-                              no_ignore, ignore_unknown_node_types,
-                              filter_callback, filter_baton,
-                              import_ctx, ctx, pool));
+                              root_baton, depth, excludes, global_ignores,
+                              no_ignore, no_autoprops,
+                              ignore_unknown_node_types, filter_callback,
+                              filter_baton, import_ctx, ctx, pool));
 
     }
   else if (dirent->kind == svn_node_none
@@ -890,6 +871,7 @@ svn_client_import5(const char *path,
                    const char *url,
                    svn_depth_t depth,
                    svn_boolean_t no_ignore,
+                   svn_boolean_t no_autoprops,
                    svn_boolean_t ignore_unknown_node_types,
                    const apr_hash_t *revprop_table,
                    svn_client_import_filter_func_t filter_callback,
@@ -913,9 +895,8 @@ svn_client_import5(const char *path,
   const char *dir;
   apr_hash_t *commit_revprops;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
-  apr_hash_t *autoprops;
-  apr_array_header_t *mandatory_ignores;
-  svn_opt_revision_t rev;
+  apr_hash_t *autoprops = NULL;
+  apr_array_header_t *global_ignores;
   apr_hash_t *local_ignores_hash;
   apr_array_header_t *local_ignores_arr;
 
@@ -1031,24 +1012,41 @@ svn_client_import5(const char *path,
 
   /* Get inherited svn:auto-props, svn:global-ignores, and
      svn:ignores for the location we are importing to. */
-  SVN_ERR(svn_client__get_all_auto_props(&autoprops, url, ctx,
-                                         scratch_pool, iterpool));
-  SVN_ERR(svn_client__get_inherited_ignores(&mandatory_ignores, url,
-                                            ctx, scratch_pool, iterpool));
-  rev.kind = svn_opt_revision_head;
-  SVN_ERR(svn_client_propget5(&local_ignores_hash, NULL, SVN_PROP_IGNORE, url,
-                              &rev, &rev, NULL, svn_depth_empty, NULL, ctx,
-                              scratch_pool, scratch_pool));
-  local_ignores_arr = apr_array_make(scratch_pool, 1, sizeof(const char *));
-
-  if (apr_hash_count(local_ignores_hash))
-    {
-      svn_string_t *propval = apr_hash_get(local_ignores_hash, url,
-                                           APR_HASH_KEY_STRING);
-      if (propval)
-        {
-          svn_cstring_split_append(local_ignores_arr, propval->data,
-                                   "\n\r\t\v ", FALSE, scratch_pool);
+  if (!no_autoprops)
+    SVN_ERR(svn_client__get_all_auto_props(&autoprops, url, ctx,
+                                           scratch_pool, iterpool));
+  if (no_ignore)
+    {
+      global_ignores = NULL;
+      local_ignores_arr = NULL;
+    }
+  else
+    {
+      svn_opt_revision_t rev;
+      apr_array_header_t *config_ignores;
+
+      SVN_ERR(svn_client__get_inherited_ignores(&global_ignores, url, ctx,
+                                                scratch_pool, iterpool));
+      SVN_ERR(svn_wc_get_default_ignores(&config_ignores, ctx->config,
+                                         scratch_pool));
+      global_ignores = apr_array_append(scratch_pool, global_ignores,
+                                        config_ignores);
+
+      rev.kind = svn_opt_revision_head;
+      SVN_ERR(svn_client_propget5(&local_ignores_hash, NULL, SVN_PROP_IGNORE, url,
+                                  &rev, &rev, NULL, svn_depth_empty, NULL, ctx,
+                                  scratch_pool, scratch_pool));
+      local_ignores_arr = apr_array_make(scratch_pool, 1, sizeof(const char *));
+
+      if (apr_hash_count(local_ignores_hash))
+        {
+          svn_string_t *propval = apr_hash_get(local_ignores_hash, url,
+                                               APR_HASH_KEY_STRING);
+          if (propval)
+            {
+              svn_cstring_split_append(local_ignores_arr, propval->data,
+                                       "\n\r\t\v ", FALSE, scratch_pool);
+            }
         }
     }
 
@@ -1056,8 +1054,9 @@ svn_client_import5(const char *path,
      the error.  We don't even care if the abort itself fails.  */
   if ((err = import(local_abspath, new_entries, editor, edit_baton,
                     depth, excludes, autoprops, local_ignores_arr,
-                    mandatory_ignores, no_ignore, ignore_unknown_node_types,
-                    filter_callback, filter_baton, ctx, iterpool)))
+                    global_ignores, no_ignore, no_autoprops,
+                    ignore_unknown_node_types, filter_callback,
+                    filter_baton, ctx, iterpool)))
     {
       svn_error_clear(editor->abort_edit(edit_baton, iterpool));
       return svn_error_trace(err);

Modified: subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/deprecated.c Thu Dec 27 03:13:29 2012
@@ -78,6 +78,19 @@ capture_commit_info(const svn_commit_inf
 
 /*** From add.c ***/
 svn_error_t *
+svn_client_add4(const char *path,
+                svn_depth_t depth,
+                svn_boolean_t force,
+                svn_boolean_t no_ignore,
+                svn_boolean_t add_parents,
+                svn_client_ctx_t *ctx,
+                apr_pool_t *pool)
+{
+  return svn_client_add5(path, depth, force, no_ignore, FALSE, add_parents,
+                         ctx, pool);
+}
+
+svn_error_t *
 svn_client_add3(const char *path,
                 svn_boolean_t recursive,
                 svn_boolean_t force,
@@ -398,7 +411,7 @@ svn_client_import4(const char *path,
                    apr_pool_t *pool)
 {
   return svn_error_trace(svn_client_import5(path, url, depth, no_ignore,
-                                            ignore_unknown_node_types,
+                                            FALSE, ignore_unknown_node_types,
                                             revprop_table,
                                             NULL, NULL,
                                             commit_callback, commit_baton,

Modified: subversion/branches/javahl-ra/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/ra.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/ra.c Thu Dec 27 03:13:29 2012
@@ -1033,9 +1033,9 @@ svn_client__ra_provide_base(svn_stream_t
     {
       /* The pristine contents refer to the BASE, or to the pristine of
          a copy/move to this location. Fetch the correct revision.  */
-      SVN_ERR(svn_wc__node_get_commit_base(revision, NULL, NULL, NULL,
-                                           reb->wc_ctx, local_abspath,
-                                           scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__node_get_origin(NULL, revision, NULL, NULL, NULL, NULL,
+                                      reb->wc_ctx, local_abspath, FALSE,
+                                      scratch_pool, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -1078,9 +1078,9 @@ svn_client__ra_provide_props(apr_hash_t 
     {
       /* The pristine props refer to the BASE, or to the pristine props of
          a copy/move to this location. Fetch the correct revision.  */
-      SVN_ERR(svn_wc__node_get_commit_base(revision, NULL, NULL, NULL,
-                                           reb->wc_ctx, local_abspath,
-                                           scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__node_get_origin(NULL, revision, NULL, NULL, NULL, NULL,
+                                      reb->wc_ctx, local_abspath, FALSE,
+                                      scratch_pool, scratch_pool));
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/javahl-ra/subversion/libsvn_client/revisions.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_client/revisions.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_client/revisions.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_client/revisions.c Thu Dec 27 03:13:29 2012
@@ -91,9 +91,9 @@ svn_client__get_revision_number(svn_revn
         if (svn_path_is_url(local_abspath))
           goto invalid_rev_arg;
 
-        err = svn_wc__node_get_commit_base(revnum, NULL, NULL, NULL,
-                                           wc_ctx, local_abspath,
-                                           scratch_pool, scratch_pool);
+        err = svn_wc__node_get_origin(NULL, revnum, NULL, NULL, NULL, NULL,
+                                      wc_ctx, local_abspath, TRUE,
+                                      scratch_pool, scratch_pool);
 
         /* Return the same error as older code did (before and at r935091).
            At least svn_client_proplist4 promises SVN_ERR_ENTRY_NOT_FOUND. */

Modified: subversion/branches/javahl-ra/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_delta/compat.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_delta/compat.c Thu Dec 27 03:13:29 2012
@@ -911,7 +911,7 @@ ev2_abort_edit(void *edit_baton,
 }
 
 /* Return a svn_delta_editor_t * in DEDITOR, with an accompanying baton in
- * DEDITOR_BATON, which will be driven by EDITOR.  These will both be
+ * DEDITOR_BATON, which will drive EDITOR.  These will both be
  * allocated in RESULT_POOL, which may become large and long-lived;
  * SCRATCH_POOL is used for temporary allocations.
  *
@@ -1832,7 +1832,7 @@ do_unlock(void *baton,
   return SVN_NO_ERROR;
 }
 
-/* Return an svn_editor_t * in EDITOR_P which will be driven by
+/* Return an svn_editor_t * in EDITOR_P which will drive
  * DEDITOR/DEDIT_BATON.  EDITOR_P is allocated in RESULT_POOL, which may
  * become large and long-lived; SCRATCH_POOL is used for temporary
  * allocations.

Modified: subversion/branches/javahl-ra/subversion/libsvn_delta/debug_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_delta/debug_editor.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_delta/debug_editor.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_delta/debug_editor.c Thu Dec 27 03:13:29 2012
@@ -52,6 +52,8 @@ write_indent(struct edit_baton *eb, apr_
 {
   int i;
 
+  /* This is DBG_FLAG from ../libsvn_subr/debug.c */
+  SVN_ERR(svn_stream_puts(eb->out, "DBG:"));
   for (i = 0; i < eb->indent_level; ++i)
     SVN_ERR(svn_stream_puts(eb->out, " "));
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_fs_fs/fs_fs.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_fs_fs/fs_fs.c Thu Dec 27 03:13:29 2012
@@ -1273,9 +1273,9 @@ write_config(svn_fs_t *fs,
 "###"                                                                        NL
 "### The following parameter enables deltification for properties on files"  NL
 "### and directories.  Overall, this is a minor tuning option but can save"  NL
-"### some disk space if frequently merge or if you frequently change node"   NL
+"### some disk space if you merge frequently or frequently change node"      NL
 "### properties.  You should not activate this if rep-sharing has been"      NL
-"### disabled."                                                              NL
+"### disabled because this may result in a net increase in repository size." NL
 "### property deltification is disabled by default."                         NL
 "# " CONFIG_OPTION_ENABLE_PROPS_DELTIFICATION " = false"                     NL
 "###"                                                                        NL

Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_local/split_url.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_local/split_url.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_ra_local/split_url.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_ra_local/split_url.c Thu Dec 27 03:13:29 2012
@@ -23,14 +23,13 @@
 
 #include "ra_local.h"
 #include <string.h>
-#include "svn_path.h"
 #include "svn_dirent_uri.h"
 #include "svn_private_config.h"
 
 
 svn_error_t *
 svn_ra_local__split_URL(svn_repos_t **repos,
-                        const char **repos_url,
+                        const char **repos_root_url,
                         const char **fs_path,
                         const char *URL,
                         apr_pool_t *pool)
@@ -38,7 +37,6 @@ svn_ra_local__split_URL(svn_repos_t **re
   svn_error_t *err = SVN_NO_ERROR;
   const char *repos_dirent;
   const char *repos_root_dirent;
-  svn_stringbuf_t *urlbuf;
 
   SVN_ERR(svn_uri_get_dirent_from_file_url(&repos_dirent, URL, pool));
 
@@ -61,18 +59,18 @@ svn_ra_local__split_URL(svn_repos_t **re
     SVN_ERR(svn_repos_remember_client_capabilities(*repos, caps));
   }
 
+  /* = apr_pstrcat(pool,
+                   "/",
+                   svn_dirent_skip_ancestor(repos_root_dirent, repos_dirent),
+                   (const char *)NULL */
   *fs_path = &repos_dirent[strlen(repos_root_dirent)];
 
   if (**fs_path == '\0')
     *fs_path = "/";
 
-  /* Remove the path components in *fs_path from the original URL, to get
-     the URL to the repository root. */
-  urlbuf = svn_stringbuf_create(URL, pool);
-  svn_path_remove_components(urlbuf,
-                             svn_path_component_count(repos_dirent)
-                             - svn_path_component_count(repos_root_dirent));
-  *repos_url = urlbuf->data;
+  /* Create a url to the repository root. */
+  SVN_ERR(svn_uri_get_file_url_from_dirent(repos_root_url, repos_root_dirent,
+                                           pool));
 
   /* Configure hook script environment variables. */
   SVN_ERR(svn_repos_hooks_setenv(*repos, NULL, pool, pool));

Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_ra_serf/property.c Thu Dec 27 03:13:29 2012
@@ -468,10 +468,6 @@ setup_propfind_headers(serf_bucket_t *he
 {
   propfind_context_t *ctx = setup_baton;
 
-  if (ctx->sess->using_compression)
-    {
-      serf_bucket_headers_setn(headers, "Accept-Encoding", "gzip");
-    }
   serf_bucket_headers_setn(headers, "Depth", ctx->depth);
   if (ctx->label)
     {

Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_ra_serf/ra_serf.h Thu Dec 27 03:13:29 2012
@@ -393,6 +393,11 @@ typedef struct svn_ra_serf__handler_t {
   /* The content-type of the request body. */
   const char *body_type;
 
+  /* If TRUE then default Accept-Encoding request header is not configured for
+     request. If FALSE then 'gzip' accept encoding will be used if compression
+     enabled. */
+  svn_boolean_t custom_accept_encoding;
+
   /* Has the request/response been completed?  */
   svn_boolean_t done;
 
@@ -954,6 +959,7 @@ svn_ra_serf__xml_pop_state(svn_ra_serf__
 
 svn_error_t *
 svn_ra_serf__process_pending(svn_ra_serf__xml_parser_t *parser,
+                             svn_boolean_t *network_eof,
                              apr_pool_t *scratch_pool);
 
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_ra_serf/update.c Thu Dec 27 03:13:29 2012
@@ -85,8 +85,8 @@ typedef enum report_state_e {
    since network and parsing behavior (ie. it doesn't pause immediately)
    can make the measurements quite imprecise.
 
-   We measure outstanding requests as the sum of ACTIVE_FETCHES and
-   ACTIVE_PROPFINDS in the report_context_t structure.  */
+   We measure outstanding requests as the sum of NUM_ACTIVE_FETCHES and
+   NUM_ACTIVE_PROPFINDS in the report_context_t structure.  */
 #define REQUEST_COUNT_TO_PAUSE 1000
 #define REQUEST_COUNT_TO_RESUME 100
 
@@ -126,7 +126,7 @@ typedef struct report_dir_t
   /* Our base revision - SVN_INVALID_REVNUM if we're adding this dir. */
   svn_revnum_t base_rev;
 
-  /* controlling dir baton - this is only created in open_dir() */
+  /* controlling dir baton - this is only created in ensure_dir_opened() */
   void *dir_baton;
   apr_pool_t *dir_baton_pool;
 
@@ -342,20 +342,16 @@ struct report_context_t {
   report_dir_t *root_dir;
 
   /* number of pending GET requests */
-  unsigned int active_fetches;
+  unsigned int num_active_fetches;
 
   /* completed fetches (contains report_fetch_t) */
   svn_ra_serf__list_t *done_fetches;
 
   /* number of pending PROPFIND requests */
-  unsigned int active_propfinds;
+  unsigned int num_active_propfinds;
 
   /* completed PROPFIND requests (contains svn_ra_serf__handler_t) */
   svn_ra_serf__list_t *done_propfinds;
-  svn_ra_serf__list_t *done_dir_propfinds;
-
-  /* list of outstanding prop changes (contains report_dir_t) */
-  svn_ra_serf__list_t *active_dir_propfinds;
 
   /* list of files that only have prop changes (contains report_info_t) */
   svn_ra_serf__list_t *file_propchanges_only;
@@ -366,16 +362,43 @@ struct report_context_t {
   /* Are we done parsing the REPORT response? */
   svn_boolean_t done;
 
+  /* Did we receive all data from the network? */
+  svn_boolean_t report_received;
+
   /* Did we get a complete (non-truncated) report? */
   svn_boolean_t report_completed;
 
   /* The XML parser context for the REPORT response.  */
   svn_ra_serf__xml_parser_t *parser_ctx;
-
-  /* Did we close the root directory? */
-  svn_boolean_t closed_root;
 };
 
+/* Returns best connection for fetching files/properties. */
+static svn_ra_serf__connection_t *
+get_best_connection(report_context_t *ctx)
+{
+  svn_ra_serf__connection_t * conn;
+  int first_conn;
+
+  /* Skip the first connection if the REPORT response hasn't been completely
+     received yet. */
+  first_conn = ctx->report_received ? 0: 1;
+
+  if (ctx->sess->num_conns - first_conn == 1)
+    return ctx->sess->conns[first_conn];
+
+  /* Currently just cycle connections. In future we could store number of
+   * pending requests on each connection for better connection usage. */
+  conn = ctx->sess->conns[ctx->sess->cur_conn];
+
+  /* Switch our connection. */
+  ctx->sess->cur_conn++;
+
+  if (ctx->sess->cur_conn >= ctx->sess->num_conns)
+      ctx->sess->cur_conn = first_conn;
+
+  return conn;
+}
+
 
 /** Report state management helper **/
 
@@ -554,7 +577,7 @@ remove_dir_props(void *baton,
 /** Helpers to open and close directories */
 
 static svn_error_t*
-open_dir(report_dir_t *dir)
+ensure_dir_opened(report_dir_t *dir)
 {
   report_context_t *ctx = dir->report_context;
 
@@ -583,7 +606,7 @@ open_dir(report_dir_t *dir)
     }
   else
     {
-      SVN_ERR(open_dir(dir->parent_dir));
+      SVN_ERR(ensure_dir_opened(dir->parent_dir));
 
       dir->dir_baton_pool = svn_pool_create(dir->parent_dir->dir_baton_pool);
 
@@ -679,7 +702,7 @@ static svn_error_t *close_all_dirs(repor
 
   SVN_ERR_ASSERT(! dir->ref_count);
 
-  SVN_ERR(open_dir(dir));
+  SVN_ERR(ensure_dir_opened(dir));
 
   return close_dir(dir);
 }
@@ -824,7 +847,7 @@ open_updated_file(report_info_t *info,
   const svn_delta_editor_t *update_editor = ctx->update_editor;
 
   /* Ensure our parent is open. */
-  SVN_ERR(open_dir(info->dir));
+  SVN_ERR(ensure_dir_opened(info->dir));
   info->editor_pool = svn_pool_create(info->dir->dir_baton_pool);
 
   /* Expand our full name now if we haven't done so yet. */
@@ -1183,44 +1206,6 @@ handle_stream(serf_request_t *request,
   /* not reached */
 }
 
-/* Close the directory represented by DIR -- and any suitable parents
-   thereof -- if we are able to do so.  This is the case whenever:
-
-     - there are no remaining open items within the directory, and
-     - the directory's XML close tag has been processed (so we know
-       there are no more children to worry about in the future), and
-     - either:
-         - we aren't fetching properties for this directory, or
-         - we've already finished fetching those properties.
-*/
-static svn_error_t *
-maybe_close_dir_chain(report_dir_t *dir)
-{
-  report_dir_t *cur_dir = dir;
-
-  while (cur_dir
-         && !cur_dir->ref_count
-         && cur_dir->tag_closed
-         && (!cur_dir->fetch_props || cur_dir->propfind_handler->done))
-    {
-      report_dir_t *parent = cur_dir->parent_dir;
-      report_context_t *report_context = cur_dir->report_context;
-
-      SVN_ERR(close_dir(cur_dir));
-      if (parent)
-        {
-          parent->ref_count--;
-        }
-      else
-        {
-          report_context->closed_root = TRUE;
-        }
-      cur_dir = parent;
-    }
-
-  return SVN_NO_ERROR;
-}
-
 /* Open the file associated with INFO for editing, pass along any
    propchanges we've recorded for it, and then close the file. */
 static svn_error_t *
@@ -1234,7 +1219,6 @@ handle_propchange_only(report_info_t *in
   svn_pool_destroy(info->pool);
 
   info->dir->ref_count--;
-  SVN_ERR(maybe_close_dir_chain(info->dir));
 
   return SVN_NO_ERROR;
 }
@@ -1259,7 +1243,6 @@ handle_local_content(report_info_t *info
   svn_pool_destroy(info->pool);
 
   info->dir->ref_count--;
-  SVN_ERR(maybe_close_dir_chain(info->dir));
 
   return SVN_NO_ERROR;
 }
@@ -1273,7 +1256,7 @@ fetch_file(report_context_t *ctx, report
   svn_ra_serf__handler_t *handler;
 
   /* What connection should we go on? */
-  conn = ctx->sess->conns[ctx->sess->cur_conn];
+  conn = get_best_connection(ctx);
 
   /* go fetch info->name from DAV:checked-in */
   info->url = svn_ra_serf__get_ver_prop(info->props, info->base_name,
@@ -1300,7 +1283,7 @@ fetch_file(report_context_t *ctx, report
       /* Create a serf request for the PROPFIND.  */
       svn_ra_serf__request_create(info->propfind_handler);
 
-      ctx->active_propfinds++;
+      ctx->num_active_propfinds++;
     }
 
   /* If we've been asked to fetch the file or it's an add, do so.
@@ -1397,6 +1380,7 @@ fetch_file(report_context_t *ctx, report
           handler->conn = conn;
           handler->session = ctx->sess;
 
+          handler->custom_accept_encoding = TRUE;
           handler->header_delegate = headers_fetch;
           handler->header_delegate_baton = fetch_ctx;
 
@@ -1410,7 +1394,7 @@ fetch_file(report_context_t *ctx, report
 
           svn_ra_serf__request_create(handler);
 
-          ctx->active_fetches++;
+          ctx->num_active_fetches++;
         }
     }
   else if (info->propfind_handler)
@@ -1433,7 +1417,8 @@ fetch_file(report_context_t *ctx, report
       SVN_ERR(handle_propchange_only(info, info->pool));
     }
 
-  if (ctx->active_fetches + ctx->active_propfinds > REQUEST_COUNT_TO_PAUSE)
+  if (ctx->num_active_fetches + ctx->num_active_propfinds
+      > REQUEST_COUNT_TO_PAUSE)
     ctx->parser_ctx->paused = TRUE;
 
   return SVN_NO_ERROR;
@@ -1704,7 +1689,7 @@ start_report(svn_ra_serf__xml_parser_t *
 
       info = parser->state->private;
 
-      SVN_ERR(open_dir(info->dir));
+      SVN_ERR(ensure_dir_opened(info->dir));
 
       tmppool = svn_pool_create(info->dir->dir_baton_pool);
 
@@ -1734,7 +1719,7 @@ start_report(svn_ra_serf__xml_parser_t *
 
       info = parser->state->private;
 
-      SVN_ERR(open_dir(info->dir));
+      SVN_ERR(ensure_dir_opened(info->dir));
 
       SVN_ERR(ctx->update_editor->absent_directory(
                                         svn_relpath_join(info->name, file_name,
@@ -1759,7 +1744,7 @@ start_report(svn_ra_serf__xml_parser_t *
 
       info = parser->state->private;
 
-      SVN_ERR(open_dir(info->dir));
+      SVN_ERR(ensure_dir_opened(info->dir));
 
       SVN_ERR(ctx->update_editor->absent_file(
                                         svn_relpath_join(info->name, file_name,
@@ -1984,29 +1969,22 @@ end_report(svn_ra_serf__xml_parser_t *pa
        */
       if (info->dir->fetch_props)
         {
-          svn_ra_serf__list_t *list_item;
-
           SVN_ERR(svn_ra_serf__deliver_props(&info->dir->propfind_handler,
                                              info->dir->props, ctx->sess,
-                                             ctx->sess->conns[ctx->sess->cur_conn],
+                                             get_best_connection(ctx),
                                              info->dir->url,
                                              ctx->target_rev, "0",
                                              all_props,
-                                             &ctx->done_dir_propfinds,
+                                             &ctx->done_propfinds,
                                              info->dir->pool));
           SVN_ERR_ASSERT(info->dir->propfind_handler);
 
           /* Create a serf request for the PROPFIND.  */
           svn_ra_serf__request_create(info->dir->propfind_handler);
 
-          ctx->active_propfinds++;
+          ctx->num_active_propfinds++;
 
-          list_item = apr_pcalloc(info->dir->pool, sizeof(*list_item));
-          list_item->data = info->dir;
-          list_item->next = ctx->active_dir_propfinds;
-          ctx->active_dir_propfinds = list_item;
-
-          if (ctx->active_fetches + ctx->active_propfinds
+          if (ctx->num_active_fetches + ctx->num_active_propfinds
               > REQUEST_COUNT_TO_PAUSE)
             ctx->parser_ctx->paused = TRUE;
         }
@@ -2361,16 +2339,16 @@ link_path(void *report_baton,
 #define REQS_PER_CONN 8
 
 /** This function creates a new connection for this serf session, but only
- * if the number of ACTIVE_REQS > REQS_PER_CONN or if there currently is
+ * if the number of NUM_ACTIVE_REQS > REQS_PER_CONN or if there currently is
  * only one main connection open.
  */
 static svn_error_t *
-open_connection_if_needed(svn_ra_serf__session_t *sess, int active_reqs)
+open_connection_if_needed(svn_ra_serf__session_t *sess, int num_active_reqs)
 {
   /* For each REQS_PER_CONN outstanding requests open a new connection, with
    * a minimum of 1 extra connection. */
   if (sess->num_conns == 1 ||
-      ((active_reqs / REQS_PER_CONN) > sess->num_conns))
+      ((num_active_reqs / REQS_PER_CONN) > sess->num_conns))
     {
       int cur = sess->num_conns;
       apr_status_t status;
@@ -2416,21 +2394,6 @@ create_update_report_body(serf_bucket_t 
 }
 
 static svn_error_t *
-headers_report(serf_bucket_t *headers,
-               void *baton,
-               apr_pool_t *pool)
-{
-  report_context_t *report = baton;
-
-  if (report->sess->using_compression)
-    {
-      serf_bucket_headers_setn(headers, "Accept-Encoding", "gzip");
-    }
-
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
 finish_report(void *report_baton,
               apr_pool_t *pool)
 {
@@ -2439,6 +2402,7 @@ finish_report(void *report_baton,
   svn_ra_serf__handler_t *handler;
   svn_ra_serf__xml_parser_t *parser_ctx;
   const char *report_target;
+  svn_boolean_t closed_root;
   svn_stringbuf_t *buf = NULL;
   apr_pool_t *iterpool = svn_pool_create(pool);
   svn_error_t *err;
@@ -2477,8 +2441,6 @@ finish_report(void *report_baton,
   handler->body_type = "text/xml";
   handler->conn = sess->conns[0];
   handler->session = sess;
-  handler->header_delegate = headers_report;
-  handler->header_delegate_baton = report;
 
   parser_ctx = apr_pcalloc(pool, sizeof(*parser_ctx));
 
@@ -2501,13 +2463,16 @@ finish_report(void *report_baton,
   SVN_ERR(open_connection_if_needed(sess, 0));
 
   sess->cur_conn = 1;
+  closed_root = FALSE;
 
   /* Note that we may have no active GET or PROPFIND requests, yet the
      processing has not been completed. This could be from a delay on the
      network or because we've spooled the entire response into our "pending"
      content of the XML parser. The DONE flag will get set when all the
      XML content has been received *and* parsed.  */
-  while (!report->done || report->active_fetches || report->active_propfinds)
+  while (!report->done
+         || report->num_active_fetches
+         || report->num_active_propfinds)
     {
       apr_pool_t *iterpool_inner;
       svn_ra_serf__list_t *done_list;
@@ -2569,66 +2534,8 @@ finish_report(void *report_baton,
 
       /* Open extra connections if we have enough requests to send. */
       if (sess->num_conns < MAX_NR_OF_CONNS)
-        SVN_ERR(open_connection_if_needed(sess, report->active_fetches +
-                                          report->active_propfinds));
-
-      /* Switch our connection. */
-      if (!report->done)
-         if (++sess->cur_conn == sess->num_conns)
-             sess->cur_conn = 1;
-
-      /* Prune directory propfinds that are finished. */
-      done_list = report->done_dir_propfinds;
-      while (done_list)
-        {
-          report->active_propfinds--;
-
-          if (report->active_dir_propfinds)
-            {
-              svn_ra_serf__list_t *cur, *prev;
-
-              prev = NULL;
-              cur = report->active_dir_propfinds;
-
-              while (cur)
-                {
-                  report_dir_t *item = cur->data;
-
-                  if (item->propfind_handler == done_list->data)
-                    {
-                      break;
-                    }
-
-                  prev = cur;
-                  cur = cur->next;
-                }
-
-              /* If we found a match, set the new props and remove this
-               * propchange from our list.
-               */
-              if (cur)
-                {
-                  report_dir_t *cur_dir = cur->data;
-
-                  if (!prev)
-                    {
-                      report->active_dir_propfinds = cur->next;
-                    }
-                  else
-                    {
-                      prev->next = cur->next;
-                    }
-
-                  /* See if this directory (and perhaps even parents of that)
-                     can be closed now. */
-                  SVN_ERR(open_dir(cur_dir));
-                  SVN_ERR(maybe_close_dir_chain(cur_dir));
-                }
-            }
-
-          done_list = done_list->next;
-        }
-      report->done_dir_propfinds = NULL;
+        SVN_ERR(open_connection_if_needed(sess, report->num_active_fetches +
+                                          report->num_active_propfinds));
 
       /* prune our propfind list if they are done. */
       done_list = report->done_propfinds;
@@ -2636,7 +2543,7 @@ finish_report(void *report_baton,
         {
           svn_pool_clear(iterpool_inner);
 
-          report->active_propfinds--;
+          report->num_active_propfinds--;
 
           /* If we have some files that we won't be fetching the content
            * for, ensure that we update the file with any altered props.
@@ -2709,20 +2616,42 @@ finish_report(void *report_baton,
           cur_dir->ref_count--;
 
           /* Decrement our active fetch count. */
-          report->active_fetches--;
+          report->num_active_fetches--;
 
           done_list = done_list->next;
 
-          /* See if the parent directory of this fetched item (and
-             perhaps even parents of that) can be closed now. */
-          SVN_ERR(maybe_close_dir_chain(cur_dir));
+          /* If we have a valid directory and
+           * we have no open items in this dir and
+           * we've closed the directory tag (no more children can be added)
+           * and either:
+           *   we know we won't be fetching props or
+           *   we've already completed the propfind
+           * then, we know it's time for us to close this directory.
+           */
+          while (cur_dir && !cur_dir->ref_count && cur_dir->tag_closed
+                 && (!cur_dir->fetch_props
+                     || cur_dir->propfind_handler->done))
+            {
+              report_dir_t *parent = cur_dir->parent_dir;
+
+              SVN_ERR(close_dir(cur_dir));
+              if (parent)
+                {
+                  parent->ref_count--;
+                }
+              else
+                {
+                  closed_root = TRUE;
+                }
+              cur_dir = parent;
+            }
         }
       report->done_fetches = NULL;
 
       /* If the parser is paused, and the number of active requests has
          dropped far enough, then resume parsing.  */
       if (parser_ctx->paused
-          && (report->active_fetches + report->active_propfinds
+          && (report->num_active_fetches + report->num_active_propfinds
               < REQUEST_COUNT_TO_RESUME))
         parser_ctx->paused = FALSE;
 
@@ -2730,7 +2659,9 @@ finish_report(void *report_baton,
          present (we can't know for sure because of the private structure),
          then go process the pending content.  */
       if (!parser_ctx->paused && parser_ctx->pending != NULL)
-        SVN_ERR(svn_ra_serf__process_pending(parser_ctx, iterpool_inner));
+        SVN_ERR(svn_ra_serf__process_pending(parser_ctx,
+                                             &report->report_received,
+                                             iterpool_inner));
 
       /* Debugging purposes only! */
       for (i = 0; i < sess->num_conns; i++)
@@ -2739,16 +2670,18 @@ finish_report(void *report_baton,
         }
     }
 
-  /* Ensure that we opened and closed our root dir and that we closed
-   * all of our children. */
-  if (report->closed_root == FALSE && report->root_dir != NULL)
-    {
-      SVN_ERR(close_all_dirs(report->root_dir));
-    }
-
   /* If we got a complete report, close the edit.  Otherwise, abort it. */
   if (report->report_completed)
-    err = report->update_editor->close_edit(report->update_baton, iterpool);
+    {
+      /* Ensure that we opened and closed our root dir and that we closed
+       * all of our children. */
+      if (closed_root == FALSE && report->root_dir != NULL)
+        {
+          SVN_ERR(close_all_dirs(report->root_dir));
+        }
+
+      err = report->update_editor->close_edit(report->update_baton, iterpool);
+    }
   else
     err = svn_error_create(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL,
                            _("Missing update-report close tag"));
@@ -3162,6 +3095,7 @@ svn_ra_serf__get_file(svn_ra_session_t *
           handler->conn = conn;
           handler->session = session;
 
+          handler->custom_accept_encoding = TRUE;
           handler->header_delegate = headers_fetch;
           handler->header_delegate_baton = stream_ctx;
 

Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/util.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_ra_serf/util.c Thu Dec 27 03:13:29 2012
@@ -636,6 +636,7 @@ setup_serf_req(serf_request_t *request,
                svn_ra_serf__session_t *session,
                const char *method, const char *url,
                serf_bucket_t *body_bkt, const char *content_type,
+               const char *accept_encoding,
                apr_pool_t *request_pool,
                apr_pool_t *scratch_pool)
 {
@@ -696,6 +697,11 @@ setup_serf_req(serf_request_t *request,
       serf_bucket_headers_setn(*hdrs_bkt, "Connection", "keep-alive");
 #endif
 
+  if (accept_encoding)
+    {
+      serf_bucket_headers_setn(*hdrs_bkt, "Accept-Encoding", accept_encoding);
+    }
+
   /* These headers need to be sent with every request; see issue #3255
      ("mod_dav_svn does not pass client capabilities to start-commit
      hooks") for why. */
@@ -1389,45 +1395,65 @@ xml_parser_cleanup(void *baton)
   return APR_SUCCESS;
 }
 
+/* Limit the amount of pending content to parse at once to < 100KB per
+   iteration. This number is chosen somewhat arbitrarely. Making it lower
+   will have a drastical negative impact on performance, whereas increasing it
+   increases the risk for connection timeouts.
+ */
+#define PENDING_TO_PARSE PARSE_CHUNK_SIZE * 5
+
 svn_error_t *
 svn_ra_serf__process_pending(svn_ra_serf__xml_parser_t *parser,
+                             svn_boolean_t *network_eof,
                              apr_pool_t *scratch_pool)
 {
+  svn_boolean_t pending_empty = FALSE;
+  apr_size_t cur_read = 0;
+
   /* Fast path exit: already paused, nothing to do, or already done.  */
   if (parser->paused || parser->pending == NULL || *parser->done)
-    return SVN_NO_ERROR;
-
-  /* ### it is possible that the XML parsing of the pending content is
-     ### so slow, and that we don't return to reading the connection
-     ### fast enough... that the server will disconnect us. right now,
-     ### that is highly improbable, but is noted for future's sake.
-     ### should that ever happen, the loops in this function can simply
-     ### terminate after N seconds.  */
+    {
+      *network_eof = parser->pending ? parser->pending->network_eof : FALSE;
+      return SVN_NO_ERROR;
+    }
 
-  /* Try to read everything from the spillbuf.  */
-  while (TRUE)
+  /* Parsing the pending conten in the spillbuf will result in many disc i/o
+     operations. This can be so slow that we don't run the network event
+     processing loop often enough, resulting in timed out connections.
+   
+     So we limit the amounts of bytes parsed per iteration.
+   */
+  while (cur_read < PENDING_TO_PARSE)
     {
       const char *data;
       apr_size_t len;
 
       /* Get a block of content, stopping the loop when we run out.  */
       SVN_ERR(svn_spillbuf__read(&data, &len, parser->pending->buf,
-                                 scratch_pool));
-      if (data == NULL)
-        break;
-
-      /* Inject the content into the XML parser.  */
-      SVN_ERR(inject_to_parser(parser, data, len, NULL));
-
-      /* If the XML parsing callbacks paused us, then we're done for now.  */
-      if (parser->paused)
-        return SVN_NO_ERROR;
+                             scratch_pool));
+      if (data)
+        {
+          /* Inject the content into the XML parser.  */
+          SVN_ERR(inject_to_parser(parser, data, len, NULL));
+
+          /* If the XML parsing callbacks paused us, then we're done for now.  */
+          if (parser->paused)
+            break;
+
+          cur_read += len;
+        }
+      else
+        {
+          /* The buffer is empty. */
+          pending_empty = TRUE;
+          break;
+        }
     }
-  /* All stored content (memory and file) has now been exhausted.  */
 
   /* If the PENDING structures are empty *and* we consumed all content from
      the network, then we're completely done with the parsing.  */
-  if (parser->pending->network_eof)
+  if (pending_empty &&
+      parser->pending->network_eof)
     {
       SVN_ERR_ASSERT(parser->xmlp != NULL);
 
@@ -1440,8 +1466,11 @@ svn_ra_serf__process_pending(svn_ra_serf
       add_done_item(parser);
     }
 
+  *network_eof = parser->pending ? parser->pending->network_eof : FALSE;
+
   return SVN_NO_ERROR;
 }
+#undef PENDING_TO_PARSE
 
 
 /* ### this is still broken conceptually. just shifting incrementally... */
@@ -2051,6 +2080,7 @@ setup_request(serf_request_t *request,
 {
   serf_bucket_t *body_bkt;
   serf_bucket_t *headers_bkt;
+  const char *accept_encoding;
 
   if (handler->body_delegate)
     {
@@ -2065,9 +2095,23 @@ setup_request(serf_request_t *request,
       body_bkt = NULL;
     }
 
+  if (handler->custom_accept_encoding)
+    {
+      accept_encoding = NULL;
+    }
+  else if (handler->session->using_compression)
+    {
+      /* Accept gzip compression if enabled. */
+      accept_encoding = "gzip";
+    }
+  else
+    {
+      accept_encoding = NULL;
+    }
+
   SVN_ERR(setup_serf_req(request, req_bkt, &headers_bkt,
                          handler->session, handler->method, handler->path,
-                         body_bkt, handler->body_type,
+                         body_bkt, handler->body_type, accept_encoding,
                          request_pool, scratch_pool));
 
   if (handler->header_delegate)

Modified: subversion/branches/javahl-ra/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_ra_svn/client.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_ra_svn/client.c Thu Dec 27 03:13:29 2012
@@ -325,6 +325,11 @@ static svn_ra_reporter3_t ra_svn_reporte
   ra_svn_abort_report
 };
 
+/* Set *REPORTER and *REPORT_BATON to a new reporter which will drive
+ * EDITOR/EDIT_BATON when it gets the finish_report() call.
+ *
+ * Allocate the new reporter in POOL.
+ */
 static svn_error_t *
 ra_svn_get_reporter(svn_ra_svn__session_baton_t *sess_baton,
                     apr_pool_t *pool,

Modified: subversion/branches/javahl-ra/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_subr/dirent_uri.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_subr/dirent_uri.c Thu Dec 27 03:13:29 2012
@@ -2402,7 +2402,17 @@ svn_uri_get_file_url_from_dirent(const c
       *url = apr_pstrcat(pool, "file:", dirent, NULL);
     }
   else
-    *url = apr_pstrcat(pool, "file:///", dirent, NULL);
+    {
+      char *uri = apr_pstrcat(pool, "file:///", dirent, NULL);
+      apr_size_t len = 8 /* strlen("file:///") */ + strlen(dirent);
+
+      /* "C:/" is a canonical dirent on Windows,
+         but "file:///C:/" is not a canonical uri */
+      if (uri[len-1] == '/')
+        uri[len-1] = '\0';
+
+      *url = uri;
+    }
 #endif
 
   return SVN_NO_ERROR;

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/adm_files.c Thu Dec 27 03:13:29 2012
@@ -403,6 +403,9 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
                             apr_pool_t *scratch_pool)
 {
   int format;
+  const char *original_repos_relpath;
+  const char *original_root_url;
+  svn_boolean_t is_op_root;
   const char *repos_relpath = svn_uri_skip_ancestor(repos_root_url, url,
                                                     scratch_pool);
   svn_wc__db_status_t status;
@@ -428,9 +431,10 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
   SVN_ERR(svn_wc__db_read_info(&status, NULL,
                                &db_revision, &db_repos_relpath,
                                &db_repos_root_url, &db_repos_uuid,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL,
+                               &original_repos_relpath, &original_root_url,
+                               NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, &is_op_root, NULL, NULL,
                                NULL, NULL, NULL,
                                db, local_abspath, scratch_pool, scratch_pool));
 
@@ -469,26 +473,17 @@ svn_wc__internal_ensure_adm(svn_wc__db_t
 
       /* The caller gives us a URL which should match the entry. However,
          some callers compensate for an old problem in entry->url and pass
-         the copyfrom_url instead. See ^/notes/api-errata/wc002.txt. As
+         the copyfrom_url instead. See ^/notes/api-errata/1.7/wc002.txt. As
          a result, we allow the passed URL to match copyfrom_url if it
          does not match the entry's primary URL.  */
-      /* ### comparing URLs, should they be canonicalized first? */
       if (strcmp(db_repos_uuid, repos_uuid)
           || strcmp(db_repos_root_url, repos_root_url)
           || !svn_relpath_skip_ancestor(db_repos_relpath, repos_relpath))
         {
-          const char *copyfrom_root_url, *copyfrom_repos_relpath;
-
-          SVN_ERR(svn_wc__internal_get_copyfrom_info(&copyfrom_root_url,
-                                                     &copyfrom_repos_relpath,
-                                                     NULL, NULL, NULL,
-                                                     db, local_abspath,
-                                                     scratch_pool,
-                                                     scratch_pool));
-
-          if (copyfrom_root_url == NULL
-              || strcmp(copyfrom_root_url, repos_root_url)
-              || strcmp(copyfrom_repos_relpath, repos_relpath))
+          if (!is_op_root /* copy_from was set on op-roots only */
+              || original_root_url == NULL
+              || strcmp(original_root_url, repos_root_url)
+              || strcmp(original_repos_relpath, repos_relpath))
             return
               svn_error_createf(SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
                                 _("URL '%s' (uuid: '%s') doesn't match existing "

Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/info.c?rev=1426110&r1=1426109&r2=1426110&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/info.c Thu Dec 27 03:13:29 2012
@@ -94,6 +94,7 @@ build_info_for_node(svn_wc__info2_t **in
   svn_boolean_t conflicted;
   svn_boolean_t op_root;
   svn_boolean_t have_base;
+  svn_boolean_t have_more_work;
   svn_wc_info_t *wc_info;
 
   tmpinfo = apr_pcalloc(result_pool, sizeof(*tmpinfo));
@@ -118,7 +119,7 @@ build_info_for_node(svn_wc__info2_t **in
                                &wc_info->recorded_time,
                                &wc_info->changelist,
                                &conflicted, &op_root, NULL, NULL,
-                               &have_base, NULL, NULL,
+                               &have_base, &have_more_work, NULL,
                                db, local_abspath,
                                result_pool, scratch_pool));
 
@@ -188,9 +189,30 @@ build_info_for_node(svn_wc__info2_t **in
 
       /* ### We should be able to avoid both these calls with the information
          from read_info() in most cases */
-      SVN_ERR(svn_wc__internal_node_get_schedule(&wc_info->schedule, NULL,
-                                                 db, local_abspath,
-                                                 scratch_pool));
+      if (! op_root)
+        wc_info->schedule = svn_wc_schedule_normal;
+      else if (! have_more_work && ! have_base)
+        wc_info->schedule = svn_wc_schedule_add;
+      else
+        {
+          svn_wc__db_status_t below_working;
+          svn_boolean_t have_work;
+
+          SVN_ERR(svn_wc__db_info_below_working(&have_base, &have_work,
+                                                &below_working,
+                                                db, local_abspath,
+                                                scratch_pool));
+
+          /* If the node is not present or deleted (read: not present
+             in working), then the node is not a replacement */
+          if (below_working != svn_wc__db_status_not_present
+              && below_working != svn_wc__db_status_deleted)
+            {
+              wc_info->schedule = svn_wc_schedule_replace;
+            }
+          else
+            wc_info->schedule = svn_wc_schedule_add;
+        }
       SVN_ERR(svn_wc__db_read_url(&tmpinfo->URL, db, local_abspath,
                                 result_pool, scratch_pool));
     }