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 2012/07/11 12:26:26 UTC

svn commit: r1360103 [2/18] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/server-side/ notes/wc-ng/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/or...

Modified: subversion/branches/ev2-export/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_fs.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_fs.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_fs.h Wed Jul 11 10:26:19 2012
@@ -120,6 +120,13 @@ typedef struct svn_fs_t svn_fs_t;
  * @since New in 1.6.
  */
 #define SVN_FS_CONFIG_PRE_1_6_COMPATIBLE        "pre-1.6-compatible"
+
+/** Create repository format compatible with Subversion versions
+ * earlier than 1.8.
+ *
+ * @since New in 1.8.
+ */
+#define SVN_FS_CONFIG_PRE_1_8_COMPATIBLE        "pre-1.8-compatible"
 /** @} */
 
 

Modified: subversion/branches/ev2-export/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_io.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_io.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_io.h Wed Jul 11 10:26:19 2012
@@ -592,14 +592,14 @@ svn_io_set_file_affected_time(apr_time_t
 void
 svn_io_sleep_for_timestamps(const char *path, apr_pool_t *pool);
 
-/** Set @a *different_p to non-zero if @a file1 and @a file2 have different
- * sizes, else set to zero.  Both @a file1 and @a file2 are utf8-encoded.
+/** Set @a *different_p to TRUE if @a file1 and @a file2 have different
+ * sizes, else set to FALSE.  Both @a file1 and @a file2 are utf8-encoded.
  *
  * Setting @a *different_p to zero does not mean the files definitely
  * have the same size, it merely means that the sizes are not
  * definitely different.  That is, if the size of one or both files
  * cannot be determined, then the sizes are not known to be different,
- * so @a *different_p is set to 0.
+ * so @a *different_p is set to FALSE.
  */
 svn_error_t *
 svn_io_filesizes_different_p(svn_boolean_t *different_p,
@@ -607,6 +607,25 @@ svn_io_filesizes_different_p(svn_boolean
                              const char *file2,
                              apr_pool_t *pool);
 
+/** Set @a *different_p12 to non-zero if @a file1 and @a file2 have different
+ * sizes, else set to zero.  Do the similar for @a *different_p23 with
+ * @a file2 and @a file3, and @a *different_p13 for @a file1 and @a file3.
+ * All three of @a file1, @a file2 and @a file3 are utf8-encoded.
+ *
+ * Setting @a *different_p12 to zero does not mean the files definitely
+ * have the same size, it merely means that the sizes are not
+ * definitely different.  That is, if the size of one or both files
+ * cannot be determined, then the sizes are not known to be different,
+ * so @a *different_p12 is set to 0.
+ */
+svn_error_t *
+svn_io_filesizes_three_different_p(svn_boolean_t *different_p12,
+                                   svn_boolean_t *different_p23,
+                                   svn_boolean_t *different_p13,
+                                   const char *file1,
+                                   const char *file2,
+                                   const char *file3,
+                                   apr_pool_t *scratch_pool);
 
 /** Return in @a *checksum the checksum of type @a kind of @a file
  * Use @a pool for temporary allocations and to allocate @a *checksum.
@@ -642,6 +661,20 @@ svn_io_files_contents_same_p(svn_boolean
                              const char *file2,
                              apr_pool_t *pool);
 
+/** Set @a *same12 to TRUE if @a file1 and @a file2 have the same
+ * contents, else set it to FALSE.  Do the similar for @a *same23 
+ * with @a file2 and @a file3, and @a *same13 for @a file1 and @a 
+ * file3.  Use @a pool for temporary allocations.
+ */
+svn_error_t *
+svn_io_files_contents_three_same_p(svn_boolean_t *same12,
+                                   svn_boolean_t *same23,
+                                   svn_boolean_t *same13,
+                                   const char *file1,
+                                   const char *file2,
+                                   const char *file3,
+                                   apr_pool_t *scratch_pool);
+
 /** Create file at utf8-encoded @a file with contents @a contents.
  * @a file must not already exist.
  * Use @a pool for memory allocations.
@@ -2167,6 +2200,36 @@ svn_io_write_version_file(const char *pa
                           int version,
                           apr_pool_t *pool);
 
+/* Read a line of text from a file, up to a specified length.
+ *
+ * Allocate @a *stringbuf in @a result_pool, and read into it one line 
+ * from @a file. Reading stops either after a line-terminator was found
+ * or after @a max_len bytes have been read.
+ *
+ * If end-of-file is reached or @a max_len bytes have been read, and @a eof
+ * is not NULL, then set @a *eof to @c TRUE.
+ *
+ * The line-terminator is not stored in @a *stringbuf.
+ * The line-terminator is detected automatically and stored in @a *eol
+ * if @a eol is not NULL. If EOF is reached and @a file does not end
+ * with a newline character, and @a eol is not NULL, @ *eol is set to NULL.
+ *
+ * @a scratch_pool is used for temporary allocations.
+ *
+ * Hint: To read all data until a line-terminator is hit, pass APR_SIZE_MAX
+ * for @a max_len.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_io_file_readline(apr_file_t *file,
+                     svn_stringbuf_t **stringbuf,
+                     const char **eol,
+                     svn_boolean_t *eof,
+                     apr_size_t max_len,
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool);
+
 /** @} */
 
 #ifdef __cplusplus

Modified: subversion/branches/ev2-export/subversion/include/svn_ra.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_ra.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_ra.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_ra.h Wed Jul 11 10:26:19 2012
@@ -121,16 +121,16 @@ typedef svn_error_t *(*svn_ra_invalidate
                                                           apr_pool_t *pool);
 
 /** This is a function type which allows the RA layer to fetch the
- * cached pristine file contents whose SHA1 checksum is @a
- * sha1_checksum, if any.  @a *contents will be a read stream
- * containing those contents if they are found; NULL otherwise.
+ * cached pristine file contents whose checksum is @a checksum, if
+ * any.  @a *contents will be a read stream containing those contents
+ * if they are found; NULL otherwise.
  *
  * @since New in 1.8.
  */
 typedef svn_error_t *
 (*svn_ra_get_wc_contents_func_t)(void *baton,
                                  svn_stream_t **contents,
-                                 const svn_checksum_t *sha1_checksum,
+                                 const svn_checksum_t *checksum,
                                  apr_pool_t *pool);
 
 
@@ -2035,7 +2035,7 @@ svn_ra_print_ra_libraries(svn_stringbuf_
  */
 typedef struct svn_ra_plugin_t
 {
-  /** The proper name of the RA library, (like "ra_neon" or "ra_local") */
+  /** The proper name of the RA library, (like "ra_serf" or "ra_local") */
   const char *name;
 
   /** Short doc string printed out by `svn --version` */
@@ -2306,7 +2306,7 @@ typedef svn_error_t *(*svn_ra_init_func_
 
 /* Public RA implementations. */
 
-/** Initialize libsvn_ra_neon.
+/** Initialize libsvn_ra_serf.
  *
  * @deprecated Provided for backward compatibility with the 1.1 API. */
 SVN_DEPRECATED

Modified: subversion/branches/ev2-export/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_repos.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_repos.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_repos.h Wed Jul 11 10:26:19 2012
@@ -2404,6 +2404,7 @@ svn_repos_node_from_baton(void *edit_bat
 /* The RFC822-style headers in our dumpfile format. */
 #define SVN_REPOS_DUMPFILE_MAGIC_HEADER            "SVN-fs-dump-format-version"
 #define SVN_REPOS_DUMPFILE_FORMAT_VERSION           3
+#define SVN_REPOS_DUMPFILE_FORMAT_VERSION_DELTAS    3
 #define SVN_REPOS_DUMPFILE_UUID                      "UUID"
 #define SVN_REPOS_DUMPFILE_CONTENT_LENGTH            "Content-length"
 
@@ -2705,21 +2706,17 @@ svn_repos_load_fs(svn_repos_t *repos,
 
 
 /**
- * A vtable that is driven by svn_repos_parse_dumpstream2().
+ * A vtable that is driven by svn_repos_parse_dumpstream3().
  *
- * @since New in 1.1.
+ * @since New in 1.8.
  */
-typedef struct svn_repos_parse_fns2_t
+typedef struct svn_repos_parse_fns3_t
 {
-  /** The parser has discovered a new revision record within the
-   * parsing session represented by @a parse_baton.  All the headers are
-   * placed in @a headers (allocated in @a pool), which maps <tt>const
-   * char *</tt> header-name ==> <tt>const char *</tt> header-value.
-   * The @a revision_baton received back (also allocated in @a pool)
-   * represents the revision.
+  /** The parser has discovered a new "magic header" record within the
+   * parsing session represented by @a parse_baton.  The dump-format
+   * version number is @a version.
    */
-  svn_error_t *(*new_revision_record)(void **revision_baton,
-                                      apr_hash_t *headers,
+  svn_error_t *(*magic_header_record)(int version,
                                       void *parse_baton,
                                       apr_pool_t *pool);
 
@@ -2731,6 +2728,18 @@ typedef struct svn_repos_parse_fns2_t
                               void *parse_baton,
                               apr_pool_t *pool);
 
+  /** The parser has discovered a new revision record within the
+   * parsing session represented by @a parse_baton.  All the headers are
+   * placed in @a headers (allocated in @a pool), which maps <tt>const
+   * char *</tt> header-name ==> <tt>const char *</tt> header-value.
+   * The @a revision_baton received back (also allocated in @a pool)
+   * represents the revision.
+   */
+  svn_error_t *(*new_revision_record)(void **revision_baton,
+                                      apr_hash_t *headers,
+                                      void *parse_baton,
+                                      apr_pool_t *pool);
+
   /** The parser has discovered a new node record within the current
    * revision represented by @a revision_baton.  All the headers are
    * placed in @a headers (as with @c new_revision_record), allocated in
@@ -2793,22 +2802,28 @@ typedef struct svn_repos_parse_fns2_t
    */
   svn_error_t *(*close_revision)(void *revision_baton);
 
-} svn_repos_parse_fns2_t;
-
-/** @deprecated Provided for backward compatibility with the 1.2 API. */
-typedef svn_repos_parse_fns2_t svn_repos_parser_fns2_t;
+} svn_repos_parse_fns3_t;
 
 
 /**
  * Read and parse dumpfile-formatted @a stream, calling callbacks in
  * @a parse_fns/@a parse_baton, and using @a pool for allocations.
  *
+ * If @a deltas_are_text is @c TRUE, handle text-deltas with the @a
+ * set_fulltext callback.  This is useful when manipulating a dump
+ * stream without loading it.  Otherwise handle text-deltas with the
+ * @a apply_textdelta callback.
+ *
  * 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 dump.
  *
  * This parser has built-in knowledge of the dumpfile format, but only
- * in a general sense:
+ * in a limited sense:
+ *
+ *    * it recognizes the "magic" format-version header.
+ *
+ *    * it recognizes the UUID header.
  *
  *    * it recognizes revision and node records by looking for either
  *      a REVISION_NUMBER or NODE_PATH headers.
@@ -2820,14 +2835,16 @@ typedef svn_repos_parse_fns2_t svn_repos
  *      and text, and pass the pieces to the vtable.
  *
  * This is enough knowledge to make it easy on vtable implementors,
- * but still allow expansion of the format:  most headers are ignored.
+ * but still allow expansion of the format: most headers do not have
+ * to be handled explicitly.
  *
- * @since New in 1.1.
+ * @since New in 1.8.
  */
 svn_error_t *
-svn_repos_parse_dumpstream2(svn_stream_t *stream,
-                            const svn_repos_parse_fns2_t *parse_fns,
+svn_repos_parse_dumpstream3(svn_stream_t *stream,
+                            const svn_repos_parse_fns3_t *parse_fns,
                             void *parse_baton,
+                            svn_boolean_t deltas_are_text,
                             svn_cancel_func_t cancel_func,
                             void *cancel_baton,
                             apr_pool_t *pool);
@@ -2868,7 +2885,7 @@ svn_repos_parse_dumpstream2(svn_stream_t
  * @since New in 1.8.
  */
 svn_error_t *
-svn_repos_get_fs_build_parser4(const svn_repos_parse_fns2_t **parser,
+svn_repos_get_fs_build_parser4(const svn_repos_parse_fns3_t **parser,
                                void **parse_baton,
                                svn_repos_t *repos,
                                svn_revnum_t start_rev,
@@ -2881,44 +2898,59 @@ svn_repos_get_fs_build_parser4(const svn
                                void *notify_baton,
                                apr_pool_t *pool);
 
+
 /**
- * Similar to svn_repos_get_fs_build_parser4(), but with @a start_rev
- * and @a end_rev always passed as #SVN_INVALID_REVNUM.
+ * A vtable that is driven by svn_repos_parse_dumpstream2().
+ * Similar to #svn_repos_parse_fns3_t except that it lacks
+ * the delete_node_property and apply_textdelta callbacks.
  *
  * @deprecated Provided for backward compatibility with the 1.7 API.
- * @since New in 1.7.
  */
-SVN_DEPRECATED
-svn_error_t *
-svn_repos_get_fs_build_parser3(const svn_repos_parse_fns2_t **parser,
-                               void **parse_baton,
-                               svn_repos_t *repos,
-                               svn_boolean_t use_history,
-                               svn_boolean_t validate_props,
-                               enum svn_repos_load_uuid uuid_action,
-                               const char *parent_dir,
-                               svn_repos_notify_func_t notify_func,
-                               void *notify_baton,
-                               apr_pool_t *pool);
+typedef struct svn_repos_parse_fns2_t
+{
+  /** Same as #svn_repos_parse_fns3_t.new_revision_record. */
+  svn_error_t *(*new_revision_record)(void **revision_baton,
+                                      apr_hash_t *headers,
+                                      void *parse_baton,
+                                      apr_pool_t *pool);
+  /** Same as #svn_repos_parse_fns3_t.uuid_record. */
+  svn_error_t *(*uuid_record)(const char *uuid,
+                              void *parse_baton,
+                              apr_pool_t *pool);
+  /** Same as #svn_repos_parse_fns3_t.new_node_record. */
+  svn_error_t *(*new_node_record)(void **node_baton,
+                                  apr_hash_t *headers,
+                                  void *revision_baton,
+                                  apr_pool_t *pool);
+  /** Same as #svn_repos_parse_fns3_t.set_revision_property. */
+  svn_error_t *(*set_revision_property)(void *revision_baton,
+                                        const char *name,
+                                        const svn_string_t *value);
+  /** Same as #svn_repos_parse_fns3_t.set_node_property. */
+  svn_error_t *(*set_node_property)(void *node_baton,
+                                    const char *name,
+                                    const svn_string_t *value);
+  /** Same as #svn_repos_parse_fns3_t.delete_node_property. */
+  svn_error_t *(*delete_node_property)(void *node_baton,
+                                       const char *name);
+  /** Same as #svn_repos_parse_fns3_t.remove_node_props. */
+  svn_error_t *(*remove_node_props)(void *node_baton);
+  /** Same as #svn_repos_parse_fns3_t.set_fulltext. */
+  svn_error_t *(*set_fulltext)(svn_stream_t **stream,
+                               void *node_baton);
+  /** Same as #svn_repos_parse_fns3_t.apply_textdelta. */
+  svn_error_t *(*apply_textdelta)(svn_txdelta_window_handler_t *handler,
+                                  void **handler_baton,
+                                  void *node_baton);
+  /** Same as #svn_repos_parse_fns3_t.close_node. */
+  svn_error_t *(*close_node)(void *node_baton);
+  /** Same as #svn_repos_parse_fns3_t.close_revision. */
+  svn_error_t *(*close_revision)(void *revision_baton);
+} svn_repos_parse_fns2_t;
+
+/** @deprecated Provided for backward compatibility with the 1.7 API. */
+typedef svn_repos_parse_fns2_t svn_repos_parser_fns2_t;
 
-/**
- * Similar to svn_repos_get_fs_build_parser3(), but with @a outstream
- * in place if a #svn_repos_notify_func_t and baton and with
- * @a validate_props always FALSE.
- *
- * @since New in 1.1.
- * @deprecated Provided for backward compatibility with the 1.6 API.
- */
-SVN_DEPRECATED
-svn_error_t *
-svn_repos_get_fs_build_parser2(const svn_repos_parse_fns2_t **parser,
-                               void **parse_baton,
-                               svn_repos_t *repos,
-                               svn_boolean_t use_history,
-                               enum svn_repos_load_uuid uuid_action,
-                               svn_stream_t *outstream,
-                               const char *parent_dir,
-                               apr_pool_t *pool);
 
 /**
  * A vtable that is driven by svn_repos_parse_dumpstream().
@@ -2964,6 +2996,21 @@ typedef struct svn_repos_parse_fns_t
 
 
 /**
+ * Similar to svn_repos_parse_dumpstream3(), but uses the more limited
+ * #svn_repos_parser_fns2_t vtable type.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
+svn_repos_parse_dumpstream2(svn_stream_t *stream,
+                            const svn_repos_parser_fns2_t *parse_fns,
+                            void *parse_baton,
+                            svn_cancel_func_t cancel_func,
+                            void *cancel_baton,
+                            apr_pool_t *pool);
+
+/**
  * Similar to svn_repos_parse_dumpstream2(), but uses the more limited
  * #svn_repos_parser_fns_t vtable type.
  *
@@ -2978,6 +3025,45 @@ svn_repos_parse_dumpstream(svn_stream_t 
                            void *cancel_baton,
                            apr_pool_t *pool);
 
+/**
+ * Similar to svn_repos_get_fs_build_parser4(), but with @a start_rev
+ * and @a end_rev always passed as #SVN_INVALID_REVNUM, and yielding
+ * the more limited svn_repos_parse_fns2_t.
+ *
+ * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
+svn_repos_get_fs_build_parser3(const svn_repos_parse_fns2_t **parser,
+                               void **parse_baton,
+                               svn_repos_t *repos,
+                               svn_boolean_t use_history,
+                               svn_boolean_t validate_props,
+                               enum svn_repos_load_uuid uuid_action,
+                               const char *parent_dir,
+                               svn_repos_notify_func_t notify_func,
+                               void *notify_baton,
+                               apr_pool_t *pool);
+
+/**
+ * Similar to svn_repos_get_fs_build_parser3(), but with @a outstream
+ * in place if a #svn_repos_notify_func_t and baton and with
+ * @a validate_props always FALSE.
+ *
+ * @since New in 1.1.
+ * @deprecated Provided for backward compatibility with the 1.6 API.
+ */
+SVN_DEPRECATED
+svn_error_t *
+svn_repos_get_fs_build_parser2(const svn_repos_parse_fns2_t **parser,
+                               void **parse_baton,
+                               svn_repos_t *repos,
+                               svn_boolean_t use_history,
+                               enum svn_repos_load_uuid uuid_action,
+                               svn_stream_t *outstream,
+                               const char *parent_dir,
+                               apr_pool_t *pool);
 
 /**
  * Similar to svn_repos_get_fs_build_parser2(), but yields the more

Modified: subversion/branches/ev2-export/subversion/include/svn_utf.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_utf.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_utf.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_utf.h Wed Jul 11 10:26:19 2012
@@ -236,6 +236,12 @@ svn_utf_cstring_from_utf8_string(const c
                                  const svn_string_t *src,
                                  apr_pool_t *pool);
 
+/** Return the display width of UTF-8-encoded C string @a cstr.
+ * If the string is not printable or invalid UTF-8, return -1.
+ * @since New in 1.8. */
+int
+svn_utf_cstring_utf8_width(const char *cstr);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/ev2-export/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_wc.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_wc.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_wc.h Wed Jul 11 10:26:19 2012
@@ -1227,7 +1227,14 @@ typedef enum svn_wc_notify_action_t
 
   /** Operation failed because a node is obstructed.
    * @since New in 1.8. */
-  svn_wc_notify_failed_obstruction
+  svn_wc_notify_failed_obstruction,
+
+  /** Conflict resolver is starting or done.
+   * This can be used by clients to detect when to display conflict summary
+   * information, for example.
+   * @since New in 1.8. */
+  svn_wc_notify_conflict_resolver_starting,
+  svn_wc_notify_conflict_resolver_done
 
 } svn_wc_notify_action_t;
 
@@ -1577,6 +1584,8 @@ typedef enum svn_wc_conflict_reason_t
   /** Object is moved away. @since New in 1.8. */
   svn_wc_conflict_reason_moved_away,
   /** Object is moved away and was edited post-move. @since New in 1.8. */
+  /* ### Do we really need this. The edit state is on a different node,
+         which might just change while the tree conflict exists? */
   svn_wc_conflict_reason_moved_away_and_edited,
   /** Object is moved here. @since New in 1.8. */
   svn_wc_conflict_reason_moved_here
@@ -1642,14 +1651,17 @@ typedef struct svn_wc_conflict_version_t
   svn_revnum_t peg_rev;
 
   /** path within repos; must not start with '/' */
+   /* ### should have been called repos_relpath, but we can't change this. */
   const char *path_in_repos;
-  /* @todo We may decide to add the repository UUID, to handle conflicts
-   * properly during a repository move. */
   /** @} */
 
   /** Info about this node */
   svn_node_kind_t node_kind;  /* note that 'none' is a legitimate value */
 
+  /** UUID of the repository
+   * @since New in 1.8. */
+  const char *repos_uuid;
+
   /* @todo Add metadata about a local copy of the node, if and when
    * we store one. */
 
@@ -1666,8 +1678,23 @@ typedef struct svn_wc_conflict_version_t
  * @a peg_rev and the the @c node_kind to @c node_kind. Make only shallow
  * copies of the pointer arguments.
  *
+ * @since New in 1.8.
+ */
+svn_wc_conflict_version_t *
+svn_wc_conflict_version_create2(const char *repos_root_url,
+                                const char *repos_uuid,
+                                const char *repos_relpath,
+                                svn_revnum_t revision,
+                                svn_node_kind_t kind,
+                                apr_pool_t *result_pool);
+
+/** Similar to svn_wc_conflict_version_create2(), but doesn't set all
+ * required values.
+ *
  * @since New in 1.6.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_wc_conflict_version_t *
 svn_wc_conflict_version_create(const char *repos_url,
                                const char *path_in_repos,
@@ -1697,9 +1724,9 @@ svn_wc_conflict_version_dup(const svn_wc
  * @note Fields may be added to the end of this structure in future
  * versions.  Therefore, to preserve binary compatibility, users
  * should not directly allocate structures of this type but should use
- * svn_wc_create_conflict_description_text2() or
- * svn_wc_create_conflict_description_prop2() or
- * svn_wc_create_conflict_description_tree2() instead.
+ * svn_wc_conflict_description_create_text2() or
+ * svn_wc_conflict_description_create_prop2() or
+ * svn_wc_conflict_description_create_tree2() instead.
  *
  * @since New in 1.7.
  */

Modified: subversion/branches/ev2-export/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/client.h?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/client.h (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/client.h Wed Jul 11 10:26:19 2012
@@ -87,16 +87,18 @@ svn_client__get_revision_number(svn_revn
                                 const svn_opt_revision_t *revision,
                                 apr_pool_t *scratch_pool);
 
-/* Set *COPYFROM_PATH and *COPYFROM_REV to the path (without initial '/')
-   and revision that served as the source of the copy from which PATH_OR_URL
-   at REVISION was created, or NULL and SVN_INVALID_REVNUM (respectively) if
-   PATH_OR_URL at REVISION was not the result of a copy operation. */
-svn_error_t *svn_client__get_copy_source(const char *path_or_url,
-                                         const svn_opt_revision_t *revision,
-                                         const char **copyfrom_path,
-                                         svn_revnum_t *copyfrom_rev,
-                                         svn_client_ctx_t *ctx,
-                                         apr_pool_t *pool);
+/* Set *ORIGINAL_REPOS_RELPATH and *ORIGINAL_REVISION to the original location
+   that served as the source of the copy from which PATH_OR_URL at REVISION was
+   created, or NULL and SVN_INVALID_REVNUM (respectively) if PATH_OR_URL at
+   REVISION was not the result of a copy operation. */
+svn_error_t *
+svn_client__get_copy_source(const char **original_repos_relpath,
+                            svn_revnum_t *original_revision,
+                            const char *path_or_url,
+                            const svn_opt_revision_t *revision,
+                            svn_client_ctx_t *ctx,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 /* Set *START_URL and *START_REVISION (and maybe *END_URL
    and *END_REVISION) to the revisions and repository URLs of one

Modified: subversion/branches/ev2-export/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/deprecated.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/deprecated.c Wed Jul 11 10:26:19 2012
@@ -1643,7 +1643,10 @@ svn_client_propset3(svn_commit_info_t **
 {
   if (svn_path_is_url(target))
     {
-      struct capture_baton_t cb = { commit_info_p, pool };
+      struct capture_baton_t cb;
+
+      cb.info = commit_info_p;
+      cb.pool = pool;
 
       SVN_ERR(svn_client_propset_remote(propname, propval, target, skip_checks,
                                         base_revision_for_url, revprop_table,
@@ -1956,8 +1959,11 @@ svn_client_status4(svn_revnum_t *result_
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
-  struct status4_wrapper_baton swb = { ctx->wc_ctx, status_func,
-                                       status_baton };
+  struct status4_wrapper_baton swb;
+
+  swb.wc_ctx = ctx->wc_ctx;
+  swb.old_func = status_func;
+  swb.old_baton = status_baton;
 
   return svn_client_status5(result_rev, ctx, path, revision, depth, get_all,
                             update, no_ignore, ignore_externals, TRUE,
@@ -2559,6 +2565,34 @@ svn_client_url_from_path(const char **ur
 
 /*** From mergeinfo.c ***/
 svn_error_t *
+svn_client_mergeinfo_log(svn_boolean_t finding_merged,
+                         const char *target_path_or_url,
+                         const svn_opt_revision_t *target_peg_revision,
+                         const char *source_path_or_url,
+                         const svn_opt_revision_t *source_peg_revision,
+                         svn_log_entry_receiver_t receiver,
+                         void *receiver_baton,
+                         svn_boolean_t discover_changed_paths,
+                         svn_depth_t depth,
+                         const apr_array_header_t *revprops,
+                         svn_client_ctx_t *ctx,
+                         apr_pool_t *scratch_pool)
+{
+  svn_opt_revision_t start_revision, end_revision;
+
+  start_revision.kind = svn_opt_revision_unspecified;
+  end_revision.kind = svn_opt_revision_unspecified;
+
+  return svn_client_mergeinfo_log2(finding_merged,
+                                   target_path_or_url, target_peg_revision,
+                                   source_path_or_url, source_peg_revision,
+                                   &start_revision, &end_revision,
+                                   receiver, receiver_baton,
+                                   discover_changed_paths, depth, revprops,
+                                   ctx, scratch_pool);
+}
+
+svn_error_t *
 svn_client_mergeinfo_log_merged(const char *path_or_url,
                                 const svn_opt_revision_t *peg_revision,
                                 const char *merge_source_path_or_url,

Modified: subversion/branches/ev2-export/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/externals.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/externals.c Wed Jul 11 10:26:19 2012
@@ -42,17 +42,6 @@
 #include "svn_private_config.h"
 #include "private/svn_wc_private.h"
  
-/* Closure for handle_external_item_change. */
-struct external_change_baton_t
-{
-  /* The URL for the repository root. */
-  const char *repos_root_url;
-
-  /* Passed through to svn_client_* functions. */
-  svn_client_ctx_t *ctx;
-
-  svn_boolean_t *timestamp_sleep;
-};
 
 /* Remove the directory at LOCAL_ABSPATH from revision control, and do the
  * same to any revision controlled directories underneath LOCAL_ABSPATH
@@ -313,7 +302,6 @@ switch_file_external(const char *local_a
                      const svn_opt_revision_t *revision,
                      const char *def_dir_abspath,
                      svn_ra_session_t *ra_session,
-                     svn_boolean_t *timestamp_sleep,
                      svn_client_ctx_t *ctx,
                      apr_pool_t *scratch_pool)
 {
@@ -507,7 +495,7 @@ cleanup:
 }
 
 static svn_error_t *
-handle_external_item_removal(const struct external_change_baton_t *eb,
+handle_external_item_removal(const svn_client_ctx_t *ctx,
                              const char *defining_abspath,
                              const char *local_abspath,
                              apr_pool_t *scratch_pool)
@@ -521,19 +509,19 @@ handle_external_item_removal(const struc
   const char *lock_root_abspath = NULL;
 
   /* local_abspath should be a wcroot or a file external */
-  SVN_ERR(svn_wc_read_kind(&kind, eb->ctx->wc_ctx, local_abspath, FALSE,
+  SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
                            scratch_pool));
 
   if (kind == svn_node_none)
     return SVN_NO_ERROR; /* It's neither... Nothing to remove */
 
-  SVN_ERR(svn_wc_locked2(&lock_existed, NULL, eb->ctx->wc_ctx,
+  SVN_ERR(svn_wc_locked2(&lock_existed, NULL, ctx->wc_ctx,
                          local_abspath, scratch_pool));
 
   if (! lock_existed)
     {
       SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath,
-                                         eb->ctx->wc_ctx, local_abspath,
+                                         ctx->wc_ctx, local_abspath,
                                          FALSE,
                                          scratch_pool,
                                          scratch_pool));
@@ -543,12 +531,12 @@ handle_external_item_removal(const struc
      nothing else in this externals description (at least) is
      going to need this directory, and therefore it's better to
      leave stuff where the user expects it. */
-  err = svn_wc__external_remove(eb->ctx->wc_ctx, defining_abspath,
+  err = svn_wc__external_remove(ctx->wc_ctx, defining_abspath,
                                 local_abspath,
-                                eb->ctx->cancel_func, eb->ctx->cancel_baton,
+                                ctx->cancel_func, ctx->cancel_baton,
                                 scratch_pool);
 
-  if (eb->ctx->notify_func2)
+  if (ctx->notify_func2)
     {
       svn_wc_notify_t *notify =
           svn_wc_create_notify(local_abspath,
@@ -558,8 +546,7 @@ handle_external_item_removal(const struc
       notify->kind = kind;
       notify->err = err;
 
-      (eb->ctx->notify_func2)(eb->ctx->notify_baton2,
-                              notify, scratch_pool);
+      (ctx->notify_func2)(ctx->notify_baton2, notify, scratch_pool);
     }
 
   if (err && err->apr_err == SVN_ERR_WC_LEFT_LOCAL_MOD)
@@ -572,7 +559,7 @@ handle_external_item_removal(const struc
   /* Unlock if we acquired the lock */
   if (lock_root_abspath != NULL)
     {
-      svn_error_t *err2 = svn_wc__release_write_lock(eb->ctx->wc_ctx,
+      svn_error_t *err2 = svn_wc__release_write_lock(ctx->wc_ctx,
                                                      lock_root_abspath,
                                                      scratch_pool);
 
@@ -589,12 +576,14 @@ handle_external_item_removal(const struc
 }
 
 static svn_error_t *
-handle_external_item_change(const struct external_change_baton_t *eb,
+handle_external_item_change(svn_client_ctx_t *ctx,
+                            const char *repos_root_url,
                             const char *parent_dir_abspath,
                             const char *parent_dir_url,
                             const char *local_abspath,
                             const char *old_defining_abspath,
                             const svn_wc_external_item2_t *new_item,
+                            svn_boolean_t *timestamp_sleep,
                             apr_pool_t *scratch_pool)
 {
   svn_ra_session_t *ra_session;
@@ -602,7 +591,7 @@ handle_external_item_change(const struct
   const char *new_url;
   svn_node_kind_t ext_kind;
 
-  SVN_ERR_ASSERT(eb->repos_root_url && parent_dir_url);
+  SVN_ERR_ASSERT(repos_root_url && parent_dir_url);
   SVN_ERR_ASSERT(new_item != NULL);
 
   /* Don't bother to check status, since we'll get that for free by
@@ -613,7 +602,7 @@ handle_external_item_change(const struct
      any pointers they have should also outlive the iterpool.  */
 
   SVN_ERR(svn_wc__resolve_relative_external_url(&new_url,
-                                                new_item, eb->repos_root_url,
+                                                new_item, repos_root_url,
                                                 parent_dir_url,
                                                 scratch_pool, scratch_pool));
 
@@ -622,7 +611,7 @@ handle_external_item_change(const struct
   SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &new_loc,
                                             new_url, NULL,
                                             &(new_item->peg_revision),
-                                            &(new_item->revision), eb->ctx,
+                                            &(new_item->revision), ctx,
                                             scratch_pool));
 
   SVN_ERR(svn_ra_check_path(ra_session, "", new_loc->rev, &ext_kind,
@@ -645,10 +634,10 @@ handle_external_item_change(const struct
      user when it happens.  Worst case: your disk fills up :-). */
 
   /* First notify that we're about to handle an external. */
-  if (eb->ctx->notify_func2)
+  if (ctx->notify_func2)
     {
-      (*eb->ctx->notify_func2)(
-         eb->ctx->notify_baton2,
+      (*ctx->notify_func2)(
+         ctx->notify_baton2,
          svn_wc_create_notify(local_abspath,
                               svn_wc_notify_update_external,
                               scratch_pool),
@@ -671,11 +660,11 @@ handle_external_item_change(const struct
                                     &(new_item->peg_revision),
                                     &(new_item->revision),
                                     parent_dir_abspath,
-                                    eb->timestamp_sleep, eb->ctx,
+                                    timestamp_sleep, ctx,
                                     scratch_pool));
         break;
       case svn_node_file:
-        if (strcmp(eb->repos_root_url, new_loc->repos_root_url))
+        if (strcmp(repos_root_url, new_loc->repos_root_url))
           {
             const char *local_repos_root_url;
             const char *local_repos_uuid;
@@ -692,7 +681,7 @@ handle_external_item_change(const struct
 
             SVN_ERR(svn_wc__node_get_repos_info(&local_repos_root_url,
                                                 &local_repos_uuid,
-                                                eb->ctx->wc_ctx,
+                                                ctx->wc_ctx,
                                                 parent_dir_abspath,
                                                 scratch_pool, scratch_pool));
             ext_repos_relpath = svn_uri_skip_ancestor(new_loc->repos_root_url,
@@ -703,7 +692,7 @@ handle_external_item_change(const struct
               return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
                         _("Unsupported external: URL of file external '%s' "
                           "is not in repository '%s'"),
-                        new_url, eb->repos_root_url);
+                        new_url, repos_root_url);
 
             new_url = svn_path_url_add_component2(local_repos_root_url,
                                                   ext_repos_relpath,
@@ -713,7 +702,7 @@ handle_external_item_change(const struct
                                                       NULL,
                                                       &(new_item->peg_revision),
                                                       &(new_item->revision),
-                                                      eb->ctx, scratch_pool));
+                                                      ctx, scratch_pool));
           }
 
         SVN_ERR(switch_file_external(local_abspath,
@@ -722,9 +711,10 @@ handle_external_item_change(const struct
                                      &new_item->revision,
                                      parent_dir_abspath,
                                      ra_session,
-                                     eb->timestamp_sleep, eb->ctx,
+                                     ctx,
                                      scratch_pool));
         break;
+
       default:
         SVN_ERR_MALFUNCTION();
         break;
@@ -734,22 +724,21 @@ handle_external_item_change(const struct
 }
 
 static svn_error_t *
-wrap_external_error(const struct external_change_baton_t *eb,
+wrap_external_error(const svn_client_ctx_t *ctx,
                     const char *target_abspath,
                     svn_error_t *err,
                     apr_pool_t *scratch_pool)
 {
   if (err && err->apr_err != SVN_ERR_CANCELLED)
     {
-      if (eb->ctx->notify_func2)
+      if (ctx->notify_func2)
         {
           svn_wc_notify_t *notifier = svn_wc_create_notify(
                                             target_abspath,
                                             svn_wc_notify_failed_external,
                                             scratch_pool);
           notifier->err = err;
-          eb->ctx->notify_func2(eb->ctx->notify_baton2, notifier,
-                                scratch_pool);
+          ctx->notify_func2(ctx->notify_baton2, notifier, scratch_pool);
         }
       svn_error_clear(err);
       return SVN_NO_ERROR;
@@ -759,7 +748,9 @@ wrap_external_error(const struct externa
 }
 
 static svn_error_t *
-handle_externals_change(const struct external_change_baton_t *eb,
+handle_externals_change(svn_client_ctx_t *ctx,
+                        const char *repos_root_url,
+                        svn_boolean_t *timestamp_sleep,
                         const char *local_abspath,
                         const char *new_desc_text,
                         apr_hash_t *old_externals,
@@ -790,7 +781,7 @@ handle_externals_change(const struct ext
   else
     new_desc = NULL;
 
-  SVN_ERR(svn_wc__node_get_url(&url, eb->ctx->wc_ctx, local_abspath,
+  SVN_ERR(svn_wc__node_get_url(&url, ctx->wc_ctx, local_abspath,
                                scratch_pool, iterpool));
 
   SVN_ERR_ASSERT(url);
@@ -805,8 +796,8 @@ handle_externals_change(const struct ext
 
       svn_pool_clear(iterpool);
 
-      if (eb->ctx->cancel_func)
-        SVN_ERR(eb->ctx->cancel_func(eb->ctx->cancel_baton));
+      if (ctx->cancel_func)
+        SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
       target_abspath = svn_dirent_join(local_abspath, new_item->target_dir,
                                        iterpool);
@@ -815,11 +806,14 @@ handle_externals_change(const struct ext
                                           APR_HASH_KEY_STRING);
 
       SVN_ERR(wrap_external_error(
-                      eb, target_abspath,
-                      handle_external_item_change(eb, local_abspath, url,
+                      ctx, target_abspath,
+                      handle_external_item_change(ctx,
+                                                  repos_root_url,
+                                                  local_abspath, url,
                                                   target_abspath,
                                                   old_defining_abspath,
                                                   new_item,
+                                                  timestamp_sleep,
                                                   iterpool),
                       iterpool));
 
@@ -847,15 +841,9 @@ svn_client__handle_externals(apr_hash_t 
   apr_hash_t *old_external_defs;
   apr_hash_index_t *hi;
   apr_pool_t *iterpool;
-  struct external_change_baton_t eb;
 
   SVN_ERR_ASSERT(repos_root_url);
 
-  eb.repos_root_url = repos_root_url;
-  eb.ctx = ctx;
-  eb.timestamp_sleep = timestamp_sleep;
-
-
   iterpool = svn_pool_create(scratch_pool);
 
   /* Parse the old externals. This part will be replaced by reading EXTERNALS
@@ -894,7 +882,8 @@ svn_client__handle_externals(apr_hash_t 
             }
         }
 
-      SVN_ERR(handle_externals_change(&eb, local_abspath,
+      SVN_ERR(handle_externals_change(ctx, repos_root_url, timestamp_sleep,
+                                      local_abspath,
                                       desc_text, old_external_defs,
                                       ambient_depth, requested_depth,
                                       iterpool));
@@ -912,8 +901,8 @@ svn_client__handle_externals(apr_hash_t 
       svn_pool_clear(iterpool);
 
       SVN_ERR(wrap_external_error(
-                          &eb, item_abspath,
-                          handle_external_item_removal(&eb, defining_abspath,
+                          ctx, item_abspath,
+                          handle_external_item_removal(ctx, defining_abspath,
                                                        item_abspath, iterpool),
                           iterpool));
 
@@ -960,17 +949,12 @@ svn_client__export_externals(apr_hash_t 
                              svn_client_ctx_t *ctx,
                              apr_pool_t *scratch_pool)
 {
-  struct external_change_baton_t eb = { 0 };
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   apr_pool_t *sub_iterpool = svn_pool_create(scratch_pool);
   apr_hash_index_t *hi;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(to_abspath));
 
-  eb.repos_root_url = repos_root_url;
-  eb.ctx = ctx;
-  eb.timestamp_sleep = timestamp_sleep;
-
   for (hi = apr_hash_first(scratch_pool, externals);
        hi;
        hi = apr_hash_next(hi))
@@ -1020,7 +1004,7 @@ svn_client__export_externals(apr_hash_t 
                                               sub_iterpool));
 
           SVN_ERR(wrap_external_error(
-                          &eb, item_abspath,
+                          ctx, item_abspath,
                           svn_client_export5(NULL, new_url, item_abspath,
                                              &item->peg_revision,
                                              &item->revision,

Modified: subversion/branches/ev2-export/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/info.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/info.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/info.c Wed Jul 11 10:26:19 2012
@@ -348,7 +348,10 @@ svn_client_info3(const char *abspath_or_
           || peg_revision->kind == svn_opt_revision_unspecified))
     {
       /* Do all digging in the working copy. */
-      wc_info_receiver_baton_t b = { receiver, receiver_baton };
+      wc_info_receiver_baton_t b;
+
+      b.client_receiver_func = receiver;
+      b.client_receiver_baton = receiver_baton;
       return svn_error_trace(
         svn_wc__get_info(ctx->wc_ctx, abspath_or_url, depth,
                         fetch_excluded, fetch_actual_only, changelists,

Modified: subversion/branches/ev2-export/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/log.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/log.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/log.c Wed Jul 11 10:26:19 2012
@@ -90,23 +90,24 @@ copyfrom_info_receiver(svn_location_segm
 }
 
 svn_error_t *
-svn_client__get_copy_source(const char *path_or_url,
+svn_client__get_copy_source(const char **original_repos_relpath,
+                            svn_revnum_t *original_revision,
+                            const char *path_or_url,
                             const svn_opt_revision_t *revision,
-                            const char **copyfrom_path,
-                            svn_revnum_t *copyfrom_rev,
                             svn_client_ctx_t *ctx,
-                            apr_pool_t *pool)
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
   copyfrom_info_t copyfrom_info = { 0 };
-  apr_pool_t *sesspool = svn_pool_create(pool);
+  apr_pool_t *sesspool = svn_pool_create(scratch_pool);
   svn_ra_session_t *ra_session;
   svn_client__pathrev_t *at_loc;
 
   copyfrom_info.is_first = TRUE;
   copyfrom_info.path = NULL;
   copyfrom_info.rev = SVN_INVALID_REVNUM;
-  copyfrom_info.pool = pool;
+  copyfrom_info.pool = result_pool;
 
   SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &at_loc,
                                             path_or_url, NULL,
@@ -119,7 +120,7 @@ svn_client__get_copy_source(const char *
   err = svn_ra_get_location_segments(ra_session, "", at_loc->rev, at_loc->rev,
                                      SVN_INVALID_REVNUM,
                                      copyfrom_info_receiver, &copyfrom_info,
-                                     pool);
+                                     scratch_pool);
 
   svn_pool_destroy(sesspool);
 
@@ -133,14 +134,14 @@ svn_client__get_copy_source(const char *
             svn_error_clear(err);
             err = SVN_NO_ERROR;
 
-            *copyfrom_path = NULL;
-            *copyfrom_rev = SVN_INVALID_REVNUM;
+            *original_repos_relpath = NULL;
+            *original_revision = SVN_INVALID_REVNUM;
         }
       return svn_error_trace(err);
     }
 
-  *copyfrom_path = copyfrom_info.path;
-  *copyfrom_rev = copyfrom_info.rev;
+  *original_repos_relpath = copyfrom_info.path;
+  *original_revision = copyfrom_info.rev;
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/ev2-export/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/merge.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/merge.c Wed Jul 11 10:26:19 2012
@@ -597,13 +597,15 @@ make_conflict_versions(const svn_wc_conf
   right_relpath = svn_client__pathrev_relpath(merge_source->loc2,
                                               pool);
 
-  *left = svn_wc_conflict_version_create(
+  *left = svn_wc_conflict_version_create2(
             merge_source->loc1->repos_root_url,
+            merge_source->loc1->repos_uuid,
             svn_relpath_join(left_relpath, child, pool),
             merge_source->loc1->rev, node_kind, pool);
 
-  *right = svn_wc_conflict_version_create(
+  *right = svn_wc_conflict_version_create2(
              merge_source->loc2->repos_root_url,
+             merge_source->loc2->repos_uuid,
              svn_relpath_join(right_relpath, child, pool),
              merge_source->loc2->rev, node_kind, pool);
 
@@ -661,13 +663,24 @@ tree_conflict(merge_cmd_baton_t *merge_b
               svn_wc_conflict_reason_t reason)
 {
   const svn_wc_conflict_description2_t *existing_conflict;
+  svn_error_t *err;
 
   if (merge_b->record_only || merge_b->dry_run)
     return SVN_NO_ERROR;
 
-  SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict, merge_b->ctx->wc_ctx,
-                                    victim_abspath, merge_b->pool,
-                                    merge_b->pool));
+  err = svn_wc__get_tree_conflict(&existing_conflict, merge_b->ctx->wc_ctx,
+                                  victim_abspath, merge_b->pool,
+                                  merge_b->pool);
+
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+        return svn_error_trace(err);
+
+      svn_error_clear(err);
+      existing_conflict = FALSE;
+    }
+
   if (existing_conflict == NULL)
     {
       svn_wc_conflict_description2_t *conflict;
@@ -1363,10 +1376,17 @@ merge_dir_props_changed(svn_wc_notify_st
      definition, 'svn merge' shouldn't touch any pristine data  */
   if (props->nelts)
     {
+      const svn_wc_conflict_version_t *left;
+      const svn_wc_conflict_version_t *right;
       svn_client_ctx_t *ctx = merge_b->ctx;
 
+      SVN_ERR(make_conflict_versions(&left, &right, local_abspath,
+                                     svn_node_dir, &merge_b->merge_source,
+                                     merge_b->target, merge_b->pool));
+
       SVN_ERR(svn_wc_merge_props3(state, ctx->wc_ctx, local_abspath,
-                                  NULL, NULL, original_props, props,
+                                  left, right,
+                                  original_props, props,
                                   merge_b->dry_run,
                                   ctx->conflict_func2, ctx->conflict_baton2,
                                   ctx->cancel_func, ctx->cancel_baton,
@@ -1682,8 +1702,7 @@ merge_file_changed(svn_wc_notify_state_t
                                   left, right,
                                   original_props, prop_changes,
                                   merge_b->dry_run,
-                                  ctx->conflict_func2,
-                                  ctx->conflict_baton2,
+                                  ctx->conflict_func2, ctx->conflict_baton2,
                                   ctx->cancel_func, ctx->cancel_baton,
                                   scratch_pool));
     }
@@ -1716,8 +1735,10 @@ merge_file_changed(svn_wc_notify_state_t
       SVN_ERR(svn_wc_text_modified_p2(&has_local_mods, ctx->wc_ctx,
                                       local_abspath, FALSE, scratch_pool));
 
+      /* Postpone all conflicts. */
       conflict_baton.wrapped_func = ctx->conflict_func2;
       conflict_baton.wrapped_baton = ctx->conflict_baton2;
+
       conflict_baton.conflicted_paths = &merge_b->conflicted_paths;
       conflict_baton.pool = merge_b->pool;
 
@@ -1868,6 +1889,7 @@ merge_file_added(svn_wc_notify_state_t *
             svn_stream_t *new_contents, *new_base_contents;
             apr_hash_t *new_base_props, *new_props;
             const svn_wc_conflict_description2_t *existing_conflict;
+            svn_error_t *err;
 
             /* If this is a merge from the same repository as our
                working copy, we handle adds as add-with-history.
@@ -1903,10 +1925,20 @@ merge_file_added(svn_wc_notify_state_t *
                                                  scratch_pool, scratch_pool));
               }
 
-            SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict,
-                                              merge_b->ctx->wc_ctx,
-                                              mine_abspath, merge_b->pool,
-                                              merge_b->pool));
+            err = svn_wc__get_tree_conflict(&existing_conflict,
+                                            merge_b->ctx->wc_ctx,
+                                            mine_abspath, merge_b->pool,
+                                            merge_b->pool);
+
+            if (err)
+              {
+                if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+                  return svn_error_trace(err);
+
+                svn_error_clear(err);
+                existing_conflict = FALSE;
+              }
+
             if (existing_conflict)
               {
                 svn_boolean_t moved_here;
@@ -2395,6 +2427,10 @@ merge_dir_added(svn_wc_notify_state_t *s
                                            reason));
               if (tree_conflicted)
                 *tree_conflicted = TRUE;
+              if (skip)
+                *skip = TRUE;
+              if (skip_children)
+                *skip_children = TRUE;
               if (state)
                 *state = svn_wc_notify_state_obstructed;
             }
@@ -3297,7 +3333,10 @@ adjust_deleted_subtree_ranges(svn_client
       forward merge over ra_neon then we get SVN_ERR_RA_DAV_REQUEST_FAILED.
       http://subversion.tigris.org/issues/show_bug.cgi?id=3137 fixed some of
       the cases where different RA layers returned different error codes to
-      signal the "path not found"...but it looks like there is more to do. */
+      signal the "path not found"...but it looks like there is more to do.
+      
+      ### Do we still need to special case for ra_neon (since it no longer
+          exists)? */
   if (err)
     {
       if (err->apr_err == SVN_ERR_FS_NOT_FOUND
@@ -6219,6 +6258,36 @@ merge_range_find_extremes(svn_revnum_t *
         *max_rev_p = range_max;
     }
 }
+/* Wrapper around svn_ra_get_log2(). Invoke RECEIVER with RECEIVER_BATON
+ * on each commit from START to END on TARGET.
+ * Important: Revision properties are not retrieved by this functions for
+ * performance reasons.
+ */
+
+static svn_error_t *
+get_log(svn_ra_session_t *ra_session,
+        const char *target,
+        svn_revnum_t youngest_rev,
+        svn_revnum_t oldest_rev,
+        svn_boolean_t discover_changed_paths,
+        svn_log_entry_receiver_t receiver,
+        void *receiver_baton,
+        apr_pool_t *pool)
+{
+  apr_array_header_t *log_targets;
+  apr_array_header_t *revprops;
+  
+  log_targets = apr_array_make(pool, 1, sizeof(const char *));
+  APR_ARRAY_PUSH(log_targets, const char *) = target;
+
+  revprops = apr_array_make(pool, 0, sizeof(const char *));
+
+  SVN_ERR(svn_ra_get_log2(ra_session, log_targets, youngest_rev,
+                          oldest_rev, 0, discover_changed_paths, FALSE, FALSE,
+                          revprops, receiver, receiver_baton, pool));
+
+  return SVN_NO_ERROR;
+}
 
 /* Set *OPERATIVE_RANGES_P to an array of svn_merge_range_t * merge
    range objects copied wholesale from RANGES which have the property
@@ -6244,9 +6313,6 @@ remove_noop_merge_ranges(apr_array_heade
     apr_array_make(pool, ranges->nelts, sizeof(svn_revnum_t));
   apr_array_header_t *operative_ranges =
     apr_array_make(ranges->pool, ranges->nelts, ranges->elt_size);
-  apr_array_header_t *log_targets =
-    apr_array_make(pool, 1, sizeof(const char *));
-  APR_ARRAY_PUSH(log_targets, const char *) = "";
 
   /* Find the revision extremes of the RANGES we have. */
   merge_range_find_extremes(&oldest_rev, &youngest_rev, ranges);
@@ -6255,10 +6321,8 @@ remove_noop_merge_ranges(apr_array_heade
 
   /* Get logs across those ranges, recording which revisions hold
      changes to our object's history. */
-  SVN_ERR(svn_ra_get_log2(ra_session, log_targets, youngest_rev,
-                          oldest_rev, 0, FALSE, FALSE, FALSE,
-                          apr_array_make(pool, 0, sizeof(const char *)),
-                          log_changed_revs, changed_revs, pool));
+  SVN_ERR(get_log(ra_session, "", youngest_rev, oldest_rev, FALSE,
+                  log_changed_revs, changed_revs, pool));
 
   /* Are there *any* changes? */
   if (changed_revs->nelts)
@@ -6519,8 +6583,9 @@ normalize_merge_sources_internal(apr_arr
             {
               svn_location_segment_t *segment2 =
                 APR_ARRAY_IDX(segments, 1, svn_location_segment_t *);
-              const char *copyfrom_path, *segment_url;
-              svn_revnum_t copyfrom_rev;
+              const char *segment_url;
+              const char *original_repos_relpath;
+              svn_revnum_t original_revision;
               svn_opt_revision_t range_start_rev;
               range_start_rev.kind = svn_opt_revision_number;
               range_start_rev.value.number = segment2->range_start;
@@ -6528,24 +6593,23 @@ normalize_merge_sources_internal(apr_arr
               segment_url = svn_path_url_add_component2(
                               source_loc->repos_root_url, segment2->path,
                               scratch_pool);
-              SVN_ERR(svn_client__get_copy_source(segment_url,
-                                                  &range_start_rev,
-                                                  &copyfrom_path,
-                                                  &copyfrom_rev,
-                                                  ctx, result_pool));
+              SVN_ERR(svn_client__get_copy_source(&original_repos_relpath,
+                                                  &original_revision,
+                                                  segment_url,
+                                                  &range_start_rev, ctx,
+                                                  result_pool, scratch_pool));
               /* Got copyfrom data?  Fix up the first segment to cover
                  back to COPYFROM_REV + 1, and then prepend a new
                  segment covering just COPYFROM_REV. */
-              if (copyfrom_path && SVN_IS_VALID_REVNUM(copyfrom_rev))
+              if (original_repos_relpath)
                 {
                   svn_location_segment_t *new_segment =
                     apr_pcalloc(result_pool, sizeof(*new_segment));
-                  /* Skip the leading '/'. */
-                  new_segment->path = (*copyfrom_path == '/')
-                    ? copyfrom_path + 1 : copyfrom_path;
-                  new_segment->range_start = copyfrom_rev;
-                  new_segment->range_end = copyfrom_rev;
-                  segment->range_start = copyfrom_rev + 1;
+
+                  new_segment->path = original_repos_relpath;
+                  new_segment->range_start = original_revision;
+                  new_segment->range_end = original_revision;
+                  segment->range_start = original_revision + 1;
                   svn_sort__array_insert(&new_segment, segments, 0);
                 }
             }
@@ -7447,7 +7511,6 @@ get_operative_immediate_children(apr_has
                                  apr_pool_t *result_pool,
                                  apr_pool_t *scratch_pool)
 {
-  apr_array_header_t *log_targets;
   log_find_operative_subtree_baton_t log_baton;
 
   SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(oldest_rev));
@@ -7468,12 +7531,11 @@ get_operative_immediate_children(apr_has
   log_baton.depth = depth;
   log_baton.wc_ctx = wc_ctx;
   log_baton.result_pool = result_pool;
-  log_targets = apr_array_make(scratch_pool, 1, sizeof(const char *));
-  APR_ARRAY_PUSH(log_targets, const char *) = "";
-  SVN_ERR(svn_ra_get_log2(ra_session, log_targets, youngest_rev,
-                          oldest_rev, 0, TRUE, FALSE, FALSE,
-                          NULL, log_find_operative_subtree_revs,
-                          &log_baton, scratch_pool));
+
+  SVN_ERR(get_log(ra_session, "", youngest_rev, oldest_rev,
+                  TRUE, /* discover_changed_paths */
+                  log_find_operative_subtree_revs,
+                  &log_baton, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -8342,7 +8404,6 @@ remove_noop_subtree_ranges(const merge_s
   apr_array_header_t *requested_ranges;
   apr_array_header_t *subtree_gap_ranges;
   apr_array_header_t *subtree_remaining_ranges;
-  apr_array_header_t *log_targets;
   log_noop_baton_t log_gap_baton;
   svn_merge_range_t *oldest_gap_rev;
   svn_merge_range_t *youngest_gap_rev;
@@ -8360,7 +8421,6 @@ remove_noop_subtree_ranges(const merge_s
 
   subtree_remaining_ranges = apr_array_make(scratch_pool, 1,
                                             sizeof(svn_merge_range_t *));
-  log_targets = apr_array_make(scratch_pool, 1, sizeof(const char *));
 
   /* Given the requested merge of SOURCE->rev1:rev2 might there be any
      part of this range required for subtrees but not for the target? */
@@ -8426,18 +8486,14 @@ remove_noop_subtree_ranges(const merge_s
                                                   sizeof(svn_revnum_t *));
   log_gap_baton.pool = svn_pool_create(scratch_pool);
 
-  APR_ARRAY_PUSH(log_targets, const char *) = "";
-
   /* Invoke the svn_log_entry_receiver_t receiver log_noop_revs() from
      oldest to youngest.  The receiver is optimized to add ranges to
      log_gap_baton.merged_ranges and log_gap_baton.operative_ranges, but
      requires that the revs arrive oldest to youngest -- see log_noop_revs()
      and rangelist_merge_revision(). */
-  SVN_ERR(svn_ra_get_log2(ra_session, log_targets, oldest_gap_rev->start + 1,
-                          youngest_gap_rev->end, 0, TRUE, TRUE, FALSE,
-                          apr_array_make(scratch_pool, 0,
-                                         sizeof(const char *)),
-                          log_noop_revs, &log_gap_baton, scratch_pool));
+  SVN_ERR(get_log(ra_session, "", oldest_gap_rev->start + 1,
+                  youngest_gap_rev->end, TRUE,
+                  log_noop_revs, &log_gap_baton, scratch_pool));
 
   inoperative_ranges = svn_rangelist__initialize(oldest_gap_rev->start,
                                                  youngest_gap_rev->end,
@@ -9609,7 +9665,11 @@ merge_locked(const char *source1,
          side, and merge the right. */
       else
         {
-          merge_source_t source = { source1_loc, source2_loc, FALSE };
+          merge_source_t source;
+
+          source.loc1 = source1_loc;
+          source.loc2 = source2_loc;
+          source.ancestral = FALSE;
 
           err = merge_cousins_and_supplement_mergeinfo(target,
                                                        ra_session1,
@@ -9641,7 +9701,11 @@ merge_locked(const char *source1,
     }
   else
     {
-      merge_source_t source = { source1_loc, source2_loc, FALSE };
+      merge_source_t source;
+
+      source.loc1 = source1_loc;
+      source.loc2 = source2_loc;
+      source.ancestral = FALSE;
 
       /* Build a single-item merge_source_t array. */
       merge_sources = apr_array_make(scratch_pool, 1, sizeof(merge_source_t *));
@@ -10011,8 +10075,6 @@ find_unsynced_ranges(const svn_client__p
         (APR_ARRAY_IDX(potentially_unmerged_ranges,
                        potentially_unmerged_ranges->nelts - 1,
                        svn_merge_range_t *))->end;
-      apr_array_header_t *log_targets = apr_array_make(scratch_pool, 1,
-                                                       sizeof(const char *));
       log_find_operative_baton_t log_baton;
 
       log_baton.merged_catalog = merged_catalog;
@@ -10023,12 +10085,10 @@ find_unsynced_ranges(const svn_client__p
         = svn_client__pathrev_fspath(target_loc, scratch_pool);
       log_baton.result_pool = result_pool;
 
-      APR_ARRAY_PUSH(log_targets, const char *) = "";
-
-      SVN_ERR(svn_ra_get_log2(ra_session, log_targets, youngest_rev,
-                              oldest_rev, 0, TRUE, FALSE, FALSE,
-                              NULL, log_find_operative_revs, &log_baton,
-                              scratch_pool));
+      SVN_ERR(get_log(ra_session, "", youngest_rev, oldest_rev,
+                      TRUE, /* discover_changed_paths */
+                      log_find_operative_revs, &log_baton,
+                      scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -10659,7 +10719,7 @@ find_reintegrate_merge(merge_source_t **
       /* Have we actually merged anything to the source from the
          target?  If so, make sure we've merged a contiguous
          prefix. */
-      svn_mergeinfo_t final_unmerged_catalog = apr_hash_make(scratch_pool);
+      svn_mergeinfo_catalog_t final_unmerged_catalog = apr_hash_make(scratch_pool);
 
       SVN_ERR(find_unsynced_ranges(source_loc, yc_ancestor,
                                    unmerged_to_source_mergeinfo_catalog,
@@ -11214,8 +11274,8 @@ branch_history_get_endpoints(svn_client_
 }
 
 /* Set *BASE_P to the last location on SOURCE_BRANCH such that all changes
- * on SOURCE_BRANCH up to and including *BASE_P have already been merged
- * into the target branch -- or, specifically, are recorded in
+ * on SOURCE_BRANCH after YCA up to and including *BASE_P have already
+ * been merged into the target branch -- or, specifically, are recorded in
  * TARGET_MERGEINFO.
  *
  *               *BASE_P       TIP
@@ -11555,21 +11615,21 @@ do_symmetric_merge_locked(const svn_clie
                           apr_pool_t *scratch_pool)
 {
   merge_target_t *target;
-  merge_source_t source;
   svn_boolean_t use_sleep = FALSE;
   svn_error_t *err;
 
   SVN_ERR(open_target_wc(&target, target_abspath, TRUE, TRUE, TRUE,
                          ctx, scratch_pool, scratch_pool));
 
-  source.loc1 = merge->base;
-  source.loc2 = merge->right;
-  source.ancestral = (merge->mid == NULL);
-
   if (merge->mid)
     {
+      merge_source_t source;
       svn_ra_session_t *ra_session = NULL;
 
+      source.loc1 = merge->base;
+      source.loc2 = merge->right;
+      source.ancestral = (merge->mid == NULL);
+
       SVN_ERR(ensure_ra_session_url(&ra_session, source.loc1->url,
                                     ctx, scratch_pool));
 
@@ -11586,8 +11646,22 @@ do_symmetric_merge_locked(const svn_clie
     }
   else
     {
+      /* Ignoring the base that we found, we pass the YCA instead and let
+         do_merge() work out which subtrees need which revision ranges to
+         be merged.  This enables do_merge() to fill in revision-range
+         gaps that are older than the base that we calculated (which is
+         for the root path of the merge).
+
+         An improvement would be to change find_symmetric_merge() to
+         find the base for each sutree, and then here use the oldest base
+         among all subtrees. */
+      merge_source_t source;
       apr_array_header_t *merge_sources;
 
+      source.loc1 = merge->yca;
+      source.loc2 = merge->right;
+      source.ancestral = (merge->mid == NULL);
+
       merge_sources = apr_array_make(scratch_pool, 1, sizeof(merge_source_t *));
       APR_ARRAY_PUSH(merge_sources, const merge_source_t *) = &source;
 

Modified: subversion/branches/ev2-export/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/mergeinfo.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/mergeinfo.c Wed Jul 11 10:26:19 2012
@@ -502,7 +502,7 @@ svn_client__get_repos_mergeinfo_catalog(
                                         apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
-  svn_mergeinfo_t repos_mergeinfo_cat;
+  svn_mergeinfo_catalog_t repos_mergeinfo_cat;
   apr_array_header_t *rel_paths = apr_array_make(scratch_pool, 1,
                                                  sizeof(const char *));
   const char *old_session_url;
@@ -1499,7 +1499,7 @@ logs_for_mergeinfo_rangelist(const char 
                              const apr_array_header_t *merge_source_fspaths,
                              svn_boolean_t filtering_merged,
                              const apr_array_header_t *rangelist,
-                             svn_mergeinfo_t target_mergeinfo_catalog,
+                             svn_mergeinfo_catalog_t target_mergeinfo_catalog,
                              const char *target_fspath,
                              svn_boolean_t discover_changed_paths,
                              const apr_array_header_t *revprops,
@@ -1622,27 +1622,29 @@ svn_client_mergeinfo_get_merged(apr_hash
 
 
 svn_error_t *
-svn_client_mergeinfo_log(svn_boolean_t finding_merged,
-                         const char *target_path_or_url,
-                         const svn_opt_revision_t *target_peg_revision,
-                         const char *source_path_or_url,
-                         const svn_opt_revision_t *source_peg_revision,
-                         svn_log_entry_receiver_t log_receiver,
-                         void *log_receiver_baton,
-                         svn_boolean_t discover_changed_paths,
-                         svn_depth_t depth,
-                         const apr_array_header_t *revprops,
-                         svn_client_ctx_t *ctx,
-                         apr_pool_t *scratch_pool)
+svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
+                          const char *target_path_or_url,
+                          const svn_opt_revision_t *target_peg_revision,
+                          const char *source_path_or_url,
+                          const svn_opt_revision_t *source_peg_revision,
+                          const svn_opt_revision_t *source_start_revision,
+                          const svn_opt_revision_t *source_end_revision,
+                          svn_log_entry_receiver_t log_receiver,
+                          void *log_receiver_baton,
+                          svn_boolean_t discover_changed_paths,
+                          svn_depth_t depth,
+                          const apr_array_header_t *revprops,
+                          svn_client_ctx_t *ctx,
+                          apr_pool_t *scratch_pool)
 {
-  apr_pool_t *sesspool = svn_pool_create(scratch_pool);
   const char *log_target = NULL;
   const char *repos_root;
   const char *target_repos_rel;
   svn_mergeinfo_catalog_t target_mergeinfo_cat;
 
-  /* A hash of paths, at or under TARGET_PATH_OR_URL, mapped to rangelists.  Not
-     technically mergeinfo, so not using the svn_mergeinfo_t type. */
+  /* A hash of paths, at or under TARGET_PATH_OR_URL, mapped to
+     rangelists.  Not technically mergeinfo, so not using the
+     svn_mergeinfo_t type. */
   apr_hash_t *inheritable_subtree_merges;
 
   svn_mergeinfo_t source_history;
@@ -1661,6 +1663,21 @@ svn_client_mergeinfo_log(svn_boolean_t f
       SVN_ERR_UNSUPPORTED_FEATURE, NULL,
       _("Only depths 'infinity' and 'empty' are currently supported"));
 
+  /* Validate and sanitize the incoming source operative revision range. */
+  if (!((source_start_revision->kind == svn_opt_revision_unspecified) ||
+        (source_start_revision->kind == svn_opt_revision_number) ||
+        (source_start_revision->kind == svn_opt_revision_date) ||
+        (source_start_revision->kind == svn_opt_revision_head)))
+    return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
+  if (!((source_end_revision->kind == svn_opt_revision_unspecified) ||
+        (source_end_revision->kind == svn_opt_revision_number) ||
+        (source_end_revision->kind == svn_opt_revision_date) ||
+        (source_end_revision->kind == svn_opt_revision_head)))
+    return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
+  if ((source_end_revision->kind == svn_opt_revision_unspecified)
+      && (source_start_revision->kind != svn_opt_revision_unspecified))
+    source_end_revision = source_start_revision;
+
   /* We need the union of TARGET_PATH_OR_URL@TARGET_PEG_REVISION's mergeinfo
      and MERGE_SOURCE_URL's history.  It's not enough to do path
      matching, because renames in the history of MERGE_SOURCE_URL
@@ -1675,7 +1692,8 @@ svn_client_mergeinfo_log(svn_boolean_t f
 
   if (!svn_path_is_url(target_path_or_url))
     {
-      SVN_ERR(svn_dirent_get_absolute(&target_path_or_url, target_path_or_url, scratch_pool));
+      SVN_ERR(svn_dirent_get_absolute(&target_path_or_url,
+                                      target_path_or_url, scratch_pool));
       SVN_ERR(svn_wc__node_get_repos_relpath(&target_repos_rel,
                                              ctx->wc_ctx, target_path_or_url,
                                              scratch_pool, scratch_pool));
@@ -1685,7 +1703,9 @@ svn_client_mergeinfo_log(svn_boolean_t f
       target_repos_rel = svn_uri_skip_ancestor(repos_root, target_path_or_url,
                                                scratch_pool);
 
-      SVN_ERR_ASSERT(target_repos_rel != NULL); /* Or get_mergeinfo should have failed */
+      /* TARGET_REPOS_REL should be non-NULL, else get_mergeinfo
+         should have failed.  */
+      SVN_ERR_ASSERT(target_repos_rel != NULL); 
     }
 
   if (!target_mergeinfo_cat)
@@ -1713,56 +1733,67 @@ svn_client_mergeinfo_log(svn_boolean_t f
   /* Open RA sessions to the repository for the source and target.
    * ### TODO: As the source and target must be in the same repository, we
    * should share a single session, tracking the two URLs separately. */
-  if (!finding_merged)
-    {
-      svn_ra_session_t *target_session;
-      svn_client__pathrev_t *pathrev;
-
-      SVN_ERR(svn_client__ra_session_from_path2(
-                &target_session, &pathrev,
-                target_path_or_url, NULL,
-                target_peg_revision, target_peg_revision,
-                ctx, sesspool));
-      SVN_ERR(svn_client__get_history_as_mergeinfo(
-                &target_history, NULL,
-                pathrev, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
-                target_session, ctx, scratch_pool));
-    }
   {
-    svn_ra_session_t *source_session;
+    apr_pool_t *sesspool = svn_pool_create(scratch_pool);
+    svn_ra_session_t *source_session, *target_session;
     svn_client__pathrev_t *pathrev;
+    svn_revnum_t start_rev, end_rev, youngest_rev = SVN_INVALID_REVNUM;
+    
+    if (! finding_merged)
+      {
+        SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev,
+                                                  target_path_or_url, NULL,
+                                                  target_peg_revision,
+                                                  target_peg_revision,
+                                                  ctx, sesspool));
+        SVN_ERR(svn_client__get_history_as_mergeinfo(&target_history, NULL,
+                                                     pathrev,
+                                                     SVN_INVALID_REVNUM,
+                                                     SVN_INVALID_REVNUM,
+                                                     target_session, ctx,
+                                                     scratch_pool));
+      }
+    
+    SVN_ERR(svn_client__ra_session_from_path2(&source_session, &pathrev,
+                                              source_path_or_url, NULL,
+                                              source_peg_revision,
+                                              source_peg_revision,
+                                              ctx, sesspool));
+    SVN_ERR(svn_client__get_revision_number(&start_rev, &youngest_rev,
+                                            ctx->wc_ctx, source_path_or_url,
+                                            source_session,
+                                            source_start_revision,
+                                            sesspool));
+    SVN_ERR(svn_client__get_revision_number(&end_rev, &youngest_rev,
+                                            ctx->wc_ctx, source_path_or_url,
+                                            source_session,
+                                            source_end_revision,
+                                            sesspool));
+    SVN_ERR(svn_client__get_history_as_mergeinfo(&source_history, NULL,
+                                                 pathrev, end_rev, start_rev,
+                                                 source_session, ctx,
+                                                 scratch_pool));
 
-    SVN_ERR(svn_client__ra_session_from_path2(
-              &source_session, &pathrev,
-              source_path_or_url, NULL,
-              source_peg_revision, source_peg_revision,
-              ctx, sesspool));
-    SVN_ERR(svn_client__get_history_as_mergeinfo(
-              &source_history, NULL,
-              pathrev, SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
-              source_session, ctx, scratch_pool));
+    /* Close the source and target sessions. */
+    svn_pool_destroy(sesspool);
   }
-  /* Close the source and target sessions. */
-  svn_pool_destroy(sesspool);
 
-  /* Separate the explicit or inherited mergeinfo on TARGET_PATH_OR_URL, and possibly
-     its explicit subtree mergeinfo, into their inheritable and non-inheritable
-     parts. */
-  master_noninheritable_rangelist =
-    apr_array_make(scratch_pool, 64, sizeof(svn_merge_range_t *));
+  /* Separate the explicit or inherited mergeinfo on TARGET_PATH_OR_URL,
+     and possibly its explicit subtree mergeinfo, into their
+     inheritable and non-inheritable parts. */
+  master_noninheritable_rangelist = apr_array_make(scratch_pool, 64,
+                                                   sizeof(svn_merge_range_t *));
   master_inheritable_rangelist = apr_array_make(scratch_pool, 64,
                                                 sizeof(svn_merge_range_t *));
   inheritable_subtree_merges = apr_hash_make(scratch_pool);
 
   iterpool = svn_pool_create(scratch_pool);
 
-  for (hi_catalog = apr_hash_first(scratch_pool,
-                                   target_mergeinfo_cat);
+  for (hi_catalog = apr_hash_first(scratch_pool, target_mergeinfo_cat);
        hi_catalog;
        hi_catalog = apr_hash_next(hi_catalog))
     {
-      svn_mergeinfo_t subtree_mergeinfo =
-        svn__apr_hash_index_val(hi_catalog);
+      svn_mergeinfo_t subtree_mergeinfo = svn__apr_hash_index_val(hi_catalog);
       svn_mergeinfo_t subtree_history;
       svn_mergeinfo_t subtree_source_history;
       svn_mergeinfo_t subtree_inheritable_mergeinfo;
@@ -1776,9 +1807,9 @@ svn_client_mergeinfo_log(svn_boolean_t f
 
       if (is_subtree)
         {
-          /* If SUBTREE_PATH is a proper subtree of TARGET_PATH_OR_URL then make
-             a copy of SOURCE_HISTORY that is path adjusted for the
-             subtree.  */
+          /* If SUBTREE_PATH is a proper subtree of TARGET_PATH_OR_URL
+             then make a copy of SOURCE_HISTORY that is path adjusted
+             for the subtree.  */
           const char *subtree_rel_path =
             subtree_path + strlen(target_repos_rel) + 1;
 
@@ -1936,8 +1967,8 @@ svn_client_mergeinfo_log(svn_boolean_t f
                                         source_history,
                                         scratch_pool, scratch_pool));
 
-      /* From what might be eligible subtract what we know is partially merged
-         and then merge that back. */
+      /* From what might be eligible subtract what we know is
+         partially merged and then merge that back. */
       SVN_ERR(svn_rangelist_remove(&source_master_rangelist,
                                    master_noninheritable_rangelist,
                                    source_master_rangelist,
@@ -2064,9 +2095,9 @@ svn_client_suggest_merge_sources(apr_arr
       mergeinfo = NULL;
     }
 
-  SVN_ERR(svn_client__get_copy_source(path_or_url, peg_revision,
-                                      &copyfrom_path, &copyfrom_rev,
-                                      ctx, pool));
+  SVN_ERR(svn_client__get_copy_source(&copyfrom_path, &copyfrom_rev,
+                                      path_or_url, peg_revision, ctx,
+                                      pool, pool));
   if (copyfrom_path)
     {
       APR_ARRAY_PUSH(list, const char *) =

Modified: subversion/branches/ev2-export/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/patch.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/patch.c Wed Jul 11 10:26:19 2012
@@ -1020,6 +1020,7 @@ readline(target_content_t *content,
 {
   svn_stringbuf_t *line_raw;
   const char *eol_str;
+  svn_linenum_t max_line = (svn_linenum_t)content->lines->nelts + 1;
 
   if (content->eof || content->readline == NULL)
     {
@@ -1027,8 +1028,8 @@ readline(target_content_t *content,
       return SVN_NO_ERROR;
     }
 
-  SVN_ERR_ASSERT(content->current_line <= content->lines->nelts + 1);
-  if (content->current_line == content->lines->nelts + 1)
+  SVN_ERR_ASSERT(content->current_line <= max_line);
+  if (content->current_line == max_line)
     {
       apr_off_t offset;
 
@@ -1073,7 +1074,7 @@ seek_to_line(target_content_t *content, 
   saved_line = content->current_line;
   saved_eof = content->eof;
 
-  if (line <= content->lines->nelts)
+  if (line <= (svn_linenum_t)content->lines->nelts)
     {
       apr_off_t offset;
 

Modified: subversion/branches/ev2-export/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/ra.c?rev=1360103&r1=1360102&r2=1360103&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/ev2-export/subversion/libsvn_client/ra.c Wed Jul 11 10:26:19 2012
@@ -245,7 +245,7 @@ invalidate_wc_props(void *baton,
 static svn_error_t *
 get_wc_contents(void *baton,
                 svn_stream_t **contents,
-                const svn_checksum_t *sha1_checksum,
+                const svn_checksum_t *checksum,
                 apr_pool_t *pool)
 {
   callback_baton_t *cb = baton;
@@ -260,7 +260,7 @@ get_wc_contents(void *baton,
              svn_wc__get_pristine_contents_by_checksum(contents,
                                                        cb->ctx->wc_ctx,
                                                        cb->base_dir_abspath,
-                                                       sha1_checksum,
+                                                       checksum,
                                                        pool, pool));
 }
 
@@ -297,7 +297,7 @@ svn_client__open_ra_session_internal(svn
                                      svn_client_ctx_t *ctx,
                                      apr_pool_t *pool)
 {
-  svn_ra_callbacks2_t *cbtable = apr_pcalloc(pool, sizeof(*cbtable));
+  svn_ra_callbacks2_t *cbtable;
   callback_baton_t *cb = apr_pcalloc(pool, sizeof(*cb));
   const char *uuid = NULL;
 
@@ -305,6 +305,7 @@ svn_client__open_ra_session_internal(svn
   SVN_ERR_ASSERT(base_dir_abspath == NULL
                         || svn_dirent_is_absolute(base_dir_abspath));
 
+  SVN_ERR(svn_ra_create_callbacks(&cbtable, pool));
   cbtable->open_tmp_file = open_tmp_file;
   cbtable->get_wc_prop = use_admin ? get_wc_prop : NULL;
   cbtable->set_wc_prop = read_only_wc ? NULL : set_wc_prop;