You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/08/06 16:01:40 UTC

svn commit: r1694500 [2/7] - in /subversion/branches/fsx-1.10: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ subversion/bindings/ctypes-python/csvn/ext/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apac...

Modified: subversion/branches/fsx-1.10/subversion/include/private/svn_ra_svn_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/private/svn_ra_svn_private.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/private/svn_ra_svn_private.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/private/svn_ra_svn_private.h Thu Aug  6 14:01:38 2015
@@ -347,7 +347,7 @@ svn_error_t *
 svn_ra_svn__write_cmd_open_root(svn_ra_svn_conn_t *conn,
                                 apr_pool_t *pool,
                                 svn_revnum_t rev,
-                                const char *token);
+                                const svn_string_t *token);
 
 /** Send a "delete-entry" command over connection @a conn.  Delete the
  * @a path at optional revision @a rev below @a parent_token.
@@ -358,7 +358,7 @@ svn_ra_svn__write_cmd_delete_entry(svn_r
                                    apr_pool_t *pool,
                                    const char *path,
                                    svn_revnum_t rev,
-                                   const char *parent_token);
+                                   const svn_string_t *parent_token);
 
 /** Send a "add-dir" command over connection @a conn.  Add a new directory
  * node named @a path under the directory identified by @a parent_token.
@@ -370,8 +370,8 @@ svn_error_t *
 svn_ra_svn__write_cmd_add_dir(svn_ra_svn_conn_t *conn,
                               apr_pool_t *pool,
                               const char *path,
-                              const char *parent_token,
-                              const char *token,
+                              const svn_string_t *parent_token,
+                              const svn_string_t *token,
                               const char *copy_path,
                               svn_revnum_t copy_rev);
 
@@ -384,8 +384,8 @@ svn_error_t *
 svn_ra_svn__write_cmd_open_dir(svn_ra_svn_conn_t *conn,
                                apr_pool_t *pool,
                                const char *path,
-                               const char *parent_token,
-                               const char *token,
+                               const svn_string_t *parent_token,
+                               const svn_string_t *token,
                                svn_revnum_t rev);
 
 /** Send a "change-dir-prop" command over connection @a conn.  Set the
@@ -395,7 +395,7 @@ svn_ra_svn__write_cmd_open_dir(svn_ra_sv
 svn_error_t *
 svn_ra_svn__write_cmd_change_dir_prop(svn_ra_svn_conn_t *conn,
                                       apr_pool_t *pool,
-                                      const char *token,
+                                      const svn_string_t *token,
                                       const char *name,
                                       const svn_string_t *value);
 
@@ -406,7 +406,7 @@ svn_ra_svn__write_cmd_change_dir_prop(sv
 svn_error_t *
 svn_ra_svn__write_cmd_close_dir(svn_ra_svn_conn_t *conn,
                                 apr_pool_t *pool,
-                                const char *token);
+                                const svn_string_t *token);
 
 /** Send a "absent-dir" command over connection @a conn.  Directory node
  * named @a path under the directory identified by @a parent_token is
@@ -416,7 +416,7 @@ svn_error_t *
 svn_ra_svn__write_cmd_absent_dir(svn_ra_svn_conn_t *conn,
                                  apr_pool_t *pool,
                                  const char *path,
-                                 const char *parent_token);
+                                 const svn_string_t *parent_token);
 
 /** Send a "add-file" command over connection @a conn.  Add a new file
  * node named @a path under the directory identified by @a parent_token.
@@ -428,8 +428,8 @@ svn_error_t *
 svn_ra_svn__write_cmd_add_file(svn_ra_svn_conn_t *conn,
                                apr_pool_t *pool,
                                const char *path,
-                               const char *parent_token,
-                               const char *token,
+                               const svn_string_t *parent_token,
+                               const svn_string_t *token,
                                const char *copy_path,
                                svn_revnum_t copy_rev);
 
@@ -442,8 +442,8 @@ svn_error_t *
 svn_ra_svn__write_cmd_open_file(svn_ra_svn_conn_t *conn,
                                 apr_pool_t *pool,
                                 const char *path,
-                                const char *parent_token,
-                                const char *token,
+                                const svn_string_t *parent_token,
+                                const svn_string_t *token,
                                 svn_revnum_t rev);
 
 /** Send a "change-file-prop" command over connection @a conn.  Set the
@@ -453,7 +453,7 @@ svn_ra_svn__write_cmd_open_file(svn_ra_s
 svn_error_t *
 svn_ra_svn__write_cmd_change_file_prop(svn_ra_svn_conn_t *conn,
                                        apr_pool_t *pool,
-                                       const char *token,
+                                       const svn_string_t *token,
                                        const char *name,
                                        const svn_string_t *value);
 
@@ -465,7 +465,7 @@ svn_ra_svn__write_cmd_change_file_prop(s
 svn_error_t *
 svn_ra_svn__write_cmd_close_file(svn_ra_svn_conn_t *conn,
                                  apr_pool_t *pool,
-                                 const char *token,
+                                 const svn_string_t *token,
                                  const char *text_checksum);
 
 /** Send a "absent-file" command over connection @a conn.  File node
@@ -476,7 +476,7 @@ svn_error_t *
 svn_ra_svn__write_cmd_absent_file(svn_ra_svn_conn_t *conn,
                                   apr_pool_t *pool,
                                   const char *path,
-                                  const char *parent_token);
+                                  const svn_string_t *parent_token);
 
 /** Send a "apply-textdelta" command over connection @a conn.  Starts a
  * series of text deltas to be applied to the file identified by @a token.
@@ -486,7 +486,7 @@ svn_ra_svn__write_cmd_absent_file(svn_ra
 svn_error_t *
 svn_ra_svn__write_cmd_apply_textdelta(svn_ra_svn_conn_t *conn,
                                       apr_pool_t *pool,
-                                      const char *token,
+                                      const svn_string_t *token,
                                       const char *base_checksum);
 
 /** Send a "textdelta-chunk" command over connection @a conn.  Apply
@@ -496,7 +496,7 @@ svn_ra_svn__write_cmd_apply_textdelta(sv
 svn_error_t *
 svn_ra_svn__write_cmd_textdelta_chunk(svn_ra_svn_conn_t *conn,
                                       apr_pool_t *pool,
-                                      const char *token,
+                                      const svn_string_t *token,
                                       const svn_string_t *chunk);
 
 /** Send a "textdelta-end" command over connection @a conn.  Ends the
@@ -506,7 +506,7 @@ svn_ra_svn__write_cmd_textdelta_chunk(sv
 svn_error_t *
 svn_ra_svn__write_cmd_textdelta_end(svn_ra_svn_conn_t *conn,
                                     apr_pool_t *pool,
-                                    const char *token);
+                                    const svn_string_t *token);
 
 /** Send a "close-edit" command over connection @a conn.  Ends the editor
  * drive (successfully).  Use @a pool for allocations.
@@ -790,7 +790,7 @@ svn_error_t *
 svn_ra_svn__write_cmd_unlock(svn_ra_svn_conn_t *conn,
                              apr_pool_t *pool,
                              const char *path,
-                             const char *token,
+                             const svn_string_t *token,
                              svn_boolean_t break_lock);
 
 /** Send a "get-lock" command over connection @a conn.

Modified: subversion/branches/fsx-1.10/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/private/svn_wc_private.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/private/svn_wc_private.h Thu Aug  6 14:01:38 2015
@@ -1849,6 +1849,17 @@ svn_wc__diff7(const char **root_relpath,
               apr_pool_t *result_pool,
               apr_pool_t *scratch_pool);
 
+/**
+ * Read all conflicts at LOCAL_ABSPATH into an array containing pointers to
+ * svn_wc_conflict_description2_t data structures alloated in RESULT_POOL.
+ */
+svn_error_t *
+svn_wc__read_conflict_descriptions2_t(const apr_array_header_t **conflicts,
+                                      svn_wc_context_t *wc_ctx,
+                                      const char *local_abspath,
+                                      apr_pool_t *result_pool,
+                                      apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/fsx-1.10/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/svn_client.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/svn_client.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/svn_client.h Thu Aug  6 14:01:38 2015
@@ -4362,13 +4362,216 @@ svn_client_revert(const apr_array_header
  */
 
 /**
+ * An opaque type which represents a conflicted node in the working copy.
+ *
+ * @since New in 1.10.
+ */
+typedef struct svn_client_conflict_t svn_client_conflict_t;
+
+/**
+ * An opaque type which represents a resolution option for a conflict.
+ *
+ * @since New in 1.10.
+ */
+typedef struct svn_client_conflict_option_t svn_client_conflict_option_t;
+
+/**
+ * A public enumuneration of conflict option IDs.
+ *
+ * @since New in 1.10, unless noted otherwise.
+ */
+typedef enum svn_client_conflict_option_id_t {
+
+  /* These values intentionally mirror svn_wc_conflict_choice_t. */
+  svn_client_conflict_option_undefined = -1, /* for private use only */
+  svn_client_conflict_option_postpone = 0,
+  svn_client_conflict_option_base_text,
+  svn_client_conflict_option_incoming_new_text,
+  svn_client_conflict_option_working_text,
+  svn_client_conflict_option_incoming_new_text_for_conflicted_hunks_only,
+  svn_client_conflict_option_working_text_for_conflicted_hunks_only,
+  svn_client_conflict_option_merged_text,
+  svn_client_conflict_option_unspecified
+  /* Values derived from svn_wc_conflict_choice_t end here. */
+
+} svn_client_conflict_option_id_t;
+
+/**
+ * Set a merged property value on @a option to @a merged_propval.
+ * 
+ * Setting the merged value is required before resolving the property
+ * conflict using an option with ID svn_client_conflict_option_merged_text.
+ *
+ * The contents of @a merged_propval are not copied, so the storage it
+ * points to needs to remain valid until svn_client_conflict_prop_resolve()
+ * has been called with @a option.
+ *
+ * @since New in 1.10.
+ */
+void
+svn_client_conflict_option_set_merged_propval(
+  svn_client_conflict_option_t *option,
+  const svn_string_t *merged_propval);
+
+/**
+ * Given an @a option_id, try to find the corresponding option in @a options,
+ * which is an array of svn_client_conflict_option_t * elements.
+ *
+ * Return NULL if no corresponding option can be be found.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_t *
+svn_client_conflict_option_find_by_id(
+  apr_array_header_t *options,
+  svn_client_conflict_option_id_t option_id);
+
+/**
+ * Return a conflict for the conflicted path @a local_abspath.
+ * 
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_get(svn_client_conflict_t **conflict,
+                        const char *local_abspath,
+                        svn_client_ctx_t *ctx,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
+
+/**
+ * Return a conflict corresponding to legacy conflict description @a desc.
+ * 
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_from_wc_description2_t(
+  svn_client_conflict_t **conflict,
+  const svn_wc_conflict_description2_t *desc,
+  apr_pool_t *result_pool,
+  apr_pool_t *scratch_pool);
+
+/**
+ * Callback for svn_client_conflict_walk_conflicts();
+ * 
+ * @since New in 1.10.
+ */
+typedef svn_error_t *(svn_client_conflict_walk_func_t)(
+  void *baton,
+  svn_client_conflict_t *conflict,
+  apr_pool_t *scratch_pool);
+
+/**
+ * Walk all conflicts within the specified @a depth of @a local_abspath.
+ * Pass each conflict found during the walk to the @conflict_walk_func
+ * callback, along with @a conflict_walk_func_baton.
+ * Use cancellation and notification support provided by client context @a ctx.
+ * 
+ * This callback may choose to resolve the conflict. If the act of resolving
+ * a conflict creates new conflicts within the walked working copy (as might
+ * be the case for some tree conflicts), the callback will be invoked for each
+ * such new conflict as well.
+ * 
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_walk(const char *local_abspath,
+                         svn_depth_t depth,
+                         svn_client_conflict_walk_func_t conflict_walk_func,
+                         void *conflict_walk_func_baton,
+                         svn_client_ctx_t *ctx,
+                         apr_pool_t *scratch_pool);
+
+/**
+* Indicate the types of conflicts present on the working copy node
+* described by @a conflict. Any output argument may be @c NULL if
+* the caller is not interested in the status of a particular type.
+*
+* The returned @a *props_conflicted array is allocated in @a result_pool.
+* It contains the names of conflicted properties. If no property conflict
+* exists, the array will contain no elements.
+*
+* @since New in 1.10. 
+*/
+svn_error_t *
+svn_client_conflict_get_conflicted(svn_boolean_t *text_conflicted,
+                                   apr_array_header_t **props_conflicted,
+                                   svn_boolean_t *tree_conflicted,
+                                   svn_client_conflict_t *conflict,
+                                   apr_pool_t *result_pool,
+                                   apr_pool_t *scratch_pool);
+
+/**
+ * Set @a *options to an array of pointers to svn_client_conflict_option_t
+ * objects applicable to text conflicts described by @a conflict.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_text_get_resolution_options(apr_array_header_t **options,
+                                                svn_client_conflict_t *conflict,
+                                                apr_pool_t *result_pool,
+                                                apr_pool_t *scratch_pool);
+
+/**
+ * Set @a *options to an array of pointers to svn_client_conflict_option_t
+ * objects applicable to property conflicts described by @a conflict.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_prop_get_resolution_options(apr_array_header_t **options,
+                                                svn_client_conflict_t *conflict,
+                                                apr_pool_t *result_pool,
+                                                apr_pool_t *scratch_pool);
+
+/**
+ * Set @a *options to an array of pointers to svn_client_conflict_option_t
+ * objects applicable to the tree conflict described by @a conflict.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_tree_get_resolution_options(apr_array_header_t **options,
+                                                svn_client_conflict_t *conflict,
+                                                apr_pool_t *result_pool,
+                                                apr_pool_t *scratch_pool);
+
+/**
+ * Return an ID for @a option. This ID can be used by callers to associate
+ * arbitrary data with a particular conflict resolution option.
+ *
+ * The ID of a particular resolution option will never change in future
+ * revisions of this API.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_id_t
+svn_client_conflict_option_get_id(svn_client_conflict_option_t *option);
+
+/**
+ * Return a textual human-readable description of @a option, allocated in
+ * @a result_pool. The description is encoded in UTF-8 and may contain
+ * multiple lines separated by @c APR_EOL_STR.
+ *
+ * Additionally, the description may be localized to the language used
+ * by the current locale.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_option_describe(const char **description,
+                                    svn_client_conflict_option_t *option,
+                                    apr_pool_t *result_pool,
+                                    apr_pool_t *scratch_pool);
+
+/**
  * Return the kind of conflict (text conflict, property conflict,
  * or tree conflict) represented by @a conflict.
  *
  * New in 1.10.
  */
 svn_wc_conflict_kind_t
-svn_client_conflict_get_kind(const svn_wc_conflict_description2_t *conflict);
+svn_client_conflict_get_kind(const svn_client_conflict_t *conflict);
 
 /**
  * Return the absolute path to the conflicted working copy node described
@@ -4377,8 +4580,7 @@ svn_client_conflict_get_kind(const svn_w
  * @since New in 1.10. 
  */
 const char *
-svn_client_conflict_get_local_abspath(
-  const svn_wc_conflict_description2_t *conflict);
+svn_client_conflict_get_local_abspath(const svn_client_conflict_t *conflict);
 
 /**
  * Return the operation during which the conflict described by @a
@@ -4387,8 +4589,7 @@ svn_client_conflict_get_local_abspath(
  * @since New in 1.10. 
  */
 svn_wc_operation_t
-svn_client_conflict_get_operation(
-  const svn_wc_conflict_description2_t *conflict);
+svn_client_conflict_get_operation(const svn_client_conflict_t *conflict);
 
 /**
  * Return the action an update, switch, or merge operation attempted to
@@ -4397,8 +4598,7 @@ svn_client_conflict_get_operation(
  * @since New in 1.10. 
  */
 svn_wc_conflict_action_t
-svn_client_conflict_get_incoming_change(
-  const svn_wc_conflict_description2_t *conflict);
+svn_client_conflict_get_incoming_change(const svn_client_conflict_t *conflict);
 
 /**
  * Return the reason why the attempted action performed by an update, switch,
@@ -4412,8 +4612,7 @@ svn_client_conflict_get_incoming_change(
  * @since New in 1.10. 
  */
 svn_wc_conflict_reason_t
-svn_client_conflict_get_local_change(
-  const svn_wc_conflict_description2_t *conflict);
+svn_client_conflict_get_local_change(const svn_client_conflict_t *conflict);
 
 /**
  * Return information about the repository associated with @a conflict. 
@@ -4423,12 +4622,11 @@ svn_client_conflict_get_local_change(
  * @since New in 1.10.
  */
 svn_error_t *
-svn_client_conflict_get_repos_info(
-  const char **repos_root_url,
-  const char **repos_uuid,
-  const svn_wc_conflict_description2_t *conflict,
-  apr_pool_t *result_pool,
-  apr_pool_t *scratch_pool);
+svn_client_conflict_get_repos_info(const char **repos_root_url,
+                                   const char **repos_uuid,
+                                   const svn_client_conflict_t *conflict,
+                                   apr_pool_t *result_pool,
+                                   apr_pool_t *scratch_pool);
 
 /**
  * Return the repository-relative location and the node kind of the incoming
@@ -4461,7 +4659,7 @@ svn_client_conflict_get_incoming_old_rep
   const char **incoming_old_repos_relpath,
   svn_revnum_t *incoming_old_regrev,
   svn_node_kind_t *incoming_old_node_kind,
-  const svn_wc_conflict_description2_t *conflict,
+  const svn_client_conflict_t *conflict,
   apr_pool_t *result_pool,
   apr_pool_t *scratch_pool);
 
@@ -4478,7 +4676,7 @@ svn_client_conflict_get_incoming_new_rep
   const char **incoming_new_repos_relpath,
   svn_revnum_t *incoming_new_regrev,
   svn_node_kind_t *incoming_new_node_kind,
-  const svn_wc_conflict_description2_t *conflict,
+  const svn_client_conflict_t *conflict,
   apr_pool_t *result_pool,
   apr_pool_t *scratch_pool);
 
@@ -4491,7 +4689,41 @@ svn_client_conflict_get_incoming_new_rep
  */
 svn_node_kind_t
 svn_client_conflict_tree_get_victim_node_kind(
-  const svn_wc_conflict_description2_t *conflict);
+  const svn_client_conflict_t *conflict);
+
+/**
+ * Resolve a tree @a conflict using resolution option @a option.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_tree_resolve(svn_client_conflict_t *conflict,
+                                 svn_client_conflict_option_t *option,
+                                 apr_pool_t *scratch_pool);
+
+/**
+ * If the provided @a option_id is the ID of an option which resolves
+ * @a conflict, resolve the tree conflict using that option.
+ * Else, return an error.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_tree_resolve_by_id(
+  svn_client_conflict_t *conflict,
+  svn_client_conflict_option_id_t option_id,
+  apr_pool_t *scratch_pool);
+
+/**
+ * Return the ID of the option this tree @a conflict has been resolved to.
+ * If the conflict has not been resolved yet, then return
+ * @c svn_client_conflict_option_undefined.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_id_t
+svn_client_conflict_tree_get_resolution(const svn_client_conflict_t *conflict);
+
 
 /**
  * Return the name of the conflicted property represented by @a conflict.
@@ -4499,8 +4731,20 @@ svn_client_conflict_tree_get_victim_node
  * @since New in 1.10.
  */
 const char *
-svn_client_conflict_prop_get_propname(
-  const svn_wc_conflict_description2_t *conflict);
+svn_client_conflict_prop_get_propname(const svn_client_conflict_t *conflict);
+
+/**
+ * Return the path to the legacy property conflicts reject file
+ * for the property conflicts represented by @a conflict.
+ *
+ * This function exists for backwards compatibility only and should not be
+ * used in new code.
+ *
+ * @since New in 1.10.
+ */
+const char *
+svn_client_conflict_prop_get_reject_abspath(
+  const svn_client_conflict_t *conflict);
 
 /**
  * Return the set of property values involved in the property conflict
@@ -4514,13 +4758,50 @@ svn_client_conflict_prop_get_propname(
  * @since New in 1.10.
  */
 svn_error_t *
-svn_client_conflict_prop_get_propvals(
-  const svn_string_t **base_propval,
-  const svn_string_t **working_propval,
-  const svn_string_t **incoming_old_propval,
-  const svn_string_t **incoming_new_propval,
-  const svn_wc_conflict_description2_t *conflict,
-  apr_pool_t *result_pool);
+svn_client_conflict_prop_get_propvals(const svn_string_t **base_propval,
+                                      const svn_string_t **working_propval,
+                                      const svn_string_t **incoming_old_propval,
+                                      const svn_string_t **incoming_new_propval,
+                                      const svn_client_conflict_t *conflict,
+                                      apr_pool_t *result_pool);
+
+/**
+ * Resolve a property @a conflict in property @a propname using resolution
+ * option @a option. To resolve all properties to the same option at once,
+ * set @a propname to the empty string "".
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_prop_resolve(svn_client_conflict_t *conflict,
+                                 const char *propname,
+                                 svn_client_conflict_option_t *option,
+                                 apr_pool_t *scratch_pool);
+/**
+ * If the provided @a option_id is the ID of an option which resolves
+ * @a conflict, resolve the property conflict in property @a propname
+ * using that option. Else, return an error.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_prop_resolve_by_id(
+  svn_client_conflict_t *conflict,
+  const char *propname,
+  svn_client_conflict_option_id_t option_id,
+  apr_pool_t *scratch_pool);
+
+/**
+ * Return the ID of the option this property @a conflict in property
+ * @a propname has been resolved to.
+ * If the conflict has not been resolved yet, then return
+ * @c svn_client_conflict_option_undefined.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_id_t
+svn_client_conflict_prop_get_resolution(const svn_client_conflict_t *conflict,
+                                        const char *propname);
 
 /**
  * Return the MIME-type of the working version of the text-conflicted file
@@ -4530,8 +4811,7 @@ svn_client_conflict_prop_get_propvals(
  * @since: New in 1.10.
  */
 const char *
-svn_client_conflict_text_get_mime_type(
-  const svn_wc_conflict_description2_t *conflict);
+svn_client_conflict_text_get_mime_type(const svn_client_conflict_t *conflict);
 
 /**
  * Return absolute paths to the versions of the text-conflicted file 
@@ -4543,25 +4823,46 @@ svn_client_conflict_text_get_mime_type(
  * @since: New in 1.10.
  */
 svn_error_t *
-svn_client_conflict_text_get_contents(
-  const char **base_abspath,
-  const char **working_abspath,
-  const char **incoming_old_abspath,
-  const char **incoming_new_abspath,
-  const svn_wc_conflict_description2_t *conflict,
-  apr_pool_t *result_pool,
-  apr_pool_t *scratch_pool);
+svn_client_conflict_text_get_contents(const char **base_abspath,
+                                      const char **working_abspath,
+                                      const char **incoming_old_abspath,
+                                      const char **incoming_new_abspath,
+                                      const svn_client_conflict_t *conflict,
+                                      apr_pool_t *result_pool,
+                                      apr_pool_t *scratch_pool);
 
 /**
- * Accessor functions for svn_wc_conflict_description2_t. This is a temporary
- * API for eventually replacing svn_wc_conflict_description2_t with an opaque
- * type and providing improved APIs for conflict resolution.
- * 
- * @since New in 1.10. 
+ * Resolve a text @a conflict using resolution option @a option.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_client_conflict_text_resolve(svn_client_conflict_t *conflict,
+                                 svn_client_conflict_option_t *option,
+                                 apr_pool_t *scratch_pool);
+
+/**
+ * If the provided @a option_id is the ID of an option which resolves
+ * @a conflict, resolve the text conflict using that option.
+ * Else, return an error.
+ *
+ * @since New in 1.10.
  */
+svn_error_t *
+svn_client_conflict_text_resolve_by_id(
+  svn_client_conflict_t *conflict,
+  svn_client_conflict_option_id_t option_id,
+  apr_pool_t *scratch_pool);
 
-#define svn_client_conflict_get_merged_file(conflict) \
-  ((conflict)->merged_file)
+/**
+ * Return the ID of the option this text @a conflict has been resolved to.
+ * If the conflict has not been resolved yet, then return
+ * @c svn_client_conflict_option_undefined.
+ *
+ * @since New in 1.10.
+ */
+svn_client_conflict_option_id_t
+svn_client_conflict_text_get_resolution(const svn_client_conflict_t *conflict);
 
 /** @} */
 

Modified: subversion/branches/fsx-1.10/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/svn_error_codes.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/svn_error_codes.h Thu Aug  6 14:01:38 2015
@@ -922,11 +922,6 @@ SVN_ERROR_START
              SVN_ERR_REPOS_CATEGORY_START + 10,
              "Repository upgrade is not supported")
 
-  /** @since New in 1.9. */
-  SVN_ERRDEF(SVN_ERR_REPOS_VERIFY_FAILED,
-             SVN_ERR_REPOS_CATEGORY_START + 11,
-             "Repository verification failed")
-
   /* generic RA errors */
 
   SVN_ERRDEF(SVN_ERR_RA_ILLEGAL_URL,
@@ -1497,6 +1492,11 @@ SVN_ERROR_START
              SVN_ERR_CL_CATEGORY_START + 11,
              "Failed processing one or more externals definitions")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_CL_REPOS_VERIFY_FAILED,
+             SVN_ERR_CL_CATEGORY_START + 12,
+             "Repository verification failed")
+
   /* ra_svn errors */
 
   SVN_ERRDEF(SVN_ERR_RA_SVN_CMD_ERR,

Modified: subversion/branches/fsx-1.10/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/svn_fs.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/svn_fs.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/svn_fs.h Thu Aug  6 14:01:38 2015
@@ -2962,7 +2962,13 @@ typedef enum svn_fs_pack_notify_action_t
 
   /** packing of the shard revprops has completed
       @since New in 1.7. */
-  svn_fs_pack_notify_end_revprop
+  svn_fs_pack_notify_end_revprop,
+
+  /** pack has been a no-op for this repository.  The next / future packable
+      shard will be given.  If the shard is -1, then the repository does not
+      support packing at all.
+      @since New in 1.10. */
+  svn_fs_pack_notify_noop
 
 } svn_fs_pack_notify_action_t;
 

Modified: subversion/branches/fsx-1.10/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/svn_repos.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/svn_repos.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/svn_repos.h Thu Aug  6 14:01:38 2015
@@ -234,9 +234,6 @@ typedef enum svn_repos_notify_action_t
   /** The structure of a revision is being verified.  @since New in 1.8. */
   svn_repos_notify_verify_rev_structure,
 
-  /** A revision is found with corruption/errors. @since New in 1.9. */
-  svn_repos_notify_failure,
-
   /** A revprop shard got packed. @since New in 1.9. */
   svn_repos_notify_pack_revprops,
 
@@ -247,7 +244,13 @@ typedef enum svn_repos_notify_action_t
   svn_repos_notify_format_bumped,
 
   /** A revision range was copied. @since New in 1.9. */
-  svn_repos_notify_hotcopy_rev_range
+  svn_repos_notify_hotcopy_rev_range,
+
+  /** The repository pack did not do anything. @since New in 1.10. */
+  svn_repos_notify_pack_noop,
+
+  /** The revision properties got set. @since New in 1.10. */
+  svn_repos_notify_load_revprop_set
 } svn_repos_notify_action_t;
 
 /** The type of warning occurring.
@@ -348,11 +351,6 @@ typedef struct svn_repos_notify_t
   /** For #svn_repos_notify_load_node_start, the path of the node. */
   const char *path;
 
-  /** For #svn_repos_notify_failure, this error chain indicates what
-      went wrong during verification.
-      @since New in 1.9. */
-  svn_error_t *err;
-
   /** For #svn_repos_notify_hotcopy_rev_range, the start of the copied
       revision range.
       @since New in 1.9. */
@@ -2825,6 +2823,28 @@ enum svn_repos_load_uuid
   svn_repos_load_uuid_force
 };
 
+/** Callback type for use with svn_repos_verify_fs3().  @a revision
+ * and @a verify_err are the details of a single verification failure
+ * that occurred during the svn_repos_verify_fs3() call.  @a baton is
+ * the same baton given to svn_repos_verify_fs3().  @a scratch_pool is
+ * provided for the convenience of the implementor, who should not
+ * expect it to live longer than a single callback call.
+ *
+ * @a verify_err will be cleared and becomes invalid after the callback
+ * returns, use svn_error_dup() to preserve the error.  If a callback uses
+ * @a verify_err as the return value or as a part of the return value, it
+ * should also call svn_error_dup() for @a verify_err.  Implementors of this
+ * callback are forbidden to call svn_error_clear() for @a verify_err.
+ *
+ * @see svn_repos_verify_fs3
+ *
+ * @since New in 1.9.
+ */
+typedef svn_error_t *(*svn_repos_verify_callback_t)(void *baton,
+                                                    svn_revnum_t revision,
+                                                    svn_error_t *verify_err,
+                                                    apr_pool_t *scratch_pool);
+
 /**
  * Verify the contents of the file system in @a repos.
  *
@@ -2835,9 +2855,6 @@ enum svn_repos_load_uuid
  * range, then also verify "global invariants" of the repository, as
  * described in svn_fs_verify().
  *
- * When a failure is found, if @a keep_going is @c TRUE then continue
- * verification from the next revision, otherwise stop.
- *
  * If @a check_normalization is @c TRUE, report any name collisions
  * within the same directory or svn:mergeinfo property where the names
  * differ only in character representation, but are otherwise
@@ -2848,25 +2865,31 @@ enum svn_repos_load_uuid
  * file context reconstruction and verification.  For FSFS format 7+ and
  * FSX, this allows for a very fast check against external corruption.
  *
+ * If @a verify_callback is not @c NULL, call it with @a verify_baton upon
+ * receiving an FS-specific structure failure or a revision verification
+ * failure.  Set @c revision callback argument to #SVN_INVALID_REVNUM or
+ * to the revision number respectively.  Set @c verify_err to svn_error_t
+ * describing the reason of the failure.  @c verify_err will be cleared
+ * after the callback returns, use svn_error_dup() to preserve the error.
+ * If @a verify_callback returns an error different from #SVN_NO_ERROR,
+ * stop verifying the repository and immediately return the error from
+ * @a verify_callback.
+ *
+ * If @a verify_callback is @c NULL, this function returns the first
+ * encountered verification error or #SVN_NO_ERROR if there were no failures
+ * during the verification.  Errors that prevent the verification process
+ * from continuing, such as #SVN_ERR_CANCELLED, are returned immediately
+ * and do not trigger an invocation of @a verify_callback.
+ *
  * If @a notify_func is not null, then call it with @a notify_baton and
  * with a notification structure in which the fields are set as follows.
- * (For a warning or error notification that does not apply to a specific
- * revision, the revision number is #SVN_INVALID_REVNUM.)
+ * (For a warning that does not apply to a specific revision, the revision
+ * number is #SVN_INVALID_REVNUM.)
  *
  *   For each FS-specific structure warning:
  *      @c action = svn_repos_notify_verify_rev_structure
  *      @c revision = the revision or #SVN_INVALID_REVNUM
  *
- *   For a FS-specific structure failure:
- *      @c action = #svn_repos_notify_failure
- *      @c revision = #SVN_INVALID_REVNUM
- *      @c err = the corresponding error chain
- *
- *   For each revision verification failure:
- *      @c action = #svn_repos_notify_failure
- *      @c revision = the revision
- *      @c err = the corresponding error chain
- *
  *   For each revision verification warning:
  *      @c action = #svn_repos_notify_warning
  *      @c warning and @c warning_str fields set accordingly
@@ -2888,10 +2911,7 @@ enum svn_repos_load_uuid
  *
  * Use @a scratch_pool for temporary allocation.
  *
- * Return an error if there were any failures during verification, or
- * #SVN_NO_ERROR if there were no failures.  A failure means an event that,
- * if a notification callback were provided, would send a notification
- * with @c action = #svn_repos_notify_failure.
+ * @see svn_repos_verify_callback_t
  *
  * @since New in 1.9.
  */
@@ -2899,18 +2919,20 @@ svn_error_t *
 svn_repos_verify_fs3(svn_repos_t *repos,
                      svn_revnum_t start_rev,
                      svn_revnum_t end_rev,
-                     svn_boolean_t keep_going,
                      svn_boolean_t check_normalization,
                      svn_boolean_t metadata_only,
                      svn_repos_notify_func_t notify_func,
                      void *notify_baton,
+                     svn_repos_verify_callback_t verify_callback,
+                     void *verify_baton,
                      svn_cancel_func_t cancel,
                      void *cancel_baton,
                      apr_pool_t *scratch_pool);
 
 /**
- * Like svn_repos_verify_fs3(), but with @a keep_going,
- * @a check_normalization and @a metadata_only set to @c FALSE.
+ * Like svn_repos_verify_fs3(), but with @a verify_callback and
+ * @a verify_baton set to @c NULL and with @a check_normalization
+ * and @a metadata_only set to @c FALSE.
  *
  * @since New in 1.7.
  * @deprecated Provided for backward compatibility with the 1.8 API.
@@ -2967,6 +2989,12 @@ svn_repos_verify_fs(svn_repos_t *repos,
  * be done with full plain text.  A dump with @a use_deltas set cannot
  * be loaded by Subversion 1.0.x.
  *
+ * If @a include_revprops is @c TRUE, output the revision properties as
+ * well, otherwise omit them.
+ *
+ * If @a include_changes is @c TRUE, output the revision contents, i.e.
+ * tree and node changes.
+ *
  * If @a notify_func is not null, then call it with @a notify_baton and
  * with a notification structure in which the fields are set as follows.
  * (For a warning or error notification that does not apply to a specific
@@ -2998,8 +3026,31 @@ svn_repos_verify_fs(svn_repos_t *repos,
  *
  * Use @a scratch_pool for temporary allocation.
  *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_repos_dump_fs4(svn_repos_t *repos,
+                   svn_stream_t *stream,
+                   svn_revnum_t start_rev,
+                   svn_revnum_t end_rev,
+                   svn_boolean_t incremental,
+                   svn_boolean_t use_deltas,
+                   svn_boolean_t include_revprops,
+                   svn_boolean_t include_changes,
+                   svn_repos_notify_func_t notify_func,
+                   void *notify_baton,
+                   svn_cancel_func_t cancel_func,
+                   void *cancel_baton,
+                   apr_pool_t *pool);
+
+/**
+ * Similar to svn_repos_dump_fs4(), but with @a include_revprops and 
+ * @a include_changes both set to @c TRUE.
+ *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.9 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_repos_dump_fs3(svn_repos_t *repos,
                    svn_stream_t *dumpstream,
@@ -3203,6 +3254,52 @@ svn_repos_load_fs(svn_repos_t *repos,
                   void *cancel_baton,
                   apr_pool_t *pool);
 
+/**
+ * Read and parse dumpfile-formatted @a dumpstream, extracting the
+ * revision properties from it and apply them to the already-open
+ * @a repos.  Use @a scratch_pool for temporary allocations.
+ *
+ * If, after filtering by the @a start_rev and @a end_rev, the dumpstream
+ * contains revisions missing in @a repos, an error will be thrown.
+ *
+ * @a start_rev and @a end_rev act as filters, the lower and upper
+ * (inclusive) range values of revisions in @a dumpstream which will
+ * be loaded.  Either both of these values are #SVN_INVALID_REVNUM (in
+ * which case no revision-based filtering occurs at all), or both are
+ * valid revisions (where @a start_rev is older than or equivalent to
+ * @a end_rev).
+ *
+ * If @a validate_props is set, then validate Subversion revision
+ * properties (those in the svn: namespace) against established
+ * rules for those things.
+ *
+ * If @a ignore_dates is set, ignore any revision datestamps found in
+ * @a dumpstream, keeping whatever timestamps the revisions currently
+ * have.
+ *
+ * If non-NULL, use @a notify_func and @a notify_baton to send notification
+ * of events to the caller.
+ *
+ * If @a cancel_func is not @c NULL, it is called periodically with
+ * @a cancel_baton as argument to see if the client wishes to cancel
+ * the load.
+ *
+ * @remark No repository hooks will be triggered.
+ *
+ * @since New in 1.10.
+ */
+svn_error_t *
+svn_repos_load_fs_revprops(svn_repos_t *repos,
+                           svn_stream_t *dumpstream,
+                           svn_revnum_t start_rev,
+                           svn_revnum_t end_rev,
+                           svn_boolean_t validate_props,
+                           svn_boolean_t ignore_dates,
+                           svn_repos_notify_func_t notify_func,
+                           void *notify_baton,
+                           svn_cancel_func_t cancel_func,
+                           void *cancel_baton,
+                           apr_pool_t *scratch_pool);
 
 /**
  * A vtable that is driven by svn_repos_parse_dumpstream3().
@@ -3405,7 +3502,7 @@ svn_repos_parse_dumpstream3(svn_stream_t
  * @since New in 1.9.
  */
 svn_error_t *
-svn_repos_get_fs_build_parser5(const svn_repos_parse_fns3_t **callbacks,
+svn_repos_get_fs_build_parser5(const svn_repos_parse_fns3_t **parser,
                                void **parse_baton,
                                svn_repos_t *repos,
                                svn_revnum_t start_rev,

Modified: subversion/branches/fsx-1.10/subversion/include/svn_string.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/svn_string.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/svn_string.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/svn_string.h Thu Aug  6 14:01:38 2015
@@ -541,7 +541,17 @@ svn_cstring_casecmp(const char *str1, co
  * Assume that the number is represented in base @a base.
  * Raise an error if conversion fails (e.g. due to overflow), or if the
  * converted number is smaller than @a minval or larger than @a maxval.
+ *
  * Leading whitespace in @a str is skipped in a locale-dependent way.
+ * After that, the string may contain an optional '+' (positive, default)
+ * or '-' (negative) character, followed by an optional '0x' prefix if
+ * @a base is 0 or 16, followed by numeric digits appropriate for the base.
+ * If there are any more characters after the numeric digits, an error is
+ * returned.
+ *
+ * If @a base is zero, then a leading '0x' or '0X' prefix means hexadecimal,
+ * else a leading '0' means octal (implemented, though not documented, in
+ * apr_strtoi64() in APR 0.9.0 through 1.5.0), else use base ten.
  *
  * @since New in 1.7.
  */
@@ -554,7 +564,8 @@ svn_cstring_strtoi64(apr_int64_t *n, con
  * Parse the C string @a str into a 64 bit number, and return it in @a *n.
  * Assume that the number is represented in base 10.
  * Raise an error if conversion fails (e.g. due to overflow).
- * Leading whitespace in @a str is skipped in a locale-dependent way.
+ *
+ * The behaviour otherwise is as described for svn_cstring_strtoi64().
  *
  * @since New in 1.7.
  */
@@ -565,7 +576,8 @@ svn_cstring_atoi64(apr_int64_t *n, const
  * Parse the C string @a str into a 32 bit number, and return it in @a *n.
  * Assume that the number is represented in base 10.
  * Raise an error if conversion fails (e.g. due to overflow).
- * Leading whitespace in @a str is skipped in a locale-dependent way.
+ *
+ * The behaviour otherwise is as described for svn_cstring_strtoi64().
  *
  * @since New in 1.7.
  */
@@ -577,7 +589,21 @@ svn_cstring_atoi(int *n, const char *str
  * it in @a *n. Assume that the number is represented in base @a base.
  * Raise an error if conversion fails (e.g. due to overflow), or if the
  * converted number is smaller than @a minval or larger than @a maxval.
+ *
  * Leading whitespace in @a str is skipped in a locale-dependent way.
+ * After that, the string may contain an optional '+' (positive, default)
+ * or '-' (negative) character, followed by an optional '0x' prefix if
+ * @a base is 0 or 16, followed by numeric digits appropriate for the base.
+ * If there are any more characters after the numeric digits, an error is
+ * returned.
+ *
+ * If @a base is zero, then a leading '0x' or '0X' prefix means hexadecimal,
+ * else a leading '0' means octal (implemented, though not documented, in
+ * apr_strtoi64() in APR 0.9.0 through 1.5.0), else use base ten.
+ *
+ * @warning The implementation used since version 1.7 returns an error
+ * if the parsed number is greater than APR_INT64_MAX, even if it is not
+ * greater than @a maxval.
  *
  * @since New in 1.7.
  */
@@ -590,7 +616,9 @@ svn_cstring_strtoui64(apr_uint64_t *n, c
  * Parse the C string @a str into an unsigned 64 bit number, and return
  * it in @a *n. Assume that the number is represented in base 10.
  * Raise an error if conversion fails (e.g. due to overflow).
- * Leading whitespace in @a str is skipped in a locale-dependent way.
+ *
+ * The behaviour otherwise is as described for svn_cstring_strtoui64(),
+ * including the upper limit of APR_INT64_MAX.
  *
  * @since New in 1.7.
  */
@@ -601,7 +629,9 @@ svn_cstring_atoui64(apr_uint64_t *n, con
  * Parse the C string @a str into an unsigned 32 bit number, and return
  * it in @a *n. Assume that the number is represented in base 10.
  * Raise an error if conversion fails (e.g. due to overflow).
- * Leading whitespace in @a str is skipped in a locale-dependent way.
+ *
+ * The behaviour otherwise is as described for svn_cstring_strtoui64(),
+ * including the upper limit of APR_INT64_MAX.
  *
  * @since New in 1.7.
  */

Modified: subversion/branches/fsx-1.10/subversion/include/svn_user.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/include/svn_user.h?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/include/svn_user.h (original)
+++ subversion/branches/fsx-1.10/subversion/include/svn_user.h Thu Aug  6 14:01:38 2015
@@ -45,6 +45,9 @@ svn_user_get_name(apr_pool_t *pool);
  * any necessary allocation, returning NULL on error.
  *
  * @since New in 1.4.
+ * @since 1.10 returns a canonical path. Earlier versions returned a
+ * non-canonical path if the operating system reported a non-canonical
+ * path such as "/home/user/" or "//home/user".
  */
 const char *
 svn_user_get_homedir(apr_pool_t *pool);

Modified: subversion/branches/fsx-1.10/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_client/merge.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_client/merge.c Thu Aug  6 14:01:38 2015
@@ -2794,12 +2794,6 @@ merge_dir_opened(void **new_dir_baton,
 
               db->tree_conflict_reason = added ? svn_wc_conflict_reason_added
                                                : svn_wc_conflict_reason_obstructed;
-
-              if ((merge_b->merge_source.ancestral || merge_b->reintegrate_merge)
-                  && !(pdb && pdb->shadowed))
-                {
-                  store_path(merge_b->skipped_abspaths, local_abspath);
-                }
             }
         }
 
@@ -5398,14 +5392,6 @@ record_skips_in_mergeinfo(const char *me
           || obstruction_state == svn_wc_notify_state_missing)
         continue;
 
-      /* Make sure this is not a tree-conflicted path either. We don't
-       * want to add mergeinfo on such nodes since it causes problems down
-       * the line (see issue #4582, "reintegrate complains about missing
-       * ranges from node unrelated to branch") */
-      if (svn_hash_gets(merge_b->tree_conflicted_abspaths,
-                        skipped_abspath) != NULL)
-        continue;
-
       /* Add an empty range list for this path.
 
          ### TODO: This works fine for a file path skipped because it is

Modified: subversion/branches/fsx-1.10/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_client/patch.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_client/patch.c Thu Aug  6 14:01:38 2015
@@ -819,22 +819,9 @@ write_file(void *baton, const char *buf,
   return SVN_NO_ERROR;
 }
 
-/* Handling symbolic links:
- *
- * In Subversion, symlinks can be represented on disk in two distinct ways.
- * On systems which support symlinks, a symlink is created on disk.
- * On systems which do not support symlink, a file is created on disk
- * which contains the "normal form" of the symlink, which looks like:
- *   link TARGET
- * where TARGET is the file the symlink points to.
- *
- * When reading symlinks (i.e. the link itself, not the file the symlink
- * is pointing to) through the svn_subst_create_specialfile() function
- * into a buffer, the buffer always contains the "normal form" of the symlink.
- * Due to this representation symlinks always contain a single line of text.
- *
- * The functions below are needed to deal with the case where a patch
- * wants to change the TARGET that a symlink points to.
+/* Symlinks appear in patches in their repository normal form, abstracted by
+ * the svn_subst_* module.  The functions below enable patches to change the
+ * targets of symlinks.
  */
 
 /* Baton for the (readline|tell|seek|write)_symlink functions. */
@@ -870,10 +857,12 @@ readline_symlink(void *baton, svn_string
     }
   else
     {
-      svn_string_t *dest;
+      svn_stream_t *stream;
+      const apr_size_t len_hint = 64; /* arbitrary */
 
-      SVN_ERR(svn_io_read_link(&dest, sb->local_abspath, scratch_pool));
-      *line = svn_stringbuf_createf(result_pool, "link %s", dest->data);
+      SVN_ERR(svn_subst_read_specialfile(&stream, sb->local_abspath,
+                                         scratch_pool, scratch_pool));
+      SVN_ERR(svn_stringbuf_from_stream(line, stream, len_hint, result_pool));
       sb->at_eof = TRUE;
     }
 
@@ -910,22 +899,17 @@ write_symlink(void *baton, const char *b
               apr_pool_t *scratch_pool)
 {
   const char *target_abspath = baton;
-  const char *new_name;
-  const char *sym_link = apr_pstrndup(scratch_pool, buf, len);
-
-  if (strncmp(sym_link, "link ", 5) != 0)
-    return svn_error_create(SVN_ERR_IO_WRITE_ERROR, NULL,
-                            _("Invalid link representation"));
-
-  sym_link += 5; /* Skip "link " */
 
   /* We assume the entire symlink is written at once, as the patch
      format is line based */
 
-  SVN_ERR(svn_io_create_unique_link(&new_name, target_abspath, sym_link,
-                                    ".tmp", scratch_pool));
-
-  SVN_ERR(svn_io_file_rename(new_name, target_abspath, scratch_pool));
+  {
+    svn_stream_t *stream;
+    SVN_ERR(svn_subst_create_specialfile(&stream, target_abspath,
+                                         scratch_pool, scratch_pool));
+    SVN_ERR(svn_stream_write(stream, buf, &len));
+    SVN_ERR(svn_stream_close(stream));
+  }
 
   return SVN_NO_ERROR;
 }