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

svn commit: r993127 [2/11] - in /subversion/branches/performance: ./ build/ build/generator/ notes/ notes/tree-conflicts/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/bindings/javahl/src/org...

Modified: subversion/branches/performance/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_io.h?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_io.h (original)
+++ subversion/branches/performance/subversion/include/svn_io.h Mon Sep  6 19:13:39 2010
@@ -755,13 +755,6 @@ typedef svn_error_t *(*svn_write_fn_t)(v
 /** Close handler function for a generic stream.  @see svn_stream_t. */
 typedef svn_error_t *(*svn_close_fn_t)(void *baton);
 
-/** Reset handler function for a generic stream. @see svn_stream_t and
- * svn_stream_reset().
- *
- * @since New in 1.7.
- */
-typedef svn_error_t *(*svn_io_reset_fn_t)(void *baton);
-
 /** An opaque type which represents a mark on a stream.
  *
  * @see svn_stream_mark().
@@ -826,14 +819,6 @@ void
 svn_stream_set_close(svn_stream_t *stream,
                      svn_close_fn_t close_fn);
 
-/** Set @a stream's reset function to @a reset_fn
- *
- * @since New in 1.7.
- */
-void
-svn_stream_set_reset(svn_stream_t *stream,
-                     svn_io_reset_fn_t reset_fn);
-
 /** Set @a stream's mark function to @a mark_fn
  *
  * @since New in 1.7.
@@ -1136,7 +1121,8 @@ svn_stream_mark(svn_stream_t *stream,
 
 /** Seek to a @a mark in a generic @a stream.
  * This function returns the #SVN_ERR_STREAM_SEEK_NOT_SUPPORTED error
- * if the stream doesn't implement seeking.
+ * if the stream doesn't implement seeking. Passing NULL as @a mark,
+ * seeks to the start of the stream.
  *
  * @see svn_stream_mark()
  * @since New in 1.7.
@@ -1422,7 +1408,9 @@ svn_io_remove_dir(const char *path,
  * apr_dir_read() are NOT returned in the hash.
  *
  * @since New in 1.4.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_io_get_dir_filenames(apr_hash_t **dirents,
                          const char *path,
@@ -1495,19 +1483,38 @@ typedef svn_error_t * (*svn_io_walk_func
                                             const apr_finfo_t *finfo,
                                             apr_pool_t *pool);
 
-/** This function will recursively walk over the files and directories
- * rooted at @a dirname, a utf8-encoded path. For each file or directory,
- * @a walk_func is invoked, passing in the @a walk_baton, the utf8-encoded
- * full path to the entry, an @c apr_finfo_t structure, and a temporary
- * pool for allocations.  For any directory, @a walk_func will be invoked
- * on the directory itself before being invoked on any subdirectories or
- * files within the directory.
+/** Recursively walk the directory rooted at @a dirname, a
+ * utf8-encoded path, invoking @a walk_func (with @a walk_baton) for
+ * each item in the tree.  For a given directory, invoke @a walk_func
+ * on the directory itself before invoking it on any children thereof.
+ *
+ * Deliver to @a walk_func the information specified by @a wanted,
+ * plus the items specified by @c APR_FINFO_TYPE and @c APR_FINFO_NAME.
+ *
+ * Use @a pool for all allocations.
+ *
+ * @note This function does not currently pass all file types to @a
+ * walk_func -- only APR_DIR, APR_REG, and APR_LNK.  We reserve the
+ * right to pass additional file types through this interface in the
+ * future, though, so implementations of this callback should
+ * explicitly test FINFO->filetype.  See the APR library's
+ * apr_filetype_e enum for the various filetypes and their meanings.
  *
- * The set of information passed to @a walk_func is specified by @a wanted,
- * and the items specified by @c APR_FINFO_TYPE and @c APR_FINFO_NAME.
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_io_dir_walk2(const char *dirname,
+                 apr_int32_t wanted,
+                 svn_io_walk_func_t walk_func,
+                 void *walk_baton,
+                 apr_pool_t *pool);
+
+/** Similar to svn_io_dir_walk(), but only calls @a walk_func for
+ * files of type APR_DIR (directory) and APR_REG (regular file).
  *
- * All allocations will be performed in @a pool.
+ * @deprecated Provided for backwards compatibility with the 1.6 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_io_dir_walk(const char *dirname,
                 apr_int32_t wanted,

Modified: subversion/branches/performance/subversion/include/svn_props.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_props.h?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_props.h (original)
+++ subversion/branches/performance/subversion/include/svn_props.h Mon Sep  6 19:13:39 2010
@@ -110,6 +110,8 @@ svn_prop_hash_dup(apr_hash_t *hash,
  * Return the value of property @a prop_name as it is in @a properties,
  * with values <tt>const svn_string_t</tt>. If @a prop_name is not
  * in @a properties or @ properties is NULL, return NULL.
+ *
+ * @since New in 1.7.
  */
 const char *
 svn_prop_get_value(apr_hash_t *properties,

Modified: subversion/branches/performance/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_ra.h?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_ra.h (original)
+++ subversion/branches/performance/subversion/include/svn_ra.h Mon Sep  6 19:13:39 2010
@@ -777,8 +777,8 @@ svn_ra_rev_prop(svn_ra_session_t *sessio
  * or @c SVN_PROP_REVISION_AUTHOR.
  *
  * Before @c close_edit returns, but after the commit has succeeded,
- * it will invoke @a callback with the new revision number, the
- * commit date (as a <tt>const char *</tt>), commit author (as a
+ * it will invoke @a callback (if non-NULL) with the new revision number,
+ * the commit date (as a <tt>const char *</tt>), commit author (as a
  * <tt>const char *</tt>), and @a callback_baton as arguments.  If
  * @a callback returns an error, that error will be returned from @c
  * close_edit, otherwise @c close_edit will return successfully

Modified: subversion/branches/performance/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_repos.h?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_repos.h (original)
+++ subversion/branches/performance/subversion/include/svn_repos.h Mon Sep  6 19:13:39 2010
@@ -2296,11 +2296,15 @@ svn_repos_node_from_baton(void *edit_bat
 #define SVN_REPOS_DUMPFILE_NODE_ACTION               "Node-action"
 #define SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH        "Node-copyfrom-path"
 #define SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV         "Node-copyfrom-rev"
+/** @since New in 1.6. */
 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5      "Text-copy-source-md5"
+/** @since New in 1.6. */
 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_SHA1     "Text-copy-source-sha1"
 #define SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_CHECKSUM \
                                         SVN_REPOS_DUMPFILE_TEXT_COPY_SOURCE_MD5
+/** @since New in 1.6. */
 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5          "Text-content-md5"
+/** @since New in 1.6. */
 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_SHA1         "Text-content-sha1"
 #define SVN_REPOS_DUMPFILE_TEXT_CONTENT_CHECKSUM     \
                                         SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5
@@ -2312,13 +2316,17 @@ svn_repos_node_from_baton(void *edit_bat
 #define SVN_REPOS_DUMPFILE_PROP_DELTA                "Prop-delta"
 /** @since New in 1.1. */
 #define SVN_REPOS_DUMPFILE_TEXT_DELTA                "Text-delta"
-/** @since New in 1.5. */
+/** @since New in 1.6. */
 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5       "Text-delta-base-md5"
 /** @since New in 1.6. */
 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_SHA1      "Text-delta-base-sha1"
-/** @since New in 1.6. */
+/** @since New in 1.5. */
 #define SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_CHECKSUM  \
                                         SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5
+/** @since New in 1.7. */
+#define SVN_REPOS_DUMPFILE_PROP_CONTENT_MD5          "Prop-content-md5"
+/** @since New in 1.7. */
+#define SVN_REPOS_DUMPFILE_PROP_CONTENT_SHA1         "Prop-content-sha1"
 
 /**
  * Verify the contents of the file system in @a repos.

Modified: subversion/branches/performance/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/include/svn_wc.h?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/include/svn_wc.h (original)
+++ subversion/branches/performance/subversion/include/svn_wc.h Mon Sep  6 19:13:39 2010
@@ -5725,11 +5725,14 @@ svn_wc_get_pristine_props(apr_hash_t **p
                           apr_pool_t *scratch_pool);
                           
 
-/** Set @a *value to the value of property @a name for @a path, allocating
- * @a *value in @a pool.  If no such prop, set @a *value to @c NULL.
- * @a name may be a regular or wc property; if it is an entry property,
- * return the error #SVN_ERR_BAD_PROP_KIND.  @a adm_access is an access
- * baton set that contains @a path.
+/** Set @a *value to the value of property @a name for @a local_abspath,
+ * allocating @a *value in @a result_pool.  If no such prop, set @a *value
+ * to @c NULL. @a name may be a regular or wc property; if it is an
+ * entry property, return the error #SVN_ERR_BAD_PROP_KIND.  @a wc_ctx
+ * is used to access the working copy.
+ *
+ * If @a local_abspath is not a versioned path, return
+ * #SVN_ERR_WC_PATH_NOT_FOUND
  *
  * @since New in 1.7.
  */
@@ -5744,6 +5747,8 @@ svn_wc_prop_get2(const svn_string_t **va
 /** Similar to svn_wc_prop_get2(), but with a #svn_wc_adm_access_t /
  * relative path parameter pair.
  *
+ * When @a path is not versioned, set @a *value to NULL.
+ *
  * @deprecated Provided for backwards compatibility with the 1.6 API.
  */
 SVN_DEPRECATED
@@ -6984,10 +6989,10 @@ svn_wc_create_tmp_file(apr_file_t **fp,
 
 /* EOL conversion and keyword expansion. */
 
-/** Set @a xlated_abspath to a translated copy of @a src
+/** Set @a xlated_path to a translated copy of @a src
  * or to @a src itself if no translation is necessary.
- * That is, if @a versioned_abspath's properties indicate newline conversion
- * or keyword expansion, point @a *xlated_abspath to a copy of @a src
+ * That is, if @a versioned_file's properties indicate newline conversion or
+ * keyword expansion, point @a *xlated_path to a copy of @a src
  * whose newlines and keywords are converted using the translation
  * as requested by @a flags.
  *
@@ -7004,38 +7009,19 @@ svn_wc_create_tmp_file(apr_file_t **fp,
  * #SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags.
  *
  * This function is generally used to get a file that can be compared
- * meaningfully against @a versioned_abspath's text base, if
- * #SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_abspath itself
- * if #SVN_WC_TRANSLATE_FROM_NF is specified.
- *
- * The output file is created in the temp file area belonging to
- * @a versioned_abspath. By default it will be deleted at result_pool
- * cleanup. If @a flags includes #SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
- * the default result_pool cleanup handler to remove @a *xlated_abspath is
- * not registered.
+ * meaningfully against @a versioned_file's text base, if
+ * @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself
+ * if @c SVN_WC_TRANSLATE_FROM_NF is specified.
  *
- * If an error is returned, the effect on @a *xlated_abspath is undefined.
+ * Output files are created in the temp file area belonging to
+ * @a versioned_file.  By default they will be deleted at pool cleanup.
  *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_file3(const char **xlated_abspath,
-                        const char *src,
-                        svn_wc_context_t *wc_ctx,
-                        const char *versioned_abspath,
-                        apr_uint32_t flags,
-                        svn_cancel_func_t cancel_func,
-                        void *cancel_baton,
-                        apr_pool_t *result_pool,
-                        apr_pool_t *scratch_pool);
-
-
-/** Similar to svn_wc_translated_file3(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths, with
- * a single pool, and no cancellation func/baton.
+ * If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the default
+ * pool cleanup handler to remove @a *xlated_path is not registered.
  *
- * @since New in 1.4.
- * @deprecated Provided for compatibility with the 1.6 API
+ * If an error is returned, the effect on @a *xlated_path is undefined.
+ *
+ * @since New in 1.4
  */
 SVN_DEPRECATED
 svn_error_t *
@@ -7061,10 +7047,9 @@ svn_wc_translated_file(const char **xlat
                        apr_pool_t *pool);
 
 
-/** Set @a stream to a stream allocated in @a result_pool, that will
- * translate *to* normal form while reading, or *from* normal form while
- * writing @a local_abspath.  The translation will take the file properties
- * from @a versioned_abspath using @a wc_ctx.
+/** Returns a @a stream allocated in @a pool with access to the given
+ * @a path taking the file properties from @a versioned_file using
+ * @a adm_access.
  *
  * If @a flags includes #SVN_WC_TRANSLATE_FROM_NF, the stream will
  * translate from Normal Form to working copy form while writing to
@@ -7076,24 +7061,7 @@ svn_wc_translated_file(const char **xlat
  * The @a flags are the same constants as those used for
  * svn_wc_translated_file().
  *
- * Use @a scratch_pool for temporary allocations.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_stream2(svn_stream_t **stream,
-                          svn_wc_context_t *wc_ctx,
-                          const char *local_abspath,
-                          const char *versioned_abspath,
-                          apr_uint32_t flags,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool);
-
-/** Similar to svn_wc_translated_stream2(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths.
- *
  * @since New in 1.5.
- * @deprecated Provided for compatibility with the 1.6 API
  */
 SVN_DEPRECATED
 svn_error_t *
@@ -7112,14 +7080,6 @@ svn_wc_translated_stream(svn_stream_t **
  * matching @a file_baton) through @a editor, then close @a file_baton
  * afterwards.  Use @a scratch_pool for any temporary allocation.
  *
- * If @a tempfile is non-NULL, make a copy of @a local_abspath with keywords
- * and eol translated to repository-normal form, and set @a *tempfile to the
- * absolute path to this copy, allocated in @a result_pool.  The copy will
- * be in the temporary-text-base directory.  Do not clean up the copy;
- * caller can do that.  (The purpose of handing back the tmp copy is that it
- * is usually about to become the new text base anyway, but the installation
- * of the new text base is outside the scope of this function.)
- *
  * If @a new_text_base_md5_checksum is non-NULL, set
  * @a *new_text_base_md5_checksum to the MD5 checksum of (@a local_abspath
  * translated to repository-normal form), allocated in @a result_pool.
@@ -7143,8 +7103,7 @@ svn_wc_translated_stream(svn_stream_t **
  * @since New in 1.7.
  */
 svn_error_t *
-svn_wc_transmit_text_deltas3(const char **tempfile,
-                             const svn_checksum_t **new_text_base_md5_checksum,
+svn_wc_transmit_text_deltas3(const svn_checksum_t **new_text_base_md5_checksum,
                              const svn_checksum_t **new_text_base_sha1_checksum,
                              svn_wc_context_t *wc_ctx,
                              const char *local_abspath,
@@ -7158,6 +7117,14 @@ svn_wc_transmit_text_deltas3(const char 
  * and adm_access baton, and the checksum output is an MD5 digest instead of
  * two svn_checksum_t objects.
  *
+ * If @a tempfile is non-NULL, make a copy of @a path with keywords
+ * and eol translated to repository-normal form, and set @a *tempfile to the
+ * absolute path to this copy, allocated in @a result_pool.  The copy will
+ * be in the temporary-text-base directory.  Do not clean up the copy;
+ * caller can do that.  (The purpose of handing back the tmp copy is that it
+ * is usually about to become the new text base anyway, but the installation
+ * of the new text base is outside the scope of this function.)
+ *
  * @since New in 1.4.
  * @deprecated Provided for backwards compatibility with the 1.6 API.
  */

Modified: subversion/branches/performance/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/add.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/add.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/add.c Mon Sep  6 19:13:39 2010
@@ -370,78 +370,47 @@ add_dir_recursive(const char *dir_abspat
                   svn_boolean_t force,
                   svn_boolean_t no_ignore,
                   svn_client_ctx_t *ctx,
-                  apr_pool_t *pool)
+                  apr_pool_t *scratch_pool)
 {
-  apr_dir_t *dir;
-  apr_finfo_t this_entry;
   svn_error_t *err;
-  apr_pool_t *subpool;
-  apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME;
+  apr_pool_t *iterpool;
   apr_array_header_t *ignores;
+  apr_hash_t *dirents;
+  apr_hash_index_t *hi;
 
   /* Check cancellation; note that this catches recursive calls too. */
   if (ctx->cancel_func)
     SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
+  iterpool = svn_pool_create(scratch_pool);
+
   /* Add this directory to revision control. */
   err = svn_wc_add4(ctx->wc_ctx, dir_abspath, svn_depth_infinity, NULL,
                     SVN_INVALID_REVNUM, ctx->cancel_func, ctx->cancel_baton,
-                    ctx->notify_func2, ctx->notify_baton2, pool);
+                    ctx->notify_func2, ctx->notify_baton2, iterpool);
   if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
     svn_error_clear(err);
   else if (err)
     return svn_error_return(err);
 
-  subpool = svn_pool_create(pool);
-
   if (!no_ignore)
     {
       SVN_ERR(svn_wc_get_ignores2(&ignores, ctx->wc_ctx, dir_abspath,
-                                  ctx->config, pool, subpool));
+                                  ctx->config, scratch_pool, iterpool));
     }
 
-  SVN_ERR(svn_io_dir_open(&dir, dir_abspath, pool));
+  SVN_ERR(svn_io_get_dirents3(&dirents, dir_abspath, TRUE, scratch_pool,
+                              iterpool));
 
   /* Read the directory entries one by one and add those things to
      version control. */
-  while (1)
+  for (hi = apr_hash_first(scratch_pool, dirents); hi; hi = apr_hash_next(hi))
     {
+      const char *name = svn__apr_hash_index_key(hi);
+      svn_io_dirent2_t *dirent = svn__apr_hash_index_val(hi);
       const char *abspath;
 
-      svn_pool_clear(subpool);
-
-      err = svn_io_dir_read(&this_entry, flags, dir, subpool);
-
-      if (err)
-        {
-          /* Check if we're done reading the dir's entries. */
-          if (APR_STATUS_IS_ENOENT(err->apr_err))
-            {
-              apr_status_t apr_err;
-
-              svn_error_clear(err);
-              apr_err = apr_dir_close(dir);
-              if (apr_err)
-                return svn_error_wrap_apr(apr_err,
-                                          _("Can't close directory '%s'"),
-                                          svn_dirent_local_style(dir_abspath,
-                                                                 subpool));
-              break;
-            }
-          else
-            {
-              return svn_error_createf(err->apr_err, err,
-                                       _("Error during add of '%s'"),
-                                       svn_dirent_local_style(dir_abspath,
-                                                              subpool));
-            }
-        }
-
-      /* Skip entries for this dir and its parent.  */
-      if (this_entry.name[0] == '.'
-          && (this_entry.name[1] == '\0'
-              || (this_entry.name[1] == '.' && this_entry.name[2] == '\0')))
-        continue;
+      svn_pool_clear(iterpool);
 
       /* Check cancellation so you can cancel during an
        * add of a directory with lots of files. */
@@ -449,40 +418,38 @@ add_dir_recursive(const char *dir_abspat
         SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
       /* Skip over SVN admin directories. */
-      if (svn_wc_is_adm_dir(this_entry.name, subpool))
+      if (svn_wc_is_adm_dir(name, iterpool))
         continue;
 
-      if ((!no_ignore) && svn_wc_match_ignore_list(this_entry.name,
-                                                   ignores, subpool))
+      if ((!no_ignore) && svn_wc_match_ignore_list(name, ignores, iterpool))
         continue;
 
       /* Construct the full path of the entry. */
-      abspath = svn_dirent_join(dir_abspath, this_entry.name, subpool);
+      abspath = svn_dirent_join(dir_abspath, name, iterpool);
 
       /* Recurse on directories; add files; ignore the rest. */
-      if (this_entry.filetype == APR_DIR && depth >= svn_depth_immediates)
+      if (dirent->kind == svn_node_dir && depth >= svn_depth_immediates)
         {
           svn_depth_t depth_below_here = depth;
           if (depth == svn_depth_immediates)
             depth_below_here = svn_depth_empty;
 
           SVN_ERR(add_dir_recursive(abspath, depth_below_here,
-                                    force, no_ignore, ctx, subpool));
+                                    force, no_ignore, ctx, iterpool));
         }
-      else if (this_entry.filetype != APR_UNKFILE
-               && this_entry.filetype != APR_DIR
+      else if ((dirent->kind == svn_node_file || dirent->special)
                && depth >= svn_depth_files)
         {
-          err = add_file(abspath, ctx, subpool);
+          err = add_file(abspath, ctx, iterpool);
           if (err && err->apr_err == SVN_ERR_ENTRY_EXISTS && force)
             svn_error_clear(err);
-          else if (err)
-            return svn_error_return(err);
+          else
+            SVN_ERR(err);
         }
     }
 
   /* Destroy the per-iteration pool. */
-  svn_pool_destroy(subpool);
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }
@@ -540,6 +507,9 @@ add(void *baton, apr_pool_t *result_pool
 /* Go up the directory tree, looking for a versioned directory.  If found,
    add all the intermediate directories.  Otherwise, return
    SVN_ERR_CLIENT_NO_VERSIONED_PARENT. */
+/* ### This function needs rewriting into its callers in a style that finds the
+       parent and then acquires an infinite depth lock there for the entire
+       operation */
 static svn_error_t *
 add_parent_dirs(svn_client_ctx_t *ctx,
                 const char *local_abspath,
@@ -547,8 +517,10 @@ add_parent_dirs(svn_client_ctx_t *ctx,
 {
   int format;
   const char *parent_abspath;
+  svn_boolean_t own_lock;
+  svn_wc_context_t *wc_ctx = ctx->wc_ctx;
 
-  SVN_ERR(svn_wc_check_wc2(&format, ctx->wc_ctx, local_abspath, scratch_pool));
+  SVN_ERR(svn_wc_check_wc2(&format, wc_ctx, local_abspath, scratch_pool));
 
   if (format > 0)
     return SVN_NO_ERROR;
@@ -566,7 +538,15 @@ add_parent_dirs(svn_client_ctx_t *ctx,
   parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
 
   SVN_ERR(add_parent_dirs(ctx, parent_abspath, scratch_pool));
-  SVN_ERR(svn_wc_add4(ctx->wc_ctx, local_abspath, svn_depth_infinity,
+
+  SVN_ERR(svn_wc_locked2(&own_lock, NULL, wc_ctx, parent_abspath,
+                         scratch_pool));
+
+  if (!own_lock)
+    SVN_ERR(svn_wc__acquire_write_lock(NULL, wc_ctx, parent_abspath, FALSE,
+                                       scratch_pool, scratch_pool));
+
+  SVN_ERR(svn_wc_add4(wc_ctx, local_abspath, svn_depth_infinity,
                       NULL, SVN_INVALID_REVNUM,
                       ctx->cancel_func, ctx->cancel_baton,
                       ctx->notify_func2, ctx->notify_baton2,
@@ -574,7 +554,7 @@ add_parent_dirs(svn_client_ctx_t *ctx,
   /* ### New dir gets added with its own per-directory lock which we
      must release.  This code should be redundant when we move to a
      single db. */
-  SVN_ERR(svn_wc__release_write_lock(ctx->wc_ctx, local_abspath, scratch_pool));
+  SVN_ERR(svn_wc__release_write_lock(wc_ctx, parent_abspath, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -594,6 +574,11 @@ svn_client_add4(const char *path,
   const char *local_abspath;
   struct add_with_write_lock_baton baton;
 
+  if (svn_path_is_url(path))
+    return svn_error_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));
 
   /* ### this is a hack.
@@ -623,7 +608,8 @@ svn_client_add4(const char *path,
   baton.no_ignore = no_ignore;
   baton.ctx = ctx;
   SVN_ERR(svn_wc__call_with_write_lock(add, &baton, ctx->wc_ctx,
-                                       parent_abspath, pool, pool));
+                                       parent_abspath, FALSE,
+                                       pool, pool));
   return SVN_NO_ERROR;
 }
 
@@ -668,8 +654,7 @@ add_url_parents(svn_ra_session_t *ra_ses
 }
 
 static svn_error_t *
-mkdir_urls(svn_commit_info_t **commit_info_p,
-           const apr_array_header_t *urls,
+mkdir_urls(const apr_array_header_t *urls,
            svn_boolean_t make_parents,
            const apr_hash_t *revprop_table,
            svn_client_ctx_t *ctx,
@@ -678,7 +663,6 @@ mkdir_urls(svn_commit_info_t **commit_in
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   const char *log_msg;
   apr_array_header_t *targets;
   apr_hash_t *targets_hash;
@@ -819,11 +803,10 @@ mkdir_urls(svn_commit_info_t **commit_in
     }
 
   /* Fetch RA commit editor */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    svn_client__commit_callback,
-                                    commit_baton,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -881,8 +864,7 @@ svn_client__make_local_parents(const cha
 
 
 svn_error_t *
-svn_client_mkdir3(svn_commit_info_t **commit_info_p,
-                  const apr_array_header_t *paths,
+svn_client_mkdir4(const apr_array_header_t *paths,
                   svn_boolean_t make_parents,
                   const apr_hash_t *revprop_table,
                   svn_client_ctx_t *ctx,
@@ -893,8 +875,7 @@ svn_client_mkdir3(svn_commit_info_t **co
 
   if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
     {
-      SVN_ERR(mkdir_urls(commit_info_p, paths, make_parents,
-                         revprop_table, ctx, pool));
+      SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, ctx, pool));
     }
   else
     {

Modified: subversion/branches/performance/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/changelist.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/changelist.c Mon Sep  6 19:13:39 2010
@@ -36,6 +36,7 @@
 
 #include "client.h"
 #include "private/svn_wc_private.h"
+#include "svn_private_config.h"
 
 
 /* Entry-walker callback for svn_client_add_to_changelist() and
@@ -102,6 +103,16 @@ svn_client_add_to_changelist(const apr_a
   apr_hash_t *changelist_hash = NULL;
   int i;
 
+  for (i = 0; i < paths->nelts; i++)
+    {
+      const char *path = APR_ARRAY_IDX(paths, i, const char *);
+      if (svn_path_is_url(path))
+        return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  path));
+    }
+
   if (changelists && changelists->nelts)
     SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
 
@@ -144,6 +155,16 @@ svn_client_remove_from_changelists(const
   apr_hash_t *changelist_hash = NULL;
   int i;
 
+  for (i = 0; i < paths->nelts; i++)
+    {
+      const char *path = APR_ARRAY_IDX(paths, i, const char *);
+      if (svn_path_is_url(path))
+        return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  path));
+    }
+
   if (changelists && changelists->nelts)
     SVN_ERR(svn_hash_from_cstring_keys(&changelist_hash, changelists, pool));
 

Modified: subversion/branches/performance/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/cleanup.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/cleanup.c Mon Sep  6 19:13:39 2010
@@ -32,6 +32,7 @@
 #include "svn_client.h"
 #include "svn_config.h"
 #include "svn_dirent_uri.h"
+#include "svn_path.h"
 #include "svn_pools.h"
 #include "client.h"
 #include "svn_props.h"
@@ -50,6 +51,11 @@ svn_client_cleanup(const char *path,
   const char *local_abspath;
   svn_error_t *err;
 
+  if (svn_path_is_url(path))
+    return svn_error_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, scratch_pool));
 
   err = svn_wc_cleanup3(ctx->wc_ctx, local_abspath, ctx->cancel_func,

Modified: subversion/branches/performance/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/client.h?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/client.h (original)
+++ subversion/branches/performance/subversion/libsvn_client/client.h Mon Sep  6 19:13:39 2010
@@ -387,23 +387,6 @@ svn_client__open_ra_session_internal(svn
 
 /* ---------------------------------------------------------------- */
 
-/*** Commit ***/
-
-/* Get the commit_baton to be used in couple with commit_callback. */
-svn_error_t *svn_client__commit_get_baton(void **baton,
-                                          svn_commit_info_t **info,
-                                          apr_pool_t *pool);
-
-/* The commit_callback function for storing svn_client_commit_info_t
-   pointed by commit_baton. If the commit_info supplied by get_baton
-   points to NULL after close_edit, it means the commit is a no-op.
-*/
-svn_error_t *svn_client__commit_callback(const svn_commit_info_t *commit_info,
-                                         void *baton,
-                                         apr_pool_t *pool);
-
-/* ---------------------------------------------------------------- */
-
 /*** Status ***/
 
 /* Verify that the path can be deleted without losing stuff,
@@ -910,12 +893,6 @@ svn_client__condense_commit_items(const 
    NOTIFY_PATH_PREFIX will be passed to CTX->notify_func2() as the
    common absolute path prefix of the committed paths.  It can be NULL.
 
-   If NEW_TEXT_BASE_ABSPATHS is not NULL, create in the temporary-text-base
-   directory a copy of the working version of each file transmitted, but
-   with keywords and eol translated to repository-normal form, and set
-   *NEW_TEXT_BASE_ABSPATHS to a hash that maps (const char *) paths (from
-   the items' paths) to the (const char *) abspaths of these files.
-
    If MD5_CHECKSUMS is not NULL, set *MD5_CHECKSUMS to a hash containing,
    for each file transmitted, a mapping from the commit-item's (const
    char *) path to the (const svn_checksum_t *) MD5 checksum of its new text
@@ -929,7 +906,6 @@ svn_client__do_commit(const char *base_u
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
                       const char *notify_path_prefix,
-                      apr_hash_t **new_text_base_abspaths,
                       apr_hash_t **md5_checksums,
                       apr_hash_t **sha1_checksums,
                       svn_client_ctx_t *ctx,
@@ -999,6 +975,8 @@ svn_client__handle_externals(apr_hash_t 
    behaves as for svn_client__handle_externals(), except that ambient
    depths are presumed to be svn_depth_infinity.
 
+   NATIVE_EOL is the value passed as NATIVE_EOL when exporting.
+
    *TIMESTAMP_SLEEP will be set TRUE if a sleep is required to ensure
    timestamp integrity, *TIMESTAMP_SLEEP will be unchanged if no sleep
    is required.
@@ -1011,6 +989,7 @@ svn_client__fetch_externals(apr_hash_t *
                             const char *repos_root_url,
                             svn_depth_t requested_depth,
                             svn_boolean_t is_export,
+                            const char *native_eol,
                             svn_boolean_t *timestamp_sleep,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool);

Modified: subversion/branches/performance/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/cmdline.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/cmdline.c Mon Sep  6 19:13:39 2010
@@ -123,6 +123,7 @@ check_root_url_of_target(const char **ro
        * argument.
        */
       if ((err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
+          || (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
           || (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY))
         {
           svn_error_clear(err);

Modified: subversion/branches/performance/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/commit.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/commit.c Mon Sep  6 19:13:39 2010
@@ -309,7 +309,7 @@ import_dir(const svn_delta_editor_t *edi
   if (!no_ignore)
     SVN_ERR(svn_wc_get_default_ignores(&ignores, ctx->config, pool));
 
-  SVN_ERR(svn_io_get_dirents2(&dirents, path, pool));
+  SVN_ERR(svn_io_get_dirents3(&dirents, path, TRUE, pool, pool));
 
   for (hi = apr_hash_first(pool, dirents); hi; hi = apr_hash_next(hi))
     {
@@ -444,7 +444,7 @@ import_dir(const svn_delta_editor_t *edi
  * EDIT_BATON.  PATH can be a file or directory.
  *
  * DEPTH is the depth at which to import PATH; it behaves as for
- * svn_client_import3().
+ * svn_client_import4().
  *
  * NEW_ENTRIES is an ordered array of path components that must be
  * created in the repository (where the ordering direction is
@@ -592,27 +592,49 @@ import(const char *path,
 }
 
 
+struct capture_baton_t {
+  svn_commit_callback2_t original_callback;
+  void *original_baton;
+
+  svn_commit_info_t **info;
+  apr_pool_t *pool;
+};
+
+
+static svn_error_t *
+capture_commit_info(const svn_commit_info_t *commit_info,
+                    void *baton,
+                    apr_pool_t *pool)
+{
+  struct capture_baton_t *cb = baton;
+
+  *(cb->info) = svn_commit_info_dup(commit_info, cb->pool);
+
+  if (cb->original_callback)
+    SVN_ERR((cb->original_callback)(commit_info, cb->original_baton, pool));
+
+  return SVN_NO_ERROR;
+}
+
+
 static svn_error_t *
 get_ra_editor(svn_ra_session_t **ra_session,
               const svn_delta_editor_t **editor,
               void **edit_baton,
               svn_client_ctx_t *ctx,
               const char *base_url,
-              const char *base_dir,
+              const char *base_dir_abspath,
               const char *log_msg,
               const apr_array_header_t *commit_items,
               const apr_hash_t *revprop_table,
-              svn_commit_info_t **commit_info_p,
               svn_boolean_t is_commit,
               apr_hash_t *lock_tokens,
               svn_boolean_t keep_locks,
+              svn_commit_callback2_t commit_callback,
+              void *commit_baton,
               apr_pool_t *pool)
 {
-  void *commit_baton;
   apr_hash_t *commit_revprops;
-  const char *base_dir_abspath;
-
-  SVN_ERR(svn_dirent_get_absolute(&base_dir_abspath, base_dir, pool));
 
   /* Open an RA session to URL. */
   SVN_ERR(svn_client__open_ra_session_internal(ra_session, base_url,
@@ -638,10 +660,8 @@ get_ra_editor(svn_ra_session_t **ra_sess
                                            log_msg, ctx, pool));
 
   /* Fetch RA commit editor. */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   return svn_ra_get_commit_editor3(*ra_session, editor, edit_baton,
-                                   commit_revprops,
-                                   svn_client__commit_callback,
+                                   commit_revprops, commit_callback,
                                    commit_baton, lock_tokens, keep_locks,
                                    pool);
 }
@@ -650,8 +670,7 @@ get_ra_editor(svn_ra_session_t **ra_sess
 /*** Public Interfaces. ***/
 
 svn_error_t *
-svn_client_import3(svn_commit_info_t **commit_info_p,
-                   const char *path,
+svn_client_import4(const char *path,
                    const char *url,
                    svn_depth_t depth,
                    svn_boolean_t no_ignore,
@@ -667,13 +686,17 @@ svn_client_import3(svn_commit_info_t **c
   svn_ra_session_t *ra_session;
   apr_hash_t *excludes = apr_hash_make(pool);
   svn_node_kind_t kind;
-  const char *base_dir = path;
+  const char *local_abspath;
+  const char *base_dir_abspath;
   apr_array_header_t *new_entries = apr_array_make(pool, 4,
                                                    sizeof(const char *));
   const char *temp;
   const char *dir;
   apr_pool_t *subpool;
 
+  SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
+  base_dir_abspath = local_abspath;
+
   /* Create a new commit item and add it to the array. */
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
     {
@@ -702,9 +725,9 @@ svn_client_import3(svn_commit_info_t **c
         }
     }
 
-  SVN_ERR(svn_io_check_path(path, &kind, pool));
+  SVN_ERR(svn_io_check_path(local_abspath, &kind, pool));
   if (kind == svn_node_file)
-    base_dir = svn_dirent_dirname(path, pool);
+    base_dir_abspath = svn_dirent_dirname(local_abspath, pool);
 
   /* Figure out all the path components we need to create just to have
      a place to stick our imported tree. */
@@ -735,9 +758,10 @@ svn_client_import3(svn_commit_info_t **c
         }
     }
   while ((err = get_ra_editor(&ra_session,
-                              &editor, &edit_baton, ctx, url, base_dir,
-                              log_msg, NULL, revprop_table,
-                              commit_info_p, FALSE, NULL, TRUE, subpool)));
+                              &editor, &edit_baton, ctx, url, base_dir_abspath,
+                              log_msg, NULL, revprop_table, FALSE, NULL, TRUE,
+                              ctx->commit_callback2, ctx->commit_baton,
+                              subpool)));
 
   /* Reverse the order of the components we added to our NEW_ENTRIES array. */
   if (new_entries->nelts)
@@ -792,59 +816,22 @@ svn_client_import3(svn_commit_info_t **c
       return err;
     }
 
-  /* Transfer *COMMIT_INFO from the subpool to the callers pool */
-  if (*commit_info_p)
-    *commit_info_p = svn_commit_info_dup(*commit_info_p, pool);
-
   svn_pool_destroy(subpool);
 
   return SVN_NO_ERROR;
 }
 
 
-/* Remove (if it exists) each file whose path is given by a value in the
- * hash TEMPFILES, which is a mapping from (const char *) path to (const
- * char *) tempfile abspath.  Ignore the keys of TEMPFILES. */
-static svn_error_t *
-remove_tmpfiles(apr_hash_t *tempfiles,
-                apr_pool_t *pool)
-{
-  apr_hash_index_t *hi;
-  apr_pool_t *iterpool;
-
-  /* Split if there's nothing to be done. */
-  if (! tempfiles)
-    return SVN_NO_ERROR;
-
-  iterpool = svn_pool_create(pool);
-
-  /* Clean up any tempfiles. */
-  for (hi = apr_hash_first(pool, tempfiles); hi; hi = apr_hash_next(hi))
-    {
-      const char *path = svn__apr_hash_index_val(hi);
-
-      svn_pool_clear(iterpool);
-
-      SVN_ERR(svn_io_remove_file2(path, TRUE, iterpool));
-    }
-  svn_pool_destroy(iterpool);
-
-  return SVN_NO_ERROR;
-}
-
-
-
 static svn_error_t *
 reconcile_errors(svn_error_t *commit_err,
                  svn_error_t *unlock_err,
                  svn_error_t *bump_err,
-                 svn_error_t *cleanup_err,
                  apr_pool_t *pool)
 {
   svn_error_t *err;
 
   /* Early release (for good behavior). */
-  if (! (commit_err || unlock_err || bump_err || cleanup_err))
+  if (! (commit_err || unlock_err || bump_err))
     return SVN_NO_ERROR;
 
   /* If there was a commit error, start off our error chain with
@@ -884,17 +871,6 @@ reconcile_errors(svn_error_t *commit_err
       svn_error_compose(err, bump_err);
     }
 
-  /* If there was a cleanup error... */
-  if (cleanup_err)
-    {
-      /* Wrap the error with some headers. */
-      cleanup_err = svn_error_quick_wrap
-        (cleanup_err, _("Error in post-commit clean-up (details follow):"));
-
-      /* Append this error to the chain. */
-      svn_error_compose(err, cleanup_err);
-    }
-
   return err;
 }
 
@@ -1049,8 +1025,7 @@ check_nonrecursive_dir_delete(const char
 }
 
 svn_error_t *
-svn_client_commit4(svn_commit_info_t **commit_info_p,
-                   const apr_array_header_t *targets,
+svn_client_commit5(const apr_array_header_t *targets,
                    svn_depth_t depth,
                    svn_boolean_t keep_locks,
                    svn_boolean_t keep_changelists,
@@ -1061,6 +1036,7 @@ svn_client_commit4(svn_commit_info_t **c
 {
   const svn_delta_editor_t *editor;
   void *edit_baton;
+  struct capture_baton_t cb;
   svn_ra_session_t *ra_session;
   const char *log_msg;
   const char *base_abspath;
@@ -1069,13 +1045,13 @@ svn_client_commit4(svn_commit_info_t **c
   apr_array_header_t *rel_targets;
   apr_hash_t *committables;
   apr_hash_t *lock_tokens;
-  apr_hash_t *tempfiles = NULL;
   apr_hash_t *md5_checksums;
   apr_hash_t *sha1_checksums;
   apr_array_header_t *commit_items;
   svn_error_t *cmt_err = SVN_NO_ERROR, *unlock_err = SVN_NO_ERROR;
-  svn_error_t *bump_err = SVN_NO_ERROR, *cleanup_err = SVN_NO_ERROR;
+  svn_error_t *bump_err = SVN_NO_ERROR;
   svn_boolean_t commit_in_progress = FALSE;
+  svn_commit_info_t *commit_info = NULL;
   const char *current_abspath;
   const char *notify_prefix;
   int i;
@@ -1097,13 +1073,7 @@ svn_client_commit4(svn_commit_info_t **c
 
   /* No targets means nothing to commit, so just return. */
   if (base_abspath == NULL)
-    {
-      /* As per our promise, if *commit_info_p isn't set, provide a
-         default where rev = SVN_INVALID_REVNUM. */
-      if (! *commit_info_p)
-        *commit_info_p = svn_create_commit_info(pool);
-      return SVN_NO_ERROR;
-    }
+    return SVN_NO_ERROR;
 
   SVN_ERR_ASSERT(rel_targets != NULL);
 
@@ -1129,7 +1099,7 @@ svn_client_commit4(svn_commit_info_t **c
                                                   pool);
 
   SVN_ERR(svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, base_abspath,
-                                     pool, pool));
+                                     FALSE, pool, pool));
 
   /* One day we might support committing from multiple working copies, but
      we don't yet.  This check ensures that we don't silently commit a
@@ -1222,11 +1192,16 @@ svn_client_commit4(svn_commit_info_t **c
                                      pool)))
     goto cleanup;
 
-  if ((cmt_err = get_ra_editor(&ra_session,
-                               &editor, &edit_baton, ctx,
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+  cb.info = &commit_info;
+  cb.pool = pool;
+
+  if ((cmt_err = get_ra_editor(&ra_session, &editor, &edit_baton, ctx,
                                base_url, base_abspath, log_msg,
-                               commit_items, revprop_table, commit_info_p,
-                               TRUE, lock_tokens, keep_locks, pool)))
+                               commit_items, revprop_table, TRUE, lock_tokens,
+                               keep_locks, capture_commit_info,
+                               &cb, pool)))
     goto cleanup;
 
   /* Make a note that we have a commit-in-progress. */
@@ -1234,7 +1209,7 @@ svn_client_commit4(svn_commit_info_t **c
 
   /* Perform the commit. */
   cmt_err = svn_client__do_commit(base_url, commit_items, editor, edit_baton,
-                                  notify_prefix, &tempfiles, &md5_checksums,
+                                  notify_prefix, &md5_checksums,
                                   &sha1_checksums, ctx, pool);
 
   /* Handle a successful commit. */
@@ -1267,12 +1242,12 @@ svn_client_commit4(svn_commit_info_t **c
         }
       svn_pool_destroy(iterpool);
 
-      SVN_ERR_ASSERT(*commit_info_p);
+      SVN_ERR_ASSERT(commit_info);
       bump_err
         = svn_wc_process_committed_queue2(queue, ctx->wc_ctx,
-                                         (*commit_info_p)->revision,
-                                         (*commit_info_p)->date,
-                                         (*commit_info_p)->author,
+                                         commit_info->revision,
+                                         commit_info->date,
+                                         commit_info->author,
                                          pool);
     }
 
@@ -1290,17 +1265,7 @@ svn_client_commit4(svn_commit_info_t **c
      attempt to modify the working copy, so it doesn't prevent explicit
      clean-up. */
   if (! bump_err)
-    {
-      unlock_err = svn_wc__release_write_lock(ctx->wc_ctx, base_abspath, pool);
-
-      if (! unlock_err)
-        cleanup_err = remove_tmpfiles(tempfiles, pool);
-    }
-
-  /* As per our promise, if *commit_info_p isn't set, provide a default where
-     rev = SVN_INVALID_REVNUM. */
-  if (! *commit_info_p)
-    *commit_info_p = svn_create_commit_info(pool);
+    unlock_err = svn_wc__release_write_lock(ctx->wc_ctx, base_abspath, pool);
 
-  return reconcile_errors(cmt_err, unlock_err, bump_err, cleanup_err, pool);
+  return reconcile_errors(cmt_err, unlock_err, bump_err, pool);
 }

Modified: subversion/branches/performance/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/commit_util.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/commit_util.c Mon Sep  6 19:13:39 2010
@@ -1654,7 +1654,6 @@ svn_client__do_commit(const char *base_u
                       const svn_delta_editor_t *editor,
                       void *edit_baton,
                       const char *notify_path_prefix,
-                      apr_hash_t **new_text_base_abspaths,
                       apr_hash_t **md5_checksums,
                       apr_hash_t **sha1_checksums,
                       svn_client_ctx_t *ctx,
@@ -1677,11 +1676,6 @@ svn_client__do_commit(const char *base_u
   }
 #endif /* SVN_CLIENT_COMMIT_DEBUG */
 
-  /* If the caller wants us to track temporary file creation, create a
-     hash to store those paths in. */
-  if (new_text_base_abspaths)
-    *new_text_base_abspaths = apr_hash_make(pool);
-
   /* Ditto for the checksums. */
   if (md5_checksums)
     *md5_checksums = apr_hash_make(pool);
@@ -1717,7 +1711,6 @@ svn_client__do_commit(const char *base_u
     {
       struct file_mod_t *mod = svn__apr_hash_index_val(hi);
       const svn_client_commit_item3_t *item = mod->item;
-      const char *tempfile;
       const svn_checksum_t *new_text_base_md5_checksum;
       const svn_checksum_t *new_text_base_sha1_checksum;
       svn_boolean_t fulltext = FALSE;
@@ -1745,16 +1738,11 @@ svn_client__do_commit(const char *base_u
       if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
         fulltext = TRUE;
 
-      SVN_ERR(svn_wc_transmit_text_deltas3(new_text_base_abspaths ? &tempfile
-                                                                  : NULL,
-                                           &new_text_base_md5_checksum,
+      SVN_ERR(svn_wc_transmit_text_deltas3(&new_text_base_md5_checksum,
                                            &new_text_base_sha1_checksum,
                                            ctx->wc_ctx, item_abspath,
                                            fulltext, editor, mod->file_baton,
                                            pool, iterpool));
-      if (new_text_base_abspaths && tempfile)
-        apr_hash_set(*new_text_base_abspaths, item->path, APR_HASH_KEY_STRING,
-                     tempfile);
       if (md5_checksums)
         apr_hash_set(*md5_checksums, item->path, APR_HASH_KEY_STRING,
                      new_text_base_md5_checksum);
@@ -1769,36 +1757,6 @@ svn_client__do_commit(const char *base_u
   return editor->close_edit(edit_baton, pool);
 }
 
-/* Commit callback baton */
-
-struct commit_baton {
-  svn_commit_info_t **info;
-  apr_pool_t *pool;
-};
-
-svn_error_t *svn_client__commit_get_baton(void **baton,
-                                          svn_commit_info_t **info,
-                                          apr_pool_t *pool)
-{
-  struct commit_baton *cb = apr_pcalloc(pool, sizeof(*cb));
-  cb->info = info;
-  cb->pool = pool;
-  *baton = cb;
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *svn_client__commit_callback(const svn_commit_info_t *commit_info,
-                                         void *baton,
-                                         apr_pool_t *pool)
-{
-  struct commit_baton *cb = baton;
-
-  *(cb->info) = svn_commit_info_dup(commit_info, cb->pool);
-
-  return SVN_NO_ERROR;
-}
-
 
 #ifdef SVN_CLIENT_COMMIT_DEBUG
 

Modified: subversion/branches/performance/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/copy.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/copy.c Mon Sep  6 19:13:39 2010
@@ -310,7 +310,7 @@ do_wc_to_wc_copies(const apr_array_heade
   baton.dst_parent = dst_parent;
   SVN_ERR(svn_wc__call_with_write_lock(do_wc_to_wc_copies_with_write_lock,
                                        &baton, ctx->wc_ctx, dst_parent_abspath,
-                                       pool, pool));
+                                       FALSE, pool, pool));
 
   return SVN_NO_ERROR;
 }
@@ -361,7 +361,7 @@ do_wc_to_wc_moves_with_locks1(void *bato
   if (b->lock_dst)
     SVN_ERR(svn_wc__call_with_write_lock(do_wc_to_wc_moves_with_locks2, b,
                                          b->ctx->wc_ctx, b->dst_parent_abspath,
-                                         result_pool, scratch_pool));
+                                         FALSE, result_pool, scratch_pool));
   else
     SVN_ERR(do_wc_to_wc_moves_with_locks2(b, result_pool, scratch_pool));
 
@@ -430,7 +430,7 @@ do_wc_to_wc_moves(const apr_array_header
         SVN_ERR(svn_wc__call_with_write_lock(do_wc_to_wc_moves_with_locks1,
                                              &baton,
                                              ctx->wc_ctx, src_parent_abspath,
-                                             iterpool, iterpool));
+                                             FALSE, iterpool, iterpool));
       else
         SVN_ERR(do_wc_to_wc_moves_with_locks1(&baton, iterpool, iterpool));
 
@@ -720,8 +720,7 @@ find_absent_parents2(svn_ra_session_t *r
 }
 
 static svn_error_t *
-repos_to_repos_copy(svn_commit_info_t **commit_info_p,
-                    const apr_array_header_t *copy_pairs,
+repos_to_repos_copy(const apr_array_header_t *copy_pairs,
                     svn_boolean_t make_parents,
                     const apr_hash_t *revprop_table,
                     svn_client_ctx_t *ctx,
@@ -739,7 +738,6 @@ repos_to_repos_copy(svn_commit_info_t **
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   struct path_driver_cb_baton cb_baton;
   apr_array_header_t *new_dirs = NULL;
   apr_hash_t *commit_revprops;
@@ -1115,11 +1113,10 @@ repos_to_repos_copy(svn_commit_info_t **
                                            message, ctx, pool));
 
   /* Fetch RA commit editor. */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    svn_client__commit_callback,
-                                    commit_baton,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -1151,8 +1148,7 @@ repos_to_repos_copy(svn_commit_info_t **
  * REVPROP_TABLE is ...
  * CTX is ... */
 static svn_error_t *
-wc_to_repos_copy(svn_commit_info_t **commit_info_p,
-                 const apr_array_header_t *copy_pairs,
+wc_to_repos_copy(const apr_array_header_t *copy_pairs,
                  svn_boolean_t make_parents,
                  const apr_hash_t *revprop_table,
                  svn_client_ctx_t *ctx,
@@ -1164,7 +1160,6 @@ wc_to_repos_copy(svn_commit_info_t **com
   svn_ra_session_t *ra_session;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   apr_hash_t *committables;
   apr_array_header_t *commit_items;
   apr_pool_t *iterpool;
@@ -1392,11 +1387,10 @@ wc_to_repos_copy(svn_commit_info_t **com
                                                FALSE, FALSE, ctx, pool));
 
   /* Fetch RA commit editor. */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    svn_client__commit_callback,
-                                    commit_baton, NULL,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton, NULL,
                                     TRUE, /* No lock tokens */
                                     pool));
 
@@ -1404,7 +1398,7 @@ wc_to_repos_copy(svn_commit_info_t **com
   SVN_ERR_W(svn_client__do_commit(top_dst_url, commit_items,
                                   editor, edit_baton,
                                   0, /* ### any notify_path_offset needed? */
-                                  NULL, NULL, NULL, ctx, pool),
+                                  NULL, NULL, ctx, pool),
             _("Commit failed (details follow):"));
 
   /* Sleep to ensure timestamp integrity. */
@@ -1859,7 +1853,7 @@ repos_to_wc_copy(const apr_array_header_
 
   SVN_ERR(svn_wc__call_with_write_lock(repos_to_wc_copy_cb, &baton,
                                        ctx->wc_ctx, lock_abspath,
-                                       pool, pool));
+                                       FALSE, pool, pool));
   return SVN_NO_ERROR;
 }
 
@@ -1869,8 +1863,7 @@ repos_to_wc_copy(const apr_array_header_
 
 /* Perform all allocations in POOL. */
 static svn_error_t *
-try_copy(svn_commit_info_t **commit_info_p,
-         const apr_array_header_t *sources,
+try_copy(const apr_array_header_t *sources,
          const char *dst_path_in,
          svn_boolean_t is_move,
          svn_boolean_t force,
@@ -2154,7 +2147,6 @@ try_copy(svn_commit_info_t **commit_info
   /* Now, call the right handler for the operation. */
   if ((! srcs_are_urls) && (! dst_is_url))
     {
-      *commit_info_p = NULL;
       return svn_error_return(
         wc_to_wc_copy(copy_pairs, dst_path_in, is_move, make_parents, ctx,
                       pool));
@@ -2162,12 +2154,10 @@ try_copy(svn_commit_info_t **commit_info
   else if ((! srcs_are_urls) && (dst_is_url))
     {
       return svn_error_return(
-        wc_to_repos_copy(commit_info_p, copy_pairs, make_parents,
-                         revprop_table, ctx, pool));
+        wc_to_repos_copy(copy_pairs, make_parents, revprop_table, ctx, pool));
     }
   else if ((srcs_are_urls) && (! dst_is_url))
     {
-      *commit_info_p = NULL;
       return svn_error_return(
         repos_to_wc_copy(copy_pairs, make_parents, ignore_externals,
                          ctx, pool));
@@ -2175,7 +2165,7 @@ try_copy(svn_commit_info_t **commit_info
   else
     {
       return svn_error_return(
-        repos_to_repos_copy(commit_info_p, copy_pairs, make_parents,
+        repos_to_repos_copy(copy_pairs, make_parents,
                             revprop_table, ctx, is_move, pool));
     }
 }
@@ -2184,8 +2174,7 @@ try_copy(svn_commit_info_t **commit_info
 
 /* Public Interfaces */
 svn_error_t *
-svn_client_copy5(svn_commit_info_t **commit_info_p,
-                 const apr_array_header_t *sources,
+svn_client_copy6(const apr_array_header_t *sources,
                  const char *dst_path,
                  svn_boolean_t copy_as_child,
                  svn_boolean_t make_parents,
@@ -2195,15 +2184,13 @@ svn_client_copy5(svn_commit_info_t **com
                  apr_pool_t *pool)
 {
   svn_error_t *err;
-  svn_commit_info_t *commit_info = NULL;
   apr_pool_t *subpool = svn_pool_create(pool);
 
   if (sources->nelts > 1 && !copy_as_child)
     return svn_error_create(SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED,
                             NULL, NULL);
 
-  err = try_copy(&commit_info,
-                 sources, dst_path,
+  err = try_copy(sources, dst_path,
                  FALSE /* is_move */,
                  TRUE /* force, set to avoid deletion check */,
                  make_parents,
@@ -2232,8 +2219,7 @@ svn_client_copy5(svn_commit_info_t **com
       if (svn_path_is_url(src_path) && ! svn_path_is_url(dst_path))
         src_basename = svn_path_uri_decode(src_basename, subpool);
 
-      err = try_copy(&commit_info,
-                     sources,
+      err = try_copy(sources,
                      dst_is_uri
                          ? svn_uri_join(dst_path, src_basename, subpool)
                          : svn_dirent_join(dst_path, src_basename, subpool),
@@ -2246,22 +2232,13 @@ svn_client_copy5(svn_commit_info_t **com
                      subpool);
     }
 
-  if (commit_info_p != NULL)
-    {
-      if (commit_info)
-        *commit_info_p = svn_commit_info_dup(commit_info, pool);
-      else
-        *commit_info_p = NULL;
-    }
-
   svn_pool_destroy(subpool);
   return svn_error_return(err);
 }
 
 
 svn_error_t *
-svn_client_move5(svn_commit_info_t **commit_info_p,
-                 const apr_array_header_t *src_paths,
+svn_client_move6(const apr_array_header_t *src_paths,
                  const char *dst_path,
                  svn_boolean_t force,
                  svn_boolean_t move_as_child,
@@ -2270,7 +2247,6 @@ svn_client_move5(svn_commit_info_t **com
                  svn_client_ctx_t *ctx,
                  apr_pool_t *pool)
 {
-  svn_commit_info_t *commit_info = NULL;
   const svn_opt_revision_t head_revision
     = { svn_opt_revision_head, { 0 } };
   svn_error_t *err;
@@ -2296,7 +2272,7 @@ svn_client_move5(svn_commit_info_t **com
       APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = copy_source;
     }
 
-  err = try_copy(&commit_info, sources, dst_path,
+  err = try_copy(sources, dst_path,
                  TRUE /* is_move */,
                  force,
                  make_parents,
@@ -2322,7 +2298,7 @@ svn_client_move5(svn_commit_info_t **com
       src_basename = src_is_uri ? svn_uri_basename(src_path, pool)
                                 : svn_dirent_basename(src_path, pool);
 
-      err = try_copy(&commit_info, sources,
+      err = try_copy(sources,
                      dst_is_uri
                          ? svn_uri_join(dst_path, src_basename, pool)
                          : svn_dirent_join(dst_path, src_basename, pool),
@@ -2335,14 +2311,6 @@ svn_client_move5(svn_commit_info_t **com
                      subpool);
     }
 
-  if (commit_info_p != NULL)
-    {
-      if (commit_info)
-        *commit_info_p = svn_commit_info_dup(commit_info, pool);
-      else
-        *commit_info_p = commit_info;
-    }
-
   svn_pool_destroy(subpool);
   return svn_error_return(err);
 }

Modified: subversion/branches/performance/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/delete.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/delete.c Mon Sep  6 19:13:39 2010
@@ -136,8 +136,7 @@ path_driver_cb_func(void **dir_baton,
 
 
 static svn_error_t *
-delete_urls(svn_commit_info_t **commit_info_p,
-            const apr_array_header_t *paths,
+delete_urls(const apr_array_header_t *paths,
             const apr_hash_t *revprop_table,
             svn_client_ctx_t *ctx,
             apr_pool_t *pool)
@@ -145,7 +144,6 @@ delete_urls(svn_commit_info_t **commit_i
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
-  void *commit_baton;
   const char *log_msg;
   svn_node_kind_t kind;
   apr_array_header_t *targets;
@@ -237,11 +235,10 @@ delete_urls(svn_commit_info_t **commit_i
   SVN_ERR(svn_ra_reparent(ra_session, common, pool));
 
   /* Fetch RA commit editor */
-  SVN_ERR(svn_client__commit_get_baton(&commit_baton, commit_info_p, pool));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
-                                    svn_client__commit_callback,
-                                    commit_baton,
+                                    ctx->commit_callback2,
+                                    ctx->commit_baton,
                                     NULL, TRUE, /* No lock tokens */
                                     pool));
 
@@ -314,8 +311,7 @@ delete_with_write_lock_func(void *baton,
 }
 
 svn_error_t *
-svn_client_delete3(svn_commit_info_t **commit_info_p,
-                   const apr_array_header_t *paths,
+svn_client_delete4(const apr_array_header_t *paths,
                    svn_boolean_t force,
                    svn_boolean_t keep_local,
                    const apr_hash_t *revprop_table,
@@ -327,7 +323,7 @@ svn_client_delete3(svn_commit_info_t **c
 
   if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
     {
-      SVN_ERR(delete_urls(commit_info_p, paths, revprop_table, ctx, pool));
+      SVN_ERR(delete_urls(paths, revprop_table, ctx, pool));
     }
   else
     {
@@ -353,7 +349,8 @@ svn_client_delete3(svn_commit_info_t **c
           dwwlb.ctx = ctx;
           SVN_ERR(svn_wc__call_with_write_lock(delete_with_write_lock_func,
                                                &dwwlb, ctx->wc_ctx,
-                                               local_abspath, pool, subpool));
+                                               local_abspath, TRUE,
+                                               pool, subpool));
         }
       svn_pool_destroy(subpool);
     }

Modified: subversion/branches/performance/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/deprecated.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/deprecated.c Mon Sep  6 19:13:39 2010
@@ -50,6 +50,39 @@
 
 /*** Code. ***/
 
+
+/* Baton for capture_commit_info() */
+struct capture_baton_t {
+  svn_commit_callback2_t original_callback;
+  void *original_baton;
+
+  svn_commit_info_t **info;
+  apr_pool_t *pool;
+
+  svn_boolean_t saw_commit;
+};
+
+
+/* Callback which implements svn_commit_callback2_t for use with some
+   backward compat functions. */
+static svn_error_t *
+capture_commit_info(const svn_commit_info_t *commit_info,
+                    void *baton,
+                    apr_pool_t *pool)
+{
+  struct capture_baton_t *cb = baton;
+
+  *(cb->info) = svn_commit_info_dup(commit_info, cb->pool);
+
+  if (cb->original_callback)
+    SVN_ERR((cb->original_callback)(commit_info, cb->original_baton, pool));
+
+  cb->saw_commit = TRUE;
+
+  return SVN_NO_ERROR;
+}
+
+
 /*** From add.c ***/
 svn_error_t *
 svn_client_add3(const char *path,
@@ -83,7 +116,29 @@ svn_client_add(const char *path,
   return svn_client_add3(path, recursive, FALSE, FALSE, ctx, pool);
 }
 
+svn_error_t *
+svn_client_mkdir3(svn_commit_info_t **commit_info_p,
+                  const apr_array_header_t *paths,
+                  svn_boolean_t make_parents,
+                  const apr_hash_t *revprop_table,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *pool)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
 
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_mkdir4(paths, make_parents, revprop_table, &shadow_ctx,
+                           pool);
+}
 
 svn_error_t *
 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
@@ -333,6 +388,34 @@ svn_client_blame(const char *target,
 
 /*** From commit.c ***/
 svn_error_t *
+svn_client_import3(svn_commit_info_t **commit_info_p,
+                   const char *path,
+                   const char *url,
+                   svn_depth_t depth,
+                   svn_boolean_t no_ignore,
+                   svn_boolean_t ignore_unknown_node_types,
+                   const apr_hash_t *revprop_table,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_import4(path, url, depth, no_ignore,
+                            ignore_unknown_node_types, revprop_table,
+                            &shadow_ctx, pool);
+}
+
+svn_error_t *
 svn_client_import2(svn_commit_info_t **commit_info_p,
                    const char *path,
                    const char *url,
@@ -367,6 +450,39 @@ svn_client_import(svn_client_commit_info
 }
 
 svn_error_t *
+svn_client_commit4(svn_commit_info_t **commit_info_p,
+                   const apr_array_header_t *targets,
+                   svn_depth_t depth,
+                   svn_boolean_t keep_locks,
+                   svn_boolean_t keep_changelists,
+                   const apr_array_header_t *changelists,
+                   const apr_hash_t *revprop_table,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+  cb.saw_commit = FALSE;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  SVN_ERR(svn_client_commit5(targets, depth, keep_locks, keep_changelists,
+                             changelists, revprop_table, &shadow_ctx, pool));
+
+  if (!cb.saw_commit)
+    *commit_info_p = svn_create_commit_info(pool);
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
 svn_client_commit3(svn_commit_info_t **commit_info_p,
                    const apr_array_header_t *targets,
                    svn_boolean_t recurse,
@@ -412,6 +528,32 @@ svn_client_commit(svn_client_commit_info
 }
 
 /*** From copy.c ***/
+svn_error_t *
+svn_client_copy5(svn_commit_info_t **commit_info_p,
+                 const apr_array_header_t *sources,
+                 const char *dst_path,
+                 svn_boolean_t copy_as_child,
+                 svn_boolean_t make_parents,
+                 svn_boolean_t ignore_externals,
+                 const apr_hash_t *revprop_table,
+                 svn_client_ctx_t *ctx,
+                 apr_pool_t *pool)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_copy6(sources, dst_path, copy_as_child, make_parents,
+                          ignore_externals, revprop_table, &shadow_ctx, pool);
+}
 
 svn_error_t *
 svn_client_copy4(svn_commit_info_t **commit_info_p,
@@ -499,6 +641,33 @@ svn_client_copy(svn_client_commit_info_t
 }
 
 svn_error_t *
+svn_client_move5(svn_commit_info_t **commit_info_p,
+                 const apr_array_header_t *src_paths,
+                 const char *dst_path,
+                 svn_boolean_t force,
+                 svn_boolean_t move_as_child,
+                 svn_boolean_t make_parents,
+                 const apr_hash_t *revprop_table,
+                 svn_client_ctx_t *ctx,
+                 apr_pool_t *pool)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_move6(src_paths, dst_path, force, move_as_child,
+                          make_parents, revprop_table, &shadow_ctx, pool);
+}
+
+svn_error_t *
 svn_client_move4(svn_commit_info_t **commit_info_p,
                  const char *src_path,
                  const char *dst_path,
@@ -591,6 +760,31 @@ svn_client_move(svn_client_commit_info_t
 
 /*** From delete.c ***/
 svn_error_t *
+svn_client_delete3(svn_commit_info_t **commit_info_p,
+                   const apr_array_header_t *paths,
+                   svn_boolean_t force,
+                   svn_boolean_t keep_local,
+                   const apr_hash_t *revprop_table,
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_delete4(paths, force, keep_local, revprop_table,
+                            &shadow_ctx, pool);
+}
+
+svn_error_t *
 svn_client_delete2(svn_commit_info_t **commit_info_p,
                    const apr_array_header_t *paths,
                    svn_boolean_t force,
@@ -1281,6 +1475,36 @@ svn_client_merge_peg(const char *source,
 
 /*** From prop_commands.c ***/
 svn_error_t *
+svn_client_propset3(svn_commit_info_t **commit_info_p,
+                    const char *propname,
+                    const svn_string_t *propval,
+                    const char *target,
+                    svn_depth_t depth,
+                    svn_boolean_t skip_checks,
+                    svn_revnum_t base_revision_for_url,
+                    const apr_array_header_t *changelists,
+                    const apr_hash_t *revprop_table,
+                    svn_client_ctx_t *ctx,
+                    apr_pool_t *pool)
+{
+  svn_client_ctx_t shadow_ctx;
+  struct capture_baton_t cb;
+
+  cb.info = commit_info_p;
+  cb.pool = pool;
+  cb.original_callback = ctx->commit_callback2;
+  cb.original_baton = ctx->commit_baton;
+
+  shadow_ctx = *ctx;
+  shadow_ctx.commit_callback2 = capture_commit_info;
+  shadow_ctx.commit_baton = &cb;
+
+  return svn_client_propset4(propname, propval, target, depth, skip_checks,
+                             base_revision_for_url, changelists, revprop_table,
+                             &shadow_ctx, pool);
+}
+
+svn_error_t *
 svn_client_propset2(const char *propname,
                     const svn_string_t *propval,
                     const char *target,

Modified: subversion/branches/performance/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/diff.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/diff.c Mon Sep  6 19:13:39 2010
@@ -190,21 +190,22 @@ maybe_append_eol(const svn_string_t *tok
     }
 }
 
-/* Adjust PATH1 and PATH2, representing the original targets passed to the
- * the diff command, to handle the case when we're dealing with different
- * anchors. PATH represents the file that has changed. RELATIVE_TO_DIR is
- * the directory the diff target should be considered relative to. All
+/* Adjust PATH, ORIG_PATH_1 and ORIG_PATH_2, representing the changed file
+ * and the two original targets passed to the diff command, to handle the
+ * case when we're dealing with different anchors. RELATIVE_TO_DIR is the
+ * directory the diff target should be considered relative to. All
  * allocations are done in POOL. */
 static svn_error_t *
-adjust_paths_for_diff_labels(const char **path1,
-                             const char **path2,
-                             const char *path,
+adjust_paths_for_diff_labels(const char **path,
+                             const char **orig_path_1,
+                             const char **orig_path_2,
                              const char *relative_to_dir,
                              apr_pool_t *pool)
 {
   apr_size_t len;
-  const char *new_path1 = *path1;
-  const char *new_path2 = *path2;
+  const char *new_path = *path;
+  const char *new_path1 = *orig_path_1;
+  const char *new_path2 = *orig_path_2;
 
   /* ### Holy cow.  Due to anchor/target weirdness, we can't
      simply join diff_cmd_baton->orig_path_1 with path, ditto for
@@ -228,31 +229,31 @@ adjust_paths_for_diff_labels(const char 
      a particular style, so not calling svn_dirent_local_style() on the
      paths below.*/
   if (new_path1[0] == '\0')
-    new_path1 = apr_psprintf(pool, "%s", path);
+    new_path1 = apr_psprintf(pool, "%s", new_path);
   else if (new_path1[0] == '/')
-    new_path1 = apr_psprintf(pool, "%s\t(...%s)", path, new_path1);
+    new_path1 = apr_psprintf(pool, "%s\t(...%s)", new_path, new_path1);
   else
-    new_path1 = apr_psprintf(pool, "%s\t(.../%s)", path, new_path1);
+    new_path1 = apr_psprintf(pool, "%s\t(.../%s)", new_path, new_path1);
 
   if (new_path2[0] == '\0')
-    new_path2 = apr_psprintf(pool, "%s", path);
+    new_path2 = apr_psprintf(pool, "%s", new_path);
   else if (new_path2[0] == '/')
-    new_path2 = apr_psprintf(pool, "%s\t(...%s)", path, new_path2);
+    new_path2 = apr_psprintf(pool, "%s\t(...%s)", new_path, new_path2);
   else
-    new_path2 = apr_psprintf(pool, "%s\t(.../%s)", path, new_path2);
+    new_path2 = apr_psprintf(pool, "%s\t(.../%s)", new_path, new_path2);
 
   if (relative_to_dir)
     {
       /* Possibly adjust the paths shown in the output (see issue #2723). */
-      const char *child_path = svn_dirent_is_child(relative_to_dir, path,
+      const char *child_path = svn_dirent_is_child(relative_to_dir, new_path,
                                                    pool);
 
       if (child_path)
-        path = child_path;
-      else if (!svn_path_compare_paths(relative_to_dir, path))
-        path = ".";
+        new_path = child_path;
+      else if (!svn_path_compare_paths(relative_to_dir, new_path))
+        new_path = ".";
       else
-        return MAKE_ERR_BAD_RELATIVE_PATH(path, relative_to_dir);
+        return MAKE_ERR_BAD_RELATIVE_PATH(new_path, relative_to_dir);
 
       child_path = svn_dirent_is_child(relative_to_dir, new_path1, pool);
 
@@ -272,8 +273,9 @@ adjust_paths_for_diff_labels(const char 
       else
         return MAKE_ERR_BAD_RELATIVE_PATH(new_path2, relative_to_dir);
     }
-  *path1 = new_path1;
-  *path2 = new_path2;
+  *path = new_path;
+  *orig_path_1 = new_path1;
+  *orig_path_2 = new_path2;
 
   return SVN_NO_ERROR;
 }
@@ -319,20 +321,6 @@ display_prop_diffs(const apr_array_heade
 {
   int i;
 
-  if (relative_to_dir)
-    {
-      /* Possibly adjust the path shown in the output (see issue #2723). */
-      const char *child_path = svn_dirent_is_child(relative_to_dir, path,
-                                                   pool);
-
-      if (child_path)
-        path = child_path;
-      else if (!svn_path_compare_paths(relative_to_dir, path))
-        path = ".";
-      else
-        return MAKE_ERR_BAD_RELATIVE_PATH(path, relative_to_dir);
-    }
-
   /* If we're creating a diff on the wc root, path would be empty. */
   if (path[0] == '\0')
     path = apr_psprintf(pool, ".");
@@ -344,7 +332,7 @@ display_prop_diffs(const apr_array_heade
         const char *label1;
         const char *label2;
 
-        SVN_ERR(adjust_paths_for_diff_labels(&path1, &path2, path,
+        SVN_ERR(adjust_paths_for_diff_labels(&path, &path1, &path2,
                                              relative_to_dir, pool));
 
         label1 = diff_label(path1, rev1, pool);
@@ -699,7 +687,7 @@ diff_content_changed(const char *path,
   path1 = diff_cmd_baton->orig_path_1;
   path2 = diff_cmd_baton->orig_path_2;
 
-  SVN_ERR(adjust_paths_for_diff_labels(&path1, &path2, path,
+  SVN_ERR(adjust_paths_for_diff_labels(&path, &path1, &path2,
                                        rel_to_dir, subpool));
 
   label1 = diff_label(path1, rev1, subpool);

Modified: subversion/branches/performance/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/export.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/export.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/export.c Mon Sep  6 19:13:39 2010
@@ -1088,7 +1088,8 @@ svn_client_export5(svn_revnum_t *result_
               SVN_ERR(svn_client__fetch_externals(eb->externals,
                                                   from, to_abspath,
                                                   repos_root_url, depth, TRUE,
-                                                  &use_sleep, ctx, pool));
+                                                  native_eol, &use_sleep,
+                                                  ctx, pool));
             }
         }
       else if (kind == svn_node_none)

Modified: subversion/branches/performance/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/externals.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/externals.c Mon Sep  6 19:13:39 2010
@@ -62,6 +62,9 @@ struct handle_external_item_change_baton
   /* Passed through to svn_client_* functions. */
   svn_client_ctx_t *ctx;
 
+  /* Passed to svn_client_exportX() */
+  const char *native_eol;
+
   svn_boolean_t *timestamp_sleep;
   svn_boolean_t is_export;
 
@@ -274,9 +277,10 @@ switch_dir_external(const char *path,
       baton.cancel_baton = ctx->cancel_baton;
 
       /* Buh-bye, old and busted ... */
-      SVN_ERR(svn_wc__call_with_write_lock(relegate_dir_external, &baton,
-                                           ctx->wc_ctx, local_abspath,
-                                           pool, pool));
+      SVN_ERR(svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, local_abspath,
+                                         FALSE, pool, pool));
+      
+      SVN_ERR(relegate_dir_external(&baton, pool, pool));
     }
   else
     {
@@ -362,7 +366,7 @@ switch_file_external(const char *path,
            url, dest_wc_repos_root_url);
 
       SVN_ERR(svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, anchor_abspath,
-                                         subpool, subpool));
+                                         FALSE, subpool, subpool));
     }
 
   err = svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE, subpool);
@@ -854,7 +858,8 @@ handle_external_item_change(const void *
             SVN_ERR(svn_client_export4(NULL, new_item->url, local_abspath,
                                        &(new_item->peg_revision),
                                        &(new_item->revision),
-                                       TRUE, FALSE, svn_depth_infinity, NULL,
+                                       TRUE, FALSE, svn_depth_infinity, 
+                                       ib->native_eol,
                                        ib->ctx, ib->iter_pool));
           else
             SVN_ERR(svn_client__checkout_internal
@@ -909,7 +914,7 @@ handle_external_item_change(const void *
       if (! lock_existed)
         {
           SVN_ERR(svn_wc__acquire_write_lock(NULL, ib->ctx->wc_ctx,
-                                             local_abspath,
+                                             local_abspath, FALSE,
                                              ib->iter_pool,
                                              ib->iter_pool));
         }
@@ -1067,6 +1072,9 @@ struct handle_externals_desc_change_bato
   svn_boolean_t *timestamp_sleep;
   svn_boolean_t is_export;
 
+  /* Passed to svn_client_exportX() */
+  const char *native_eol;
+
   apr_pool_t *pool;
 };
 
@@ -1157,6 +1165,7 @@ handle_externals_desc_change(const void 
   ib.repos_root_url    = cb->repos_root_url;
   ib.ctx               = cb->ctx;
   ib.is_export         = cb->is_export;
+  ib.native_eol        = cb->native_eol;
   ib.timestamp_sleep   = cb->timestamp_sleep;
   ib.pool              = cb->pool;
   ib.iter_pool         = svn_pool_create(cb->pool);
@@ -1261,6 +1270,7 @@ svn_client__handle_externals(apr_hash_t 
   cb.ctx               = ctx;
   cb.timestamp_sleep   = timestamp_sleep;
   cb.is_export         = FALSE;
+  cb.native_eol        = NULL;
   cb.pool              = pool;
 
   return svn_hash_diff(cb.externals_old, cb.externals_new,
@@ -1275,6 +1285,7 @@ svn_client__fetch_externals(apr_hash_t *
                             const char *repos_root_url,
                             svn_depth_t requested_depth,
                             svn_boolean_t is_export,
+                            const char *native_eol,
                             svn_boolean_t *timestamp_sleep,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool)
@@ -1292,6 +1303,7 @@ svn_client__fetch_externals(apr_hash_t *
   cb.to_abspath        = to_abspath;
   cb.repos_root_url    = repos_root_url;
   cb.timestamp_sleep   = timestamp_sleep;
+  cb.native_eol        = native_eol;
   cb.is_export         = is_export;
   cb.pool              = pool;
 

Modified: subversion/branches/performance/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/performance/subversion/libsvn_client/merge.c?rev=993127&r1=993126&r2=993127&view=diff
==============================================================================
--- subversion/branches/performance/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/performance/subversion/libsvn_client/merge.c Mon Sep  6 19:13:39 2010
@@ -8974,8 +8974,9 @@ svn_client_merge3(const char *source1,
   baton.ctx = ctx;
 
   if (!dry_run)
-    SVN_ERR(svn_wc__call_with_write_lock(merge_cb, &baton, ctx->wc_ctx,
-                                         lock_abspath, pool, pool));
+    SVN_ERR(svn_wc__call_with_write_lock(merge_cb, &baton,
+                                         ctx->wc_ctx, lock_abspath, FALSE,
+                                         pool, pool));
   else
     SVN_ERR(merge_cb(&baton, pool, pool));
 
@@ -10158,7 +10159,7 @@ svn_client_merge_reintegrate(const char 
 
   if (!dry_run)
     SVN_ERR(svn_wc__call_with_write_lock(merge_reintegrate_cb, &baton,
-                                         ctx->wc_ctx, lock_abspath,
+                                         ctx->wc_ctx, lock_abspath, FALSE,
                                          pool, pool));
   else
     SVN_ERR(merge_reintegrate_cb(&baton, pool, pool));
@@ -10317,8 +10318,9 @@ svn_client_merge_peg3(const char *source
   baton.ctx = ctx;
 
   if (!dry_run)
-    SVN_ERR(svn_wc__call_with_write_lock(merge_peg_cb, &baton, ctx->wc_ctx,
-                                         lock_abspath, pool, pool));
+    SVN_ERR(svn_wc__call_with_write_lock(merge_peg_cb, &baton,
+                                         ctx->wc_ctx, lock_abspath, FALSE,
+                                         pool, pool));
   else
     SVN_ERR(merge_peg_cb(&baton, pool, pool));