subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1188113 [1/4] - in /subversion/branches/showing-merge-info: ./ build/ac-macros/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_fs/ subversion/libsvn_repos/ subversion...
Date Mon, 24 Oct 2011 12:21:44 GMT
Author: julianfoad
Date: Mon Oct 24 12:21:42 2011
New Revision: 1188113

URL: http://svn.apache.org/viewvc?rev=1188113&view=rev
Log:
On the 'showing-merge-info' branch: Catch up to trunk@1188105.

Added:
    subversion/branches/showing-merge-info/subversion/tests/cmdline/upgrade_tests_data/upgrade_missing_replaced.tar.bz2
      - copied unchanged from r1188105, subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/upgrade_missing_replaced.tar.bz2
    subversion/branches/showing-merge-info/subversion/tests/cmdline/upgrade_tests_data/upgrade_not_present_replaced.tar.bz2
      - copied unchanged from r1188105, subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/upgrade_not_present_replaced.tar.bz2
Removed:
    subversion/branches/showing-merge-info/tools/client-side/svnmucc/svnmucc-test.py
Modified:
    subversion/branches/showing-merge-info/   (props changed)
    subversion/branches/showing-merge-info/CHANGES
    subversion/branches/showing-merge-info/build/ac-macros/berkeley-db.m4
    subversion/branches/showing-merge-info/subversion/include/private/svn_mergeinfo_private.h
    subversion/branches/showing-merge-info/subversion/include/svn_client.h
    subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h
    subversion/branches/showing-merge-info/subversion/include/svn_repos.h
    subversion/branches/showing-merge-info/subversion/libsvn_client/client.h
    subversion/branches/showing-merge-info/subversion/libsvn_client/cmdline.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/deprecated.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.h
    subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/relocate.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/url.c
    subversion/branches/showing-merge-info/subversion/libsvn_client/util.c
    subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c
    subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.c
    subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.h
    subversion/branches/showing-merge-info/subversion/libsvn_repos/deprecated.c
    subversion/branches/showing-merge-info/subversion/libsvn_repos/load-fs-vtable.c
    subversion/branches/showing-merge-info/subversion/libsvn_repos/log.c
    subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c
    subversion/branches/showing-merge-info/subversion/libsvn_subr/sorts.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/props.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/update_editor.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.c
    subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.c
    subversion/branches/showing-merge-info/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/showing-merge-info/subversion/po/fr.po
    subversion/branches/showing-merge-info/subversion/svn/changelist-cmd.c
    subversion/branches/showing-merge-info/subversion/svnadmin/main.c
    subversion/branches/showing-merge-info/subversion/tests/cmdline/authz_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/special_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/svnmucc_tests.py
    subversion/branches/showing-merge-info/subversion/tests/cmdline/upgrade_tests.py
    subversion/branches/showing-merge-info/subversion/tests/libsvn_delta/editor-test.c
    subversion/branches/showing-merge-info/subversion/tests/libsvn_subr/mergeinfo-test.c
    subversion/branches/showing-merge-info/subversion/tests/libsvn_wc/op-depth-test.c

Propchange: subversion/branches/showing-merge-info/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct 24 12:21:42 2011
@@ -56,4 +56,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1177607-1186071
+/subversion/trunk:1177607-1188105

Modified: subversion/branches/showing-merge-info/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/CHANGES?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/CHANGES (original)
+++ subversion/branches/showing-merge-info/CHANGES Mon Oct 24 12:21:42 2011
@@ -3,27 +3,61 @@ Version 1.8.0
 http://svn.apache.org/repos/asf/subversion/tags/1.8.0
 
  User-visible changes:
+  - General:
+    *
+
+  - Major new features:
+    *
+
+  - Minor new features and improvements:
+    * new 'svnadmin load --revision' load filtering support (issue #3734)
+
+  - Client-side bugfixes:
+    *
 
+  - Server-side bugfixes:
+    *
+
+  - Other tool improvements and bugfixes:
+    *
+  
  Developer-visible changes:
+  - General:
+    *
+
   - API changes:
     * fix inconsistent handling of log revs without changed paths (issue #3694)
 
+  - Bindings:
+    *
 
 Version 1.7.1
-(?? Oct 2011, from /branches/1.7.x)
+(24 Oct 2011, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.1
 
   User-visible changes:
    * improve performance of 'svn info' (r1164386)
-   * improve sorting performance (r1167659)
+   * improve hash table sorting performance (r1167659)
    * update bash completion for 1.7 (r1177001)
    * make 'svn ls' continue to work with 1.0-1.3 repos (r1154278, -379, -82)
-   * improve error messages generated by SASL (r1179767)
-   * update INSTALL (r1182115, and others)
+   * improve handling of error messages generated by Cyrus SASL (r1179767)
+   * update INSTALL documentation file (r1182115, and others)
    * error instead of assert when upgrading corrupt WCs (r1182904, -9)
    * improve memory usage in merge (r1176915)
-   * fix an assertion in merge (r1149103, -35)
-   * improve performance of 'merge --reintegrate' (r1167681)
+   * fix an invalid assertion in merge (r1149103, -35)
+   * improve performance of 'merge --reintegrate' in edge-case (r1167681)
+   * fixed: 'svn mergeinfo' shows wrong revisions for added nodes (issue #3791)
+   * make 'svn add --parents D/file' work if D is deleted (r1185222)
+   * improve performance of trivial text file merges (issue #4009)
+   * add FSFS sanity check to prevent corruption seen in the wild (r1178280)
+   * improve correctness/performance of recursive info and proplist (r1164426)
+   * fix memory leak in 'merge --reintegrate' (r1180154)
+   * fix handling of directories after 'update --set-depth=empty' (r1185911)
+   * fix 'checksum != NULL' assertions in some upgraded WCs (r1177732)
+   * fix upgrading of WCs containing authz-restricted dirs (r1185738)
+   * make the server tolerate svn:mergeinfo with malformed paths (r1182771)
+   * fix some erroneous warning messages from the svn client (r1185746)
+   * fix WC upgrade with replaced nodes in edge-case (issue #4033)
 
   Developer-visible changes:
    * fix object lifetime issues in the JavaHL bindings (r1175888)
@@ -35,6 +69,7 @@ http://svn.apache.org/repos/asf/subversi
    * fix potential segfault seen by TSVN (r1183263)
    * fix backward compat crashes in JavaHL (r1183054, -347)
    * fill in repos_* fields of svn_wc_status3_t for repos-only nodes (r1181609)
+   * disable the SQLite shared process cache (r1185242, r1185280)
 
 
 Version 1.7.0

Modified: subversion/branches/showing-merge-info/build/ac-macros/berkeley-db.m4
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/build/ac-macros/berkeley-db.m4?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/build/ac-macros/berkeley-db.m4 (original)
+++ subversion/branches/showing-merge-info/build/ac-macros/berkeley-db.m4 Mon Oct 24 12:21:42 2011
@@ -65,11 +65,11 @@ AC_DEFUN(SVN_LIB_BERKELEY_DB,
 
       if test "$withval" = "yes"; then
         if test "$apu_db_version" -lt "4"; then
-          AC_MSG_ERROR([APR-UTIL wasn't linked against Berkeley DB 4,
-                        while the fs component is required.  Reinstall
-                        APR-UTIL with the appropiate options.])
+          AC_MSG_ERROR([APR-UTIL was linked against Berkeley DB version $apu_db_version,
+                        while version 4 or higher is required.  Reinstall
+                        APR-UTIL with the appropriate options.])
         fi
-        
+
         bdb_status=required
 
       elif test "$apu_found" != "reconfig"; then

Modified: subversion/branches/showing-merge-info/subversion/include/private/svn_mergeinfo_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/private/svn_mergeinfo_private.h?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/private/svn_mergeinfo_private.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/private/svn_mergeinfo_private.h Mon Oct 24 12:21:42 2011
@@ -44,6 +44,18 @@ void
 svn_rangelist__set_inheritance(apr_array_header_t *rangelist,
                                svn_boolean_t inheritable);
 
+/* Parse a rangelist from the string STR. Set *RANGELIST to the result,
+ * allocated in RESULT_POOL. Return an error if the rangelist is not
+ * well-formed (for example, if it contains invalid characters or if
+ * R1 >= R2 in a "R1-R2" range element).
+ *
+ * Unlike svn_mergeinfo_parse(), this does not sort the ranges into order
+ * or combine adjacent and overlapping ranges. */
+svn_error_t *
+svn_rangelist__parse(apr_array_header_t **rangelist,
+                     const char *str,
+                     apr_pool_t *result_pool);
+
 /* Set inheritability of all rangelists in MERGEINFO to INHERITABLE.
    If MERGEINFO is NULL do nothing.  If a rangelist in MERGEINFO is
    NULL leave it alone. */
@@ -254,8 +266,8 @@ svn_mergeinfo__mergeinfo_from_segments(s
 
 /* Merge every rangelist in MERGEINFO into the given MERGED_RANGELIST,
  * ignoring the source paths of MERGEINFO. MERGED_RANGELIST may
- * initially be empty. New elements added to @a rangelist are allocated in
- * @a result_pool. See svn_rangelist_merge2() for details of inheritability
+ * initially be empty. New elements added to RANGELIST are allocated in
+ * RESULT_POOL. See svn_rangelist_merge2() for details of inheritability
  * etc. */
 svn_error_t *
 svn_rangelist__merge_many(apr_array_header_t *merged_rangelist,

Modified: subversion/branches/showing-merge-info/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_client.h?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_client.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_client.h Mon Oct 24 12:21:42 2011
@@ -5987,37 +5987,65 @@ svn_client_url_from_path(const char **ur
                          const char *path_or_url,
                          apr_pool_t *pool);
 
-
 /* */
 svn_error_t *
 svn_client_resolve_repo_location(svn_client_target_t *target,
                                  svn_client_ctx_t *ctx,
                                  apr_pool_t *pool);
 
+                                 
+
+/* Fetching a repository's root URL and UUID. */
+
+/** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of
+ * the repository in which @a abspath_or_url is versioned. Use the
+ * authentication baton and working copy context cached in @a ctx as
+ * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not
+ * wanted.
+ *
+ * This function will open a temporary RA session to the repository if
+ * necessary to get the information.
+ *
+ * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool.
+ * Use @a scratch_pool for temporary allocations.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_client_get_repos_root(const char **repos_root_url,
+                          const char **repos_uuid,
+                          const char *abspath_or_url,
+                          svn_client_ctx_t *ctx,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool);
+
 /** Set @a *url to the repository root URL of the repository in which
  * @a path_or_url is versioned (or scheduled to be versioned),
  * allocated in @a pool.  @a ctx is required for possible repository
  * authentication.
  *
  * @since New in 1.5.
+ * @deprecated Provided for backward compatibility with the 1.7 API. Use
+ * svn_client_get_repos_root() instead, with an absolute path.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_root_url_from_path(const char **url,
                               const char *path_or_url,
                               svn_client_ctx_t *ctx,
                               apr_pool_t *pool);
 
-
-
-/* Fetching repository UUIDs. */
-
 /** Get repository @a uuid for @a url.
  *
  * Use a @a pool to open a temporary RA session to @a url, discover the
  * repository uuid, and free the session.  Return the uuid in @a uuid,
  * allocated in @a pool.  @a ctx is required for possible repository
  * authentication.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API. Use
+ * svn_client_get_repos_root() instead.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_uuid_from_url(const char **uuid,
                          const char *url,
@@ -6032,7 +6060,10 @@ svn_client_uuid_from_url(const char **uu
  * Use @a scratch_pool for temporary allocations.
  *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API. Use
+ * svn_client_get_repos_root() instead.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_uuid_from_path2(const char **uuid,
                            const char *local_abspath,

Modified: subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_mergeinfo.h Mon Oct 24 12:21:42 2011
@@ -569,8 +569,9 @@ typedef enum svn_mergeinfo_inheritance_t
       ancestor. */
   svn_mergeinfo_inherited,
 
-  /** Mergeinfo on target's nearest (path-wise, not history-wise)
-      ancestor, regardless of whether target has explicit mergeinfo. */
+  /** Mergeinfo inherited from a target's nearest (path-wise, not
+      history-wise) ancestor, regardless of whether target has explicit
+      mergeinfo. */
   svn_mergeinfo_nearest_ancestor
 } svn_mergeinfo_inheritance_t;
 

Modified: subversion/branches/showing-merge-info/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/include/svn_repos.h?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/include/svn_repos.h (original)
+++ subversion/branches/showing-merge-info/subversion/include/svn_repos.h Mon Oct 24 12:21:42 2011
@@ -242,7 +242,10 @@ typedef enum svn_repos_notify_action_t
   svn_repos_notify_recover_start,
 
   /** Upgrade has started. */
-  svn_repos_notify_upgrade_start
+  svn_repos_notify_upgrade_start,
+
+  /** A revision was skipped during loading. @since New in 1.8. */
+  svn_repos_notify_load_skipped_rev
 
 } svn_repos_notify_action_t;
 
@@ -2547,6 +2550,13 @@ svn_repos_dump_fs(svn_repos_t *repos,
  * If the dumpstream contains no UUID, then @a uuid_action is
  * ignored and the repository UUID is not touched.
  *
+ * @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 parent_dir is not NULL, then the parser will reparent all the
  * loaded nodes, from root to @a parent_dir.  The directory @a parent_dir
  * must be an existing directory in the repository.
@@ -2568,8 +2578,38 @@ svn_repos_dump_fs(svn_repos_t *repos,
  * @a cancel_baton as argument to see if the client wishes to cancel
  * the load.
  *
+ * @note If @a start_rev and @a end_rev are valid revisions, this
+ * function presumes the revisions as numbered in @a dumpstream only
+ * increase from the beginning of the stream to the end.  Gaps in the
+ * number sequence are ignored, but upon finding a revision number
+ * younger than the specified range, this function may stop loading
+ * new revisions regardless of their number.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_repos_load_fs4(svn_repos_t *repos,
+                   svn_stream_t *dumpstream,
+                   svn_revnum_t start_rev,
+                   svn_revnum_t end_rev,
+                   enum svn_repos_load_uuid uuid_action,
+                   const char *parent_dir,
+                   svn_boolean_t use_pre_commit_hook,
+                   svn_boolean_t use_post_commit_hook,
+                   svn_boolean_t validate_props,
+                   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_load_fs4(), but with @a start_rev and @a
+ * end_rev always passed as #SVN_INVALID_REVNUM.
+ *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_repos_load_fs3(svn_repos_t *repos,
                    svn_stream_t *dumpstream,
@@ -2758,6 +2798,13 @@ svn_repos_parse_dumpstream2(svn_stream_t
  * UUID records in a manner consistent with @a uuid_action.  Use @a pool
  * to operate on the fs.
  *
+ * @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 use_history is set, then the parser will require relative
  * 'copyfrom' history to exist in the repository when it encounters
  * nodes that are added-with-history.
@@ -2770,10 +2817,37 @@ svn_repos_parse_dumpstream2(svn_stream_t
  * loaded nodes, from root to @a parent_dir.  The directory @a parent_dir
  * must be an existing directory in the repository.
  *
- * Print all parsing feedback to @a outstream (if non-@c NULL).
+ * @note If @a start_rev and @a end_rev are valid revisions, this
+ * function presumes the revisions as numbered in @a dumpstream only
+ * increase from the beginning of the stream to the end.  Gaps in the
+ * number sequence are ignored, but upon finding a revision number
+ * younger than the specified range, this function may stop loading
+ * new revisions regardless of their number.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_repos_get_fs_build_parser4(const svn_repos_parse_fns2_t **parser,
+                               void **parse_baton,
+                               svn_repos_t *repos,
+                               svn_revnum_t start_rev,
+                               svn_revnum_t end_rev,
+                               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_parser4(), but with @a start_rev
+ * and @a end_rev always passed as #SVN_INVALID_REVNUM.
  *
+ * @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,

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/client.h?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/client.h (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/client.h Mon Oct 24 12:21:42 2011
@@ -259,21 +259,6 @@ svn_client__ensure_ra_session_url(const 
                                   const char *session_url,
                                   apr_pool_t *pool);
 
-/* Set *REPOS_ROOT and *REPOS_UUID, to the URL and UUID that represent
-   the root of the repository in with ABSPATH_OR_URL is versioned.
-   Use the authentication baton and working copy context cached in CTX as
-   necessary.  REPOS_ROOT and/or REPOS_UUID may be NULL if not wanted.
-
-   Allocate *REPOS_ROOT and *REPOS_UUID in RESULT_POOL.
-   Use SCRATCH_POOL for temporary allocations. */
-svn_error_t *
-svn_client__get_repos_root(const char **repos_root,
-                           const char **repos_uuid,
-                           const char *abspath_or_url,
-                           svn_client_ctx_t *ctx,
-                           apr_pool_t *result_pool,
-                           apr_pool_t *scratch_pool);
-
 /* Return the path of ABSPATH_OR_URL relative to the repository root
    (REPOS_ROOT) in REL_PATH (URI-decoded), both allocated in RESULT_POOL.
    If INCLUDE_LEADING_SLASH is set, the returned result will have a leading

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/cmdline.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/cmdline.c Mon Oct 24 12:21:42 2011
@@ -114,8 +114,8 @@ check_root_url_of_target(const char **ro
   if (!svn_path_is_url(truepath))
     SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, pool));
 
-  err = svn_client__get_repos_root(&tmp_root_url, NULL, truepath,
-                                   ctx, pool, pool);
+  err = svn_client_get_repos_root(&tmp_root_url, NULL, truepath,
+                                  ctx, pool, pool);
 
   if (err)
     {
@@ -347,7 +347,11 @@ svn_client_args_to_target_array2(apr_arr
        */
       if (root_url == NULL)
         {
-          err = svn_client_root_url_from_path(&root_url, "", ctx, pool);
+          const char *current_abspath;
+
+          SVN_ERR(svn_dirent_get_absolute(&current_abspath, "", pool));
+          err = svn_client_get_repos_root(&root_url, NULL /* uuid */,
+                                          current_abspath, ctx, pool, pool);
           if (err || root_url == NULL)
             return svn_error_create(SVN_ERR_WC_NOT_WORKING_COPY, err,
                                     _("Resolving '^/': no repository root "

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/copy.c Mon Oct 24 12:21:42 2011
@@ -121,7 +121,7 @@ calculate_target_mergeinfo(svn_ra_sessio
       const char *old_session_url = NULL;
       SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url,
                                                 ra_session, src_url, pool));
-      SVN_ERR(svn_client__get_repos_mergeinfo(ra_session, &src_mergeinfo,
+      SVN_ERR(svn_client__get_repos_mergeinfo(&src_mergeinfo, ra_session,
                                               "", src_revnum,
                                               svn_mergeinfo_inherited,
                                               TRUE, pool));
@@ -1746,8 +1746,9 @@ repos_to_wc_copy_locked(const apr_array_
       parent = top_dst_path;
 
     SVN_ERR(svn_dirent_get_absolute(&parent_abspath, parent, scratch_pool));
-    dst_err = svn_client_uuid_from_path2(&dst_uuid, parent_abspath, ctx,
-                                         scratch_pool, scratch_pool);
+    dst_err = svn_client_get_repos_root(NULL /* root_url */, &dst_uuid,
+                                        parent_abspath, ctx,
+                                        scratch_pool, scratch_pool);
     if (dst_err && dst_err->apr_err != SVN_ERR_RA_NO_REPOS_UUID)
       return dst_err;
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/deprecated.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/deprecated.c Mon Oct 24 12:21:42 2011
@@ -39,6 +39,7 @@
 #include "svn_props.h"
 #include "svn_utf.h"
 #include "svn_string.h"
+#include "svn_pools.h"
 
 #include "client.h"
 #include "mergeinfo.h"
@@ -2464,6 +2465,41 @@ svn_client_revert(const apr_array_header
 
 /*** From ra.c ***/
 svn_error_t *
+svn_client_uuid_from_url(const char **uuid,
+                         const char *url,
+                         svn_client_ctx_t *ctx,
+                         apr_pool_t *pool)
+{
+  svn_ra_session_t *ra_session;
+  apr_pool_t *subpool = svn_pool_create(pool);
+
+  /* use subpool to create a temporary RA session */
+  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, url,
+                                               NULL, /* no base dir */
+                                               NULL, FALSE, TRUE,
+                                               ctx, subpool));
+
+  SVN_ERR(svn_ra_get_uuid2(ra_session, uuid, pool));
+
+  /* destroy the RA session */
+  svn_pool_destroy(subpool);
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_client_uuid_from_path2(const char **uuid,
+                           const char *local_abspath,
+                           svn_client_ctx_t *ctx,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
+{
+  return svn_error_trace(
+    svn_wc__node_get_repos_info(NULL, uuid, ctx->wc_ctx, local_abspath,
+                                result_pool, scratch_pool));
+}
+
+svn_error_t *
 svn_client_uuid_from_path(const char **uuid,
                           const char *path,
                           svn_wc_adm_access_t *adm_access,
@@ -2479,6 +2515,20 @@ svn_client_uuid_from_path(const char **u
 
 /*** From url.c ***/
 svn_error_t *
+svn_client_root_url_from_path(const char **url,
+                              const char *path_or_url,
+                              svn_client_ctx_t *ctx,
+                              apr_pool_t *pool)
+{
+  if (!svn_path_is_url(path_or_url))
+    SVN_ERR(svn_dirent_get_absolute(&path_or_url, path_or_url, pool));
+
+  return svn_error_trace(
+           svn_client_get_repos_root(url, NULL, path_or_url,
+                                     ctx, pool, pool));
+}
+
+svn_error_t *
 svn_client_url_from_path(const char **url,
                          const char *path_or_url,
                          apr_pool_t *pool)

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c Mon Oct 24 12:21:42 2011
@@ -9116,8 +9116,9 @@ merge_cousins_and_supplement_mergeinfo(c
 
       SVN_ERR(svn_ra_get_uuid2(URL1_ra_session, &source_repos_uuid,
                                subpool));
-      SVN_ERR(svn_client_uuid_from_path2(&wc_repos_uuid, target_abspath,
-                                         ctx, subpool, subpool));
+      SVN_ERR(svn_client_get_repos_root(NULL /* root_url */, &wc_repos_uuid,
+                                        target_abspath,
+                                        ctx, subpool, subpool));
       same_repos = (strcmp(wc_repos_uuid, source_repos_uuid) == 0);
     }
   else
@@ -9444,9 +9445,9 @@ merge_locked(const char *source1,
                                              scratch_pool));
 
   /* Determine the working copy target's repository root URL. */
-  SVN_ERR(svn_client__get_repos_root(&wc_repos_root, &wc_repos_uuid,
-                                     target_abspath,
-                                     ctx, scratch_pool, scratch_pool));
+  SVN_ERR(svn_client_get_repos_root(&wc_repos_root, &wc_repos_uuid,
+                                    target_abspath,
+                                    ctx, scratch_pool, scratch_pool));
 
   /* Open some RA sessions to our merge source sides. */
   sesspool = svn_pool_create(scratch_pool);
@@ -10653,12 +10654,12 @@ merge_reintegrate_locked(const char *sou
                              svn_dirent_local_style(source, scratch_pool));
 
   /* Determine the working copy target's repository root URL. */
-  SVN_ERR(svn_client__get_repos_root(&wc_repos_root, NULL, target_abspath,
-                                     ctx, scratch_pool, scratch_pool));
+  SVN_ERR(svn_client_get_repos_root(&wc_repos_root, NULL, target_abspath,
+                                    ctx, scratch_pool, scratch_pool));
 
   /* Determine the source's repository root URL. */
-  SVN_ERR(svn_client__get_repos_root(&source_repos_root, NULL, url2,
-                                     ctx, scratch_pool, scratch_pool));
+  SVN_ERR(svn_client_get_repos_root(&source_repos_root, NULL, url2,
+                                    ctx, scratch_pool, scratch_pool));
 
   /* source_repos_root and wc_repos_root are required to be the same,
      as mergeinfo doesn't come into play for cross-repository merging. */
@@ -10935,9 +10936,9 @@ merge_peg_locked(const char *source,
                                              scratch_pool));
 
   /* Determine the working copy target's repository root URL. */
-  SVN_ERR(svn_client__get_repos_root(&wc_repos_root, &wc_repos_uuid,
-                                     target_abspath,
-                                     ctx, scratch_pool, scratch_pool));
+  SVN_ERR(svn_client_get_repos_root(&wc_repos_root, &wc_repos_uuid,
+                                    target_abspath,
+                                    ctx, scratch_pool, scratch_pool));
 
   /* Open an RA session to our source URL, and determine its root URL. */
   sesspool = svn_pool_create(scratch_pool);

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.c Mon Oct 24 12:21:42 2011
@@ -432,8 +432,8 @@ svn_client__get_wc_mergeinfo_catalog(svn
 }
 
 svn_error_t *
-svn_client__get_repos_mergeinfo(svn_ra_session_t *ra_session,
-                                svn_mergeinfo_t *target_mergeinfo,
+svn_client__get_repos_mergeinfo(svn_mergeinfo_t *target_mergeinfo,
+                                svn_ra_session_t *ra_session,
                                 const char *rel_path,
                                 svn_revnum_t rev,
                                 svn_mergeinfo_inheritance_t inherit,
@@ -490,6 +490,7 @@ svn_client__get_repos_mergeinfo_catalog(
         {
           svn_error_clear(err);
           *mergeinfo_cat = NULL;
+          return SVN_NO_ERROR;
         }
       else
         return svn_error_trace(err);
@@ -501,38 +502,21 @@ svn_client__get_repos_mergeinfo_catalog(
     }
   else
     {
-      const char *repos_root;
+      const char *session_relpath;
       const char *session_url;
 
-      SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, scratch_pool));
       SVN_ERR(svn_ra_get_session_url(ra_session, &session_url, scratch_pool));
+      SVN_ERR(svn_ra_get_path_relative_to_root(ra_session, &session_relpath,
+                                               session_url, scratch_pool));
 
-      if (strcmp(repos_root, session_url) == 0)
-        {
-          *mergeinfo_cat = repos_mergeinfo_cat;
-        }
+      if (session_relpath[0] == '\0')
+        *mergeinfo_cat = repos_mergeinfo_cat;
       else
-        {
-          apr_hash_index_t *hi;
-          svn_mergeinfo_catalog_t rekeyed_mergeinfo_cat =
-            apr_hash_make(result_pool);
-
-          for (hi = apr_hash_first(scratch_pool, repos_mergeinfo_cat);
-               hi;
-               hi = apr_hash_next(hi))
-            {
-              const char *path =
-                svn_path_url_add_component2(session_url,
-                                            svn__apr_hash_index_key(hi),
-                                            scratch_pool);
-              SVN_ERR(svn_ra_get_path_relative_to_root(ra_session, &path,
-                                                       path,
-                                                       result_pool));
-              apr_hash_set(rekeyed_mergeinfo_cat, path, APR_HASH_KEY_STRING,
-                           svn__apr_hash_index_val(hi));
-            }
-          *mergeinfo_cat = rekeyed_mergeinfo_cat;
-        }
+        SVN_ERR(svn_mergeinfo__add_prefix_to_catalog(mergeinfo_cat,
+                                                     repos_mergeinfo_cat,
+                                                     session_relpath,
+                                                     result_pool,
+                                                     scratch_pool));
     }
   return SVN_NO_ERROR;
 }
@@ -1601,25 +1585,9 @@ logs_for_mergeinfo_rangelist(const char 
 
   /* FILTER_LOG_ENTRY_BATON_T->TARGET_MERGEINFO_CATALOG's keys are required
      to be repository-absolute. */
-  if (apr_hash_count(target_mergeinfo_catalog))
-    {
-      apr_hash_index_t *hi;
-      svn_mergeinfo_catalog_t rekeyed_catalog = apr_hash_make(scratch_pool);
-
-      for (hi = apr_hash_first(scratch_pool, target_mergeinfo_catalog);
-           hi;
-           hi = apr_hash_next(hi))
-        {
-          const char *path = svn__apr_hash_index_key(hi);
-
-          if (!svn_dirent_is_absolute(path))
-            apr_hash_set(rekeyed_catalog,
-                         svn_dirent_join("/", path, scratch_pool),
-                         APR_HASH_KEY_STRING,
-                         svn__apr_hash_index_val(hi));
-        }
-      target_mergeinfo_catalog = rekeyed_catalog;
-    }
+  SVN_ERR(svn_mergeinfo__add_prefix_to_catalog(&target_mergeinfo_catalog,
+                                               target_mergeinfo_catalog, "/",
+                                               scratch_pool, scratch_pool));
 
   /* Build the log filtering callback baton. */
   fleb.filtering_merged = filtering_merged;

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.h?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.h (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/mergeinfo.h Mon Oct 24 12:21:42 2011
@@ -168,8 +168,8 @@ svn_client__get_wc_mergeinfo_catalog(svn
    doesn't support a mergeinfo capability and SQUELCH_INCAPABLE is
    TRUE, set *TARGET_MERGEINFO to NULL. */
 svn_error_t *
-svn_client__get_repos_mergeinfo(svn_ra_session_t *ra_session,
-                                svn_mergeinfo_t *target_mergeinfo,
+svn_client__get_repos_mergeinfo(svn_mergeinfo_t *target_mergeinfo,
+                                svn_ra_session_t *ra_session,
                                 const char *rel_path,
                                 svn_revnum_t rev,
                                 svn_mergeinfo_inheritance_t inherit,
@@ -287,7 +287,7 @@ svn_client__get_history_as_mergeinfo(svn
                                      apr_pool_t *pool);
 
 /* Parse any explicit mergeinfo on LOCAL_ABSPATH and store it in
-   MERGEINFO.  If no record of any mergeinfo exists, set MERGEINFO to NULL.
+   *MERGEINFO.  If no record of any mergeinfo exists, set *MERGEINFO to NULL.
    Does not acount for inherited mergeinfo. */
 svn_error_t *
 svn_client__parse_mergeinfo(svn_mergeinfo_t *mergeinfo,

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/ra.c Mon Oct 24 12:21:42 2011
@@ -385,43 +385,6 @@ svn_client_open_ra_session(svn_ra_sessio
 }
 
 
-svn_error_t *
-svn_client_uuid_from_url(const char **uuid,
-                         const char *url,
-                         svn_client_ctx_t *ctx,
-                         apr_pool_t *pool)
-{
-  svn_ra_session_t *ra_session;
-  apr_pool_t *subpool = svn_pool_create(pool);
-
-  /* use subpool to create a temporary RA session */
-  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, url,
-                                               NULL, /* no base dir */
-                                               NULL, FALSE, TRUE,
-                                               ctx, subpool));
-
-  SVN_ERR(svn_ra_get_uuid2(ra_session, uuid, pool));
-
-  /* destroy the RA session */
-  svn_pool_destroy(subpool);
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_client_uuid_from_path2(const char **uuid,
-                           const char *local_abspath,
-                           svn_client_ctx_t *ctx,
-                           apr_pool_t *result_pool,
-                           apr_pool_t *scratch_pool)
-{
-  return svn_error_trace(
-    svn_wc__node_get_repos_info(NULL, uuid, ctx->wc_ctx, local_abspath,
-                                result_pool, scratch_pool));
-}
-
-
 
 
 /* Convert a path or URL for display: if it is a local path, convert it to

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/relocate.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/relocate.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/relocate.c Mon Oct 24 12:21:42 2011
@@ -143,13 +143,9 @@ relocate_externals(const char *local_abs
                    svn_client_ctx_t *ctx,
                    apr_pool_t *scratch_pool)
 {
-  const char *url;
   apr_pool_t *iterpool;
   int i;
 
-  SVN_ERR(svn_client_url_from_path2(&url, local_abspath, ctx,
-                                    scratch_pool, scratch_pool));
-
   /* Parse an externals definition into an array of external items. */
 
   iterpool = svn_pool_create(scratch_pool);
@@ -185,8 +181,8 @@ relocate_externals(const char *local_abs
                                                       ext_item->target_dir,
                                                       iterpool),
                                       iterpool));
-      err = svn_client_root_url_from_path(&target_repos_root_url,
-                                          target_abspath, ctx, iterpool);
+      err = svn_client_get_repos_root(&target_repos_root_url, NULL /* uuid */,
+                                      target_abspath, ctx, iterpool, iterpool);
 
       /* Ignore externals that aren't present in the working copy.
        * This can happen if an external is deleted from disk accidentally,
@@ -248,16 +244,16 @@ svn_client_relocate2(const char *wcroot_
     }
 
   /* Fetch our current root URL. */
-  SVN_ERR(svn_client_root_url_from_path(&old_repos_root_url, local_abspath,
-                                        ctx, pool));
+  SVN_ERR(svn_client_get_repos_root(&old_repos_root_url, NULL /* uuid */,
+                                    local_abspath, ctx, pool, pool));
 
   /* Perform the relocation. */
   SVN_ERR(svn_wc_relocate4(ctx->wc_ctx, local_abspath, from_prefix, to_prefix,
                            validator_func, &vb, pool));
 
   /* Now fetch new current root URL. */
-  SVN_ERR(svn_client_root_url_from_path(&new_repos_root_url, local_abspath,
-                                        ctx, pool));
+  SVN_ERR(svn_client_get_repos_root(&new_repos_root_url, NULL /* uuid */,
+                                    local_abspath, ctx, pool, pool));
 
 
   /* Relocate externals, too (if any). */

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/url.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/url.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/url.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/url.c Mon Oct 24 12:21:42 2011
@@ -65,20 +65,6 @@ svn_client_url_from_path2(const char **u
 
 
 svn_error_t *
-svn_client_root_url_from_path(const char **url,
-                              const char *path_or_url,
-                              svn_client_ctx_t *ctx,
-                              apr_pool_t *pool)
-{
-  if (!svn_path_is_url(path_or_url))
-    SVN_ERR(svn_dirent_get_absolute(&path_or_url, path_or_url, pool));
-
-  return svn_error_trace(
-           svn_client__get_repos_root(url, NULL, path_or_url,
-                                      ctx, pool, pool));
-}
-
-svn_error_t *
 svn_client__target(svn_client_target_t **target_p,
                    const char *path_or_url,
                    const svn_opt_revision_t *peg_revision,
@@ -133,9 +119,9 @@ svn_client__resolve_location(const char 
     SVN_ERR(svn_dirent_get_absolute(&abspath_or_url, path_or_url,
                                     scratch_pool));
 
-  SVN_ERR(svn_client__get_repos_root(&repos_root_url, repo_uuid_p,
-                                     abspath_or_url,
-                                     ctx, result_pool, scratch_pool));
+  SVN_ERR(svn_client_get_repos_root(&repos_root_url, repo_uuid_p,
+                                    abspath_or_url,
+                                    ctx, result_pool, scratch_pool));
   if (repo_root_url_p)
     *repo_root_url_p = repos_root_url;
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/util.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/util.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/util.c Mon Oct 24 12:21:42 2011
@@ -144,12 +144,12 @@ svn_client__path_relative_to_root(const 
 }
 
 svn_error_t *
-svn_client__get_repos_root(const char **repos_root,
-                           const char **repos_uuid,
-                           const char *abspath_or_url,
-                           svn_client_ctx_t *ctx,
-                           apr_pool_t *result_pool,
-                           apr_pool_t *scratch_pool)
+svn_client_get_repos_root(const char **repos_root,
+                          const char **repos_uuid,
+                          const char *abspath_or_url,
+                          svn_client_ctx_t *ctx,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool)
 {
   svn_ra_session_t *ra_session;
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_delta/compat.c Mon Oct 24 12:21:42 2011
@@ -170,6 +170,9 @@ process_actions(void *edit_baton,
   apr_hash_t *props = NULL;
   int i;
 
+  if (*path == '/')
+    path++;
+
   /* Go through all of our actions, populating various datastructures
    * dependent on them. */
   for (i = 0; i < actions->nelts; i++)
@@ -212,7 +215,21 @@ process_actions(void *edit_baton,
 
           case ACTION_ADD:
             {
-              /* ### do something  */
+              svn_kind_t *kind = action->args;
+
+              if (*kind == svn_kind_dir)
+                {
+                  apr_array_header_t *children = apr_array_make(
+                                    scratch_pool, 1, sizeof(const char *));
+                  SVN_ERR(svn_editor_add_directory(eb->editor, path, children,
+                                                   NULL, SVN_INVALID_REVNUM));
+                }
+              else
+                {
+                  svn_stream_t *contents = svn_stream_empty(scratch_pool);
+                  SVN_ERR(svn_editor_add_file(eb->editor, path, NULL, contents,
+                                              NULL, SVN_INVALID_REVNUM));
+                }
               break;
             }
 
@@ -236,6 +253,37 @@ process_actions(void *edit_baton,
 }
 
 static svn_error_t *
+run_ev2_actions(void *edit_baton,
+                apr_pool_t *scratch_pool)
+{
+  struct ev2_edit_baton *eb = edit_baton;
+  apr_array_header_t *sorted_hash;
+  apr_pool_t *iterpool;
+  int i;
+
+  /* Sort the paths touched by this edit.
+   * Ev2 doesn't really have any particular need for depth-first-ness, but
+   * we want to ensure all parent directories are handled before children in
+   * the case of adds (which does introduce an element of depth-first-ness). */
+  sorted_hash = svn_sort__hash(eb->paths, svn_sort_compare_items_as_paths,
+                               scratch_pool);
+
+  iterpool = svn_pool_create(scratch_pool);
+  for (i = 0; i < sorted_hash->nelts; i++)
+    {
+      svn_sort__item_t *item = &APR_ARRAY_IDX(sorted_hash, i, svn_sort__item_t);
+      apr_array_header_t *actions = item->value;
+      const char *path = item->key;
+
+      svn_pool_clear(iterpool);
+      SVN_ERR(process_actions(edit_baton, path, actions, iterpool));
+    }
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 ev2_set_target_revision(void *edit_baton,
                         svn_revnum_t target_revision,
                         apr_pool_t *scratch_pool)
@@ -338,8 +386,6 @@ static svn_error_t *
 ev2_close_directory(void *dir_baton,
                     apr_pool_t *scratch_pool)
 {
-  struct ev2_dir_baton *db = dir_baton;
-
   return SVN_NO_ERROR;
 }
 
@@ -429,7 +475,6 @@ ev2_close_file(void *file_baton,
                const char *text_checksum,
                apr_pool_t *scratch_pool)
 {
-  struct ev2_file_baton *fb = file_baton;
   return SVN_NO_ERROR;
 }
 
@@ -447,29 +492,8 @@ ev2_close_edit(void *edit_baton,
                apr_pool_t *scratch_pool)
 {
   struct ev2_edit_baton *eb = edit_baton;
-  apr_array_header_t *sorted_hash;
-  apr_pool_t *iterpool;
-  int i;
-
-  /* Sort the paths touched by this edit.
-   * Ev2 doesn't really have any particular need for depth-first-ness, but
-   * we want to ensure all parent directories are handled before children in
-   * the case of adds (which does introduce an element of depth-first-ness). */
-  sorted_hash = svn_sort__hash(eb->paths, svn_sort_compare_items_as_paths,
-                               scratch_pool);
-
-  iterpool = svn_pool_create(scratch_pool);
-  for (i = 0; i < sorted_hash->nelts; i++)
-    {
-      svn_sort__item_t *item = &APR_ARRAY_IDX(sorted_hash, i, svn_sort__item_t);
-      apr_array_header_t *actions = item->value;
-      const char *path = item->key;
-
-      svn_pool_clear(iterpool);
-      SVN_ERR(process_actions(edit_baton, path, actions, iterpool));
-    }
-  svn_pool_destroy(iterpool);
 
+  SVN_ERR(run_ev2_actions(edit_baton, scratch_pool));
   return svn_error_trace(svn_editor_complete(eb->editor));
 }
 
@@ -479,6 +503,7 @@ ev2_abort_edit(void *edit_baton,
 {
   struct ev2_edit_baton *eb = edit_baton;
 
+  SVN_ERR(run_ev2_actions(edit_baton, scratch_pool));
   return svn_error_trace(svn_editor_abort(eb->editor));
 }
 
@@ -616,6 +641,7 @@ static svn_error_t *
 build(struct editor_baton *eb,
       action_code_t action,
       const char *relpath,
+      svn_kind_t kind,
       const char *url,
       svn_revnum_t rev,
       apr_hash_t *props,
@@ -672,8 +698,11 @@ build(struct editor_baton *eb,
       operation->operation =
         operation->operation == OP_DELETE ? OP_REPLACE : OP_ADD;
 
-      SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
-                                  relpath, scratch_pool));
+      if (kind == svn_kind_none)
+        SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
+                                    relpath, scratch_pool));
+      else
+        operation->kind = kind;
       operation->copyfrom_url = url;
       operation->copyfrom_revision = rev;
     }
@@ -693,11 +722,9 @@ build(struct editor_baton *eb,
         }
       else
         {
-          SVN_ERR(eb->fetch_kind_func(&operation->kind, eb->fetch_kind_baton,
-                                      relpath, scratch_pool));
-          if (operation->kind == svn_kind_file)
+          if (kind == svn_kind_file)
             operation->operation = OP_OPEN;
-          else if (operation->kind == svn_kind_none)
+          else if (kind == svn_kind_none)
             operation->operation = OP_ADD;
           else
             return svn_error_createf(SVN_ERR_BAD_URL, NULL,
@@ -726,7 +753,8 @@ add_directory_cb(void *baton,
 {
   struct editor_baton *eb = baton;
 
-  SVN_ERR(build(eb, ACTION_MKDIR, relpath, NULL, SVN_INVALID_REVNUM,
+  SVN_ERR(build(eb, ACTION_MKDIR, relpath, svn_kind_dir,
+                NULL, SVN_INVALID_REVNUM,
                 NULL, NULL, SVN_INVALID_REVNUM, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -743,9 +771,19 @@ add_file_cb(void *baton,
             apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
+  const char *tmp_filename;
+  svn_stream_t *tmp_stream;
 
-  SVN_ERR(build(eb, ACTION_PUT, relpath, NULL, SVN_INVALID_REVNUM,
-                NULL, NULL, SVN_INVALID_REVNUM, scratch_pool));
+  /* Spool the contents to a tempfile, and provide that to the driver. */
+  SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_filename, NULL,
+                                 svn_io_file_del_on_pool_cleanup,
+                                 eb->edit_pool, scratch_pool));
+  SVN_ERR(svn_stream_copy3(svn_stream_disown(contents, scratch_pool),
+                           tmp_stream, NULL, NULL, scratch_pool));
+
+  SVN_ERR(build(eb, ACTION_PUT, relpath, svn_kind_none,
+                NULL, SVN_INVALID_REVNUM,
+                NULL, tmp_filename, SVN_INVALID_REVNUM, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -784,7 +822,8 @@ set_props_cb(void *baton,
 {
   struct editor_baton *eb = baton;
 
-  SVN_ERR(build(eb, ACTION_PROPSET, relpath, NULL, SVN_INVALID_REVNUM,
+  SVN_ERR(build(eb, ACTION_PROPSET, relpath, svn_kind_none,
+                NULL, SVN_INVALID_REVNUM,
                 props, NULL, SVN_INVALID_REVNUM, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -799,6 +838,21 @@ set_text_cb(void *baton,
             svn_stream_t *contents,
             apr_pool_t *scratch_pool)
 {
+  struct editor_baton *eb = baton;
+  const char *tmp_filename;
+  svn_stream_t *tmp_stream;
+
+  /* Spool the contents to a tempfile, and provide that to the driver. */
+  SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_filename, NULL,
+                                 svn_io_file_del_on_pool_cleanup,
+                                 eb->edit_pool, scratch_pool));
+  SVN_ERR(svn_stream_copy3(svn_stream_disown(contents, scratch_pool),
+                           tmp_stream, NULL, NULL, scratch_pool));
+
+  SVN_ERR(build(eb, ACTION_PUT, relpath, svn_kind_file,
+                NULL, SVN_INVALID_REVNUM,
+                NULL, tmp_filename, SVN_INVALID_REVNUM, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -880,6 +934,22 @@ drive(const struct operation *operation,
                                      &file_baton));
         }
 
+      if (child->src_file && file_baton)
+        {
+          /* We need to change textual contents. */
+          svn_txdelta_window_handler_t handler;
+          void *handler_baton;
+          svn_stream_t *contents;
+
+          SVN_ERR(editor->apply_textdelta(file_baton, NULL, iterpool,
+                                          &handler, &handler_baton));
+          SVN_ERR(svn_stream_open_readonly(&contents, child->src_file,
+                                           iterpool, iterpool));
+          SVN_ERR(svn_txdelta_send_stream(contents, handler, handler_baton,
+                                          NULL, iterpool));
+          SVN_ERR(svn_stream_close(contents));
+        }
+
       /*SVN_DBG(("child: '%s'; operation: %d\n", path, child->operation));*/
       if (child->kind == svn_kind_dir)
         SVN_ERR(drive(child, editor, iterpool));
@@ -894,12 +964,19 @@ complete_cb(void *baton,
             apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
+  svn_error_t *err;
+
+  SVN_ERR(eb->deditor->open_root(eb->dedit_baton, SVN_INVALID_REVNUM,
+                                 eb->edit_pool, &eb->root.baton));
 
   /* Drive the tree we've created. */
-  SVN_ERR(drive(&eb->root, eb->deditor, scratch_pool));
+  err = drive(&eb->root, eb->deditor, scratch_pool);
+  if (!err)
+     err = eb->deditor->close_edit(eb->dedit_baton, scratch_pool);
+  if (err)
+    svn_error_clear(eb->deditor->abort_edit(eb->dedit_baton, scratch_pool));
 
-  return svn_error_trace(eb->deditor->close_edit(eb->dedit_baton,
-                                                 scratch_pool));
+  return svn_error_trace(err);
 }
 
 /* This implements svn_editor_cb_abort_t */
@@ -908,8 +985,28 @@ abort_cb(void *baton,
          apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
-  return svn_error_trace(eb->deditor->abort_edit(eb->dedit_baton,
-                                                 scratch_pool));
+  svn_error_t *err;
+  svn_error_t *err2;
+
+  /* We still need to drive anything we collected in the editor to this
+     point. */
+  SVN_ERR(eb->deditor->open_root(eb->dedit_baton, SVN_INVALID_REVNUM,
+                                 eb->edit_pool, &eb->root.baton));
+
+  /* Drive the tree we've created. */
+  err = drive(&eb->root, eb->deditor, scratch_pool);
+
+  err2 = eb->deditor->abort_edit(eb->dedit_baton, scratch_pool);
+
+  if (err2)
+    {
+      if (err)
+        svn_error_clear(err2);
+      else
+        err = err2;
+    }
+
+  return svn_error_trace(err);
 }
 
 svn_error_t *

Modified: subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/fs_fs.c Mon Oct 24 12:21:42 2011
@@ -2907,7 +2907,7 @@ set_revision_proplist(svn_fs_t *fs,
 {
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
 
-  if (1)
+  /* if (1); null condition for easier merging to revprop-packing */
     {
       const char *final_path = path_revprops(fs, rev, pool);
       const char *tmp_path;
@@ -2945,7 +2945,7 @@ revision_proplist(apr_hash_t **proplist_
 
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
 
-  if (1)
+  /* if (1); null condition for easier merging to revprop-packing */
     {
       apr_file_t *revprop_file = NULL;
       svn_error_t *err = SVN_NO_ERROR;
@@ -5837,17 +5837,50 @@ write_hash_rep(svn_filesize_t *size,
 }
 
 /* Sanity check ROOT_NODEREV, a candidate for being the root node-revision
-   of (not yet committed) revision REV.  Use OCEAN for temporary allocations.
+   of (not yet committed) revision REV in FS.  Use POOL for temporary
+   allocations.
  */
-static APR_INLINE svn_error_t *
-validate_root_noderev(node_revision_t *root_noderev,
-                      svn_revnum_t rev)
+static svn_error_t *
+validate_root_noderev(svn_fs_t *fs,
+                      node_revision_t *root_noderev,
+                      svn_revnum_t rev,
+                      apr_pool_t *pool)
 {
-  /* Bogosity seen on svn.apache.org; see
+  svn_revnum_t head_revnum = rev-1;
+  int head_predecessor_count;
+
+  SVN_ERR_ASSERT(rev > 0);
+
+  /* Compute HEAD_PREDECESSOR_COUNT. */
+  {
+    svn_fs_root_t *head_revision;
+    const svn_fs_id_t *head_root_id;
+    node_revision_t *head_root_noderev;
+
+    /* Get /@HEAD's noderev. */
+    SVN_ERR(svn_fs_fs__revision_root(&head_revision, fs, head_revnum, pool));
+    SVN_ERR(svn_fs_fs__node_id(&head_root_id, head_revision, "/", pool));
+    SVN_ERR(svn_fs_fs__get_node_revision(&head_root_noderev, fs, head_root_id,
+                                         pool));
+
+    head_predecessor_count = head_root_noderev->predecessor_count;
+  }
+
+  /* Check that the root noderev's predecessor count equals REV.
+
+     This kind of corruption was seen on svn.apache.org (both on
+     the root noderev and on other fspaths' noderevs); see
        http://mid.gmane.org/20111002202833.GA12373@daniel3.local
+
+     Normally (rev == root_noderev->predecessor_count), but here we
+     use a more roundabout check that should only trigger on new instances
+     of the corruption, rather then trigger on each and every new commit
+     to a repository that has triggered the bug somewhere in its root
+     noderev's history.
    */
   if (root_noderev->predecessor_count != -1
-      && root_noderev->predecessor_count != rev)
+      && (root_noderev->predecessor_count - head_predecessor_count)
+         != (rev - head_revnum))
     {
       return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                _("predecessor count for "
@@ -6028,7 +6061,7 @@ write_final_rev(const svn_fs_id_t **new_
 
   /* Write out our new node-revision. */
   if (at_root)
-    SVN_ERR(validate_root_noderev(noderev, rev));
+    SVN_ERR(validate_root_noderev(fs, noderev, rev, pool));
   SVN_ERR(svn_fs_fs__write_noderev(svn_stream_from_aprfile2(file, TRUE, pool),
                                    noderev, ffd->format,
                                    svn_fs_fs__fs_supports_mergeinfo(fs),
@@ -6354,7 +6387,7 @@ commit_body(void *baton, apr_pool_t *poo
      fails because the shard already existed for some reason. */
   if (ffd->max_files_per_dir && new_rev % ffd->max_files_per_dir == 0)
     {
-      if (1)
+      /* if (1); null condition for easier merging to revprop-packing */
         {
           const char *new_dir = path_rev_shard(cb->fs, new_rev, pool);
           svn_error_t *err = svn_io_dir_make(new_dir, APR_OS_DEFAULT, pool);
@@ -7010,7 +7043,7 @@ recover_body(void *baton, apr_pool_t *po
                             &youngest_revprops_kind, pool));
   if (youngest_revprops_kind == svn_node_none)
     {
-      if (1)
+      /* if (1); null condition for easier merging to revprop-packing */
         {
           return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                    _("Revision %ld has a revs file but no "

Modified: subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.c Mon Oct 24 12:21:42 2011
@@ -870,11 +870,11 @@ add_change(svn_fs_t *fs,
 
 /* Get the id of a node referenced by path PATH in ROOT.  Return the
    id in *ID_P allocated in POOL. */
-static svn_error_t *
-fs_node_id(const svn_fs_id_t **id_p,
-           svn_fs_root_t *root,
-           const char *path,
-           apr_pool_t *pool)
+svn_error_t *
+svn_fs_fs__node_id(const svn_fs_id_t **id_p,
+                   svn_fs_root_t *root,
+                   const char *path,
+                   apr_pool_t *pool)
 {
   if ((! root->is_txn_root)
       && (path[0] == '\0' || ((path[0] == '/') && (path[1] == '\0'))))
@@ -939,7 +939,7 @@ node_kind(svn_node_kind_t *kind_p,
   dag_node_t *node;
 
   /* Get the node id. */
-  SVN_ERR(fs_node_id(&node_id, root, path, pool));
+  SVN_ERR(svn_fs_fs__node_id(&node_id, root, path, pool));
 
   /* Use the node id to get the real kind. */
   SVN_ERR(svn_fs_fs__dag_get_node(&node, root->fs, node_id, pool));
@@ -2975,7 +2975,7 @@ fs_node_origin_rev(svn_revnum_t *revisio
   path = svn_fs__canonicalize_abspath(path, pool);
 
   /* Check the cache first. */
-  SVN_ERR(fs_node_id(&given_noderev_id, root, path, pool));
+  SVN_ERR(svn_fs_fs__node_id(&given_noderev_id, root, path, pool));
   node_id = svn_fs_fs__id_node_id(given_noderev_id);
 
   /* Is it a brand new uncommitted node? */
@@ -3047,7 +3047,7 @@ fs_node_origin_rev(svn_revnum_t *revisio
       }
 
     /* Walk the predecessor links back to origin. */
-    SVN_ERR(fs_node_id(&pred_id, curroot, lastpath->data, predidpool));
+    SVN_ERR(svn_fs_fs__node_id(&pred_id, curroot, lastpath->data, predidpool));
     do
       {
         svn_pool_clear(subpool);
@@ -3683,7 +3683,7 @@ static root_vtable_t root_vtable = {
   fs_paths_changed,
   svn_fs_fs__check_path,
   fs_node_history,
-  fs_node_id,
+  svn_fs_fs__node_id,
   svn_fs_fs__node_created_rev,
   fs_node_origin_rev,
   fs_node_created_path,

Modified: subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.h?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.h (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_fs_fs/tree.h Mon Oct 24 12:21:42 2011
@@ -61,6 +61,13 @@ svn_fs_fs__check_path(svn_node_kind_t *k
                       const char *path,
                       apr_pool_t *pool);
 
+/* Implement root_vtable_t.node_id(). */
+svn_error_t *
+svn_fs_fs__node_id(const svn_fs_id_t **id_p,
+                   svn_fs_root_t *root,
+                   const char *path,
+                   apr_pool_t *pool);
+
 /* Set *REVISION to the revision in which PATH under ROOT was created.
    Use POOL for any temporary allocations.  If PATH is in an
    uncommitted transaction, *REVISION will be set to

Modified: subversion/branches/showing-merge-info/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_repos/deprecated.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_repos/deprecated.c Mon Oct 24 12:21:42 2011
@@ -715,6 +715,28 @@ svn_repos_verify_fs(svn_repos_t *repos,
 /*** From load.c ***/
 
 svn_error_t *
+svn_repos_load_fs3(svn_repos_t *repos,
+                   svn_stream_t *dumpstream,
+                   enum svn_repos_load_uuid uuid_action,
+                   const char *parent_dir,
+                   svn_boolean_t use_pre_commit_hook,
+                   svn_boolean_t use_post_commit_hook,
+                   svn_boolean_t validate_props,
+                   svn_repos_notify_func_t notify_func,
+                   void *notify_baton,
+                   svn_cancel_func_t cancel_func,
+                   void *cancel_baton,
+                   apr_pool_t *pool)
+{
+  return svn_repos_load_fs4(repos, dumpstream,
+                            SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+                            uuid_action, parent_dir,
+                            use_pre_commit_hook, use_post_commit_hook,
+                            validate_props, notify_func, notify_baton,
+                            cancel_func, cancel_baton, pool);
+}
+
+svn_error_t *
 svn_repos_load_fs2(svn_repos_t *repos,
                    svn_stream_t *dumpstream,
                    svn_stream_t *feedback_stream,
@@ -803,6 +825,25 @@ svn_repos_load_fs(svn_repos_t *repos,
 }
 
 svn_error_t *
+svn_repos_get_fs_build_parser3(const svn_repos_parse_fns2_t **callbacks,
+                               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)
+{
+  return svn_repos_get_fs_build_parser4(callbacks, parse_baton, repos,
+                                        SVN_INVALID_REVNUM, SVN_INVALID_REVNUM,
+                                        use_history, validate_props,
+                                        uuid_action, parent_dir,
+                                        notify_func, notify_baton, pool);
+}
+
+svn_error_t *
 svn_repos_get_fs_build_parser2(const svn_repos_parse_fns2_t **parser,
                                void **parse_baton,
                                svn_repos_t *repos,

Modified: subversion/branches/showing-merge-info/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_repos/load-fs-vtable.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_repos/load-fs-vtable.c Mon Oct 24 12:21:42 2011
@@ -63,6 +63,12 @@ struct parse_baton
   svn_repos_notify_t *notify;
   apr_pool_t *pool;
 
+  /* Start and end (inclusive) of revision range we'll pay attention
+     to, or a pair of SVN_INVALID_REVNUMs if we're not filtering by
+     revisions. */
+  svn_revnum_t start_rev;
+  svn_revnum_t end_rev;
+
   /* A hash mapping copy-from revisions and mergeinfo range revisions
      (svn_revnum_t *) in the dump stream to their corresponding revisions
      (svn_revnum_t *) in the loaded repository.  The hash and its
@@ -84,13 +90,13 @@ struct parse_baton
 struct revision_baton
 {
   svn_revnum_t rev;
-
   svn_fs_txn_t *txn;
   svn_fs_root_t *txn_root;
 
   const svn_string_t *datestamp;
 
   apr_int32_t rev_offset;
+  svn_boolean_t skipped;
 
   struct parse_baton *pb;
   apr_pool_t *pool;
@@ -320,8 +326,8 @@ renumber_mergeinfo_revs(svn_string_t **f
     }
 
   if (predates_stream_mergeinfo)
-      SVN_ERR(svn_mergeinfo_merge(final_mergeinfo, predates_stream_mergeinfo,
-                                  subpool));
+      SVN_ERR(svn_mergeinfo_merge2(final_mergeinfo, predates_stream_mergeinfo,
+                                   subpool, subpool));
 
   SVN_ERR(svn_mergeinfo_sort(final_mergeinfo, subpool));
 
@@ -451,7 +457,14 @@ make_revision_baton(apr_hash_t *headers,
 
   if ((val = apr_hash_get(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER,
                           APR_HASH_KEY_STRING)))
-    rb->rev = SVN_STR_TO_REV(val);
+    {
+      rb->rev = SVN_STR_TO_REV(val);
+
+      /* If we're filtering revisions, is this one we'll skip? */
+      rb->skipped = (SVN_IS_VALID_REVNUM(pb->start_rev)
+                     && ((rb->rev < pb->start_rev) ||
+                         (rb->rev > pb->end_rev)));
+    }
 
   return rb;
 }
@@ -476,7 +489,7 @@ new_revision_record(void **revision_bato
      It might be positive or negative. */
   rb->rev_offset = (apr_int32_t) (rb->rev) - (head_rev + 1);
 
-  if (rb->rev > 0)
+  if ((rb->rev > 0) && (! rb->skipped))
     {
       /* Create a new fs txn. */
       SVN_ERR(svn_fs_begin_txn2(&(rb->txn), pb->fs, head_rev, 0, pool));
@@ -493,6 +506,14 @@ new_revision_record(void **revision_bato
       if (!SVN_IS_VALID_REVNUM(pb->oldest_old_rev))
         pb->oldest_old_rev = rb->rev;
     }
+  
+  /* If we're skipping this revision, try to notify someone. */
+  if (rb->skipped && pb->notify_func)
+    {
+      pb->notify->action = svn_repos_notify_load_skipped_rev;
+      pb->notify->old_revision = rb->rev;
+      pb->notify_func(pb->notify_baton, pb->notify, rb->pool);
+    }
 
   /* If we're parsing revision 0, only the revision are (possibly)
      interesting to us: when loading the stream into an empty
@@ -607,6 +628,13 @@ new_node_record(void **node_baton,
 
   SVN_ERR(make_node_baton(&nb, headers, rb, pool));
 
+  /* If we're skipping this revision, we're done here. */
+  if (rb->skipped)
+    {
+      *node_baton = nb;
+      return SVN_NO_ERROR;
+    }
+
   /* Make sure we have an action we recognize. */
   if (nb->action < svn_node_action_change
         || nb->action > svn_node_action_replace)
@@ -652,6 +680,10 @@ set_revision_property(void *baton,
 {
   struct revision_baton *rb = baton;
 
+  /* If we're skipping this revision, we're done here. */
+  if (rb->skipped)
+    return SVN_NO_ERROR;
+
   if (rb->rev > 0)
     {
       if (rb->pb->validate_props)
@@ -691,6 +723,10 @@ set_node_property(void *baton,
   struct revision_baton *rb = nb->rb;
   struct parse_baton *pb = rb->pb;
 
+  /* If we're skipping this revision, we're done here. */
+  if (rb->skipped)
+    return SVN_NO_ERROR;
+
   if (strcmp(name, SVN_PROP_MERGEINFO) == 0)
     {
       svn_string_t *renumbered_mergeinfo;
@@ -764,6 +800,10 @@ remove_node_props(void *baton)
   apr_hash_t *proplist;
   apr_hash_index_t *hi;
 
+  /* If we're skipping this revision, we're done here. */
+  if (rb->skipped)
+    return SVN_NO_ERROR;
+
   SVN_ERR(svn_fs_node_proplist(&proplist,
                                rb->txn_root, nb->path, nb->pool));
 
@@ -788,6 +828,10 @@ apply_textdelta(svn_txdelta_window_handl
   struct node_baton *nb = node_baton;
   struct revision_baton *rb = nb->rb;
 
+  /* If we're skipping this revision, we're done here. */
+  if (rb->skipped)
+    return SVN_NO_ERROR;
+
   return svn_fs_apply_textdelta(handler, handler_baton,
                                 rb->txn_root, nb->path,
                                 svn_checksum_to_cstring(nb->base_checksum,
@@ -805,6 +849,10 @@ set_fulltext(svn_stream_t **stream,
   struct node_baton *nb = node_baton;
   struct revision_baton *rb = nb->rb;
 
+  /* If we're skipping this revision, we're done here. */
+  if (rb->skipped)
+    return SVN_NO_ERROR;
+
   return svn_fs_apply_text(stream,
                            rb->txn_root, nb->path,
                            svn_checksum_to_cstring(nb->result_checksum,
@@ -820,6 +868,10 @@ close_node(void *baton)
   struct revision_baton *rb = nb->rb;
   struct parse_baton *pb = rb->pb;
 
+  /* If we're skipping this revision, we're done here. */
+  if (rb->skipped)
+    return SVN_NO_ERROR;
+
   if (pb->notify_func)
     {
       pb->notify->action = svn_repos_notify_load_node_done;
@@ -839,7 +891,9 @@ close_revision(void *baton)
   svn_revnum_t committed_rev;
   svn_error_t *err;
 
-  if (rb->rev <= 0)
+  /* If we're skipping this revision or it has an invalid revision
+     number, we're done here. */
+  if (rb->skipped || (rb->rev <= 0))
     return SVN_NO_ERROR;
 
   /* Run the pre-commit hook, if so commanded. */
@@ -943,9 +997,11 @@ close_revision(void *baton)
 
 
 svn_error_t *
-svn_repos_get_fs_build_parser3(const svn_repos_parse_fns2_t **callbacks,
+svn_repos_get_fs_build_parser4(const svn_repos_parse_fns2_t **callbacks,
                                void **parse_baton,
                                svn_repos_t *repos,
+                               svn_revnum_t start_rev,
+                               svn_revnum_t end_rev,
                                svn_boolean_t use_history,
                                svn_boolean_t validate_props,
                                enum svn_repos_load_uuid uuid_action,
@@ -960,6 +1016,13 @@ svn_repos_get_fs_build_parser3(const svn
   if (parent_dir)
     parent_dir = svn_relpath_canonicalize(parent_dir, pool);
 
+  SVN_ERR_ASSERT((SVN_IS_VALID_REVNUM(start_rev) &&
+                  SVN_IS_VALID_REVNUM(end_rev))
+                 || ((! SVN_IS_VALID_REVNUM(start_rev)) &&
+                     (! SVN_IS_VALID_REVNUM(end_rev))));
+  if (SVN_IS_VALID_REVNUM(start_rev))
+    SVN_ERR_ASSERT(start_rev <= end_rev);
+
   parser->new_revision_record = new_revision_record;
   parser->new_node_record = new_node_record;
   parser->uuid_record = uuid_record;
@@ -985,6 +1048,8 @@ svn_repos_get_fs_build_parser3(const svn
   pb->rev_map = apr_hash_make(pool);
   pb->oldest_old_rev = SVN_INVALID_REVNUM;
   pb->last_rev_mapped = SVN_INVALID_REVNUM;
+  pb->start_rev = start_rev;
+  pb->end_rev = end_rev;
 
   *callbacks = parser;
   *parse_baton = pb;
@@ -994,8 +1059,10 @@ svn_repos_get_fs_build_parser3(const svn
 
 
 svn_error_t *
-svn_repos_load_fs3(svn_repos_t *repos,
+svn_repos_load_fs4(svn_repos_t *repos,
                    svn_stream_t *dumpstream,
+                   svn_revnum_t start_rev,
+                   svn_revnum_t end_rev,
                    enum svn_repos_load_uuid uuid_action,
                    const char *parent_dir,
                    svn_boolean_t use_pre_commit_hook,
@@ -1013,8 +1080,9 @@ svn_repos_load_fs3(svn_repos_t *repos,
 
   /* This is really simple. */
 
-  SVN_ERR(svn_repos_get_fs_build_parser3(&parser, &parse_baton,
+  SVN_ERR(svn_repos_get_fs_build_parser4(&parser, &parse_baton,
                                          repos,
+                                         start_rev, end_rev,
                                          TRUE, /* look for copyfrom revs */
                                          validate_props,
                                          uuid_action,

Modified: subversion/branches/showing-merge-info/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_repos/log.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_repos/log.c Mon Oct 24 12:21:42 2011
@@ -711,17 +711,16 @@ fs_mergeinfo_changed(svn_mergeinfo_catal
           if (prev_mergeinfo_value)
             SVN_ERR(svn_mergeinfo_parse(&prev_mergeinfo,
                                         prev_mergeinfo_value->data, iterpool));
-          SVN_ERR(svn_mergeinfo_diff(&deleted, &added, prev_mergeinfo,
-                                     mergeinfo, FALSE, iterpool));
+          SVN_ERR(svn_mergeinfo_diff2(&deleted, &added, prev_mergeinfo,
+                                      mergeinfo, FALSE, result_pool,
+                                      iterpool));
 
           /* Toss interesting stuff into our return catalogs. */
           hash_path = apr_pstrdup(result_pool, changed_path);
           apr_hash_set(*deleted_mergeinfo_catalog, hash_path,
-                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(deleted,
-                                                              result_pool));
+                       APR_HASH_KEY_STRING, deleted);
           apr_hash_set(*added_mergeinfo_catalog, hash_path,
-                       APR_HASH_KEY_STRING, svn_mergeinfo_dup(added,
-                                                              result_pool));
+                       APR_HASH_KEY_STRING, added);
         }
     }
 
@@ -859,13 +858,11 @@ get_combined_mergeinfo_changes(svn_merge
         continue;
 
       /* Compare, constrast, and combine the results. */
-      SVN_ERR(svn_mergeinfo_diff(&deleted, &added, prev_mergeinfo,
-                                 mergeinfo, FALSE, iterpool));
-      SVN_ERR(svn_mergeinfo_merge2(*deleted_mergeinfo,
-                                   svn_mergeinfo_dup(deleted, result_pool),
+      SVN_ERR(svn_mergeinfo_diff2(&deleted, &added, prev_mergeinfo,
+                                  mergeinfo, FALSE, result_pool, iterpool));
+      SVN_ERR(svn_mergeinfo_merge2(*deleted_mergeinfo, deleted,
                                    result_pool, iterpool));
-      SVN_ERR(svn_mergeinfo_merge2(*added_mergeinfo,
-                                   svn_mergeinfo_dup(added, result_pool),
+      SVN_ERR(svn_mergeinfo_merge2(*added_mergeinfo, added,
                                    result_pool, iterpool));
      }
 

Modified: subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_subr/mergeinfo.c Mon Oct 24 12:21:42 2011
@@ -488,13 +488,10 @@ range_to_string(const svn_merge_range_t 
    revisionlist -> (revisionelement)(COMMA revisionelement)*
    revisionrange -> REVISION "-" REVISION("*")
    revisionelement -> revisionrange | REVISION("*")
-
-   PATHNAME is the path this revisionlist is mapped to.  It is
-   used only for producing a more descriptive error message.
 */
 static svn_error_t *
 parse_rangelist(const char **input, const char *end,
-                apr_array_header_t *rangelist, const char *pathname,
+                apr_array_header_t *rangelist,
                 apr_pool_t *pool)
 {
   const char *curr = *input;
@@ -507,9 +504,7 @@ parse_rangelist(const char **input, cons
     {
       /* Empty range list. */
       *input = curr;
-      return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
-                               _("Mergeinfo for '%s' maps to an "
-                                 "empty revision range"), pathname);
+      return SVN_NO_ERROR;
     }
 
   while (curr < end && *curr != '\n')
@@ -603,6 +598,18 @@ parse_rangelist(const char **input, cons
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_rangelist__parse(apr_array_header_t **rangelist,
+                     const char *str,
+                     apr_pool_t *result_pool)
+{
+  const char *s = str;
+
+  *rangelist = apr_array_make(result_pool, 1, sizeof(svn_merge_range_t *));
+  SVN_ERR(parse_rangelist(&s, s + strlen(s), *rangelist, result_pool));
+  return SVN_NO_ERROR;
+}
+
 /* revisionline -> PATHNAME COLON revisionlist */
 static svn_error_t *
 parse_revision_line(const char **input, const char *end, svn_mergeinfo_t hash,
@@ -621,8 +628,12 @@ parse_revision_line(const char **input, 
 
   *input = *input + 1;
 
-  SVN_ERR(parse_rangelist(input, end, rangelist, pathname, scratch_pool));
+  SVN_ERR(parse_rangelist(input, end, rangelist, scratch_pool));
 
+  if (rangelist->nelts == 0)
+      return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
+                               _("Mergeinfo for '%s' maps to an "
+                                 "empty revision range"), pathname);
   if (*input != end && *(*input) != '\n')
     return svn_error_createf(SVN_ERR_MERGEINFO_PARSE_ERROR, NULL,
                              _("Could not find end of line in range list line "

Modified: subversion/branches/showing-merge-info/subversion/libsvn_subr/sorts.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_subr/sorts.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_subr/sorts.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_subr/sorts.c Mon Oct 24 12:21:42 2011
@@ -257,23 +257,16 @@ svn_sort__array_delete(apr_array_header_
       && elements_to_delete > 0
       && (elements_to_delete + delete_index) <= arr->nelts)
     {
-      if (delete_index == (arr->nelts - 1))
-        {
-          /* Deleting the last or only element in an array is easy. */
-          apr_array_pop(arr);
-        }
-      else if ((delete_index + elements_to_delete) == arr->nelts)
-        {
-          /* Delete the last ELEMENTS_TO_DELETE elements. */
-          arr->nelts -= elements_to_delete;
-        }
-      else
-        {
-          memmove(
-            arr->elts + arr->elt_size * delete_index,
-            arr->elts + (arr->elt_size * (delete_index + elements_to_delete)),
-            arr->elt_size * (arr->nelts - elements_to_delete - delete_index));
-          arr->nelts -= elements_to_delete;
-        }
+      /* If we are not deleting a block of elements that extends to the end
+         of the array, then we need to move the remaining elements to keep
+         the array contiguous. */
+      if ((elements_to_delete + delete_index) < arr->nelts)
+        memmove(
+          arr->elts + arr->elt_size * delete_index,
+          arr->elts + (arr->elt_size * (delete_index + elements_to_delete)),
+          arr->elt_size * (arr->nelts - elements_to_delete - delete_index));
+
+      /* Delete the last ELEMENTS_TO_DELETE elements. */
+      arr->nelts -= elements_to_delete;
     }
 }

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/entries.c Mon Oct 24 12:21:42 2011
@@ -1672,6 +1672,13 @@ write_entry(struct write_baton **entry_n
 
       case svn_wc_schedule_add:
         working_node = MAYBE_ALLOC(working_node, result_pool);
+        if (entry->deleted)
+          {
+            if (parent_node->base)
+              base_node = MAYBE_ALLOC(base_node, result_pool);
+            else
+              below_working_node = MAYBE_ALLOC(below_working_node, result_pool);
+          }
         break;
 
       case svn_wc_schedule_delete:
@@ -1695,9 +1702,12 @@ write_entry(struct write_baton **entry_n
      BASE node to indicate the not-present node.  */
   if (entry->deleted)
     {
-      SVN_ERR_ASSERT(base_node && !working_node && !below_working_node);
+      SVN_ERR_ASSERT(base_node || below_working_node);
       SVN_ERR_ASSERT(!entry->incomplete);
-      base_node->presence = svn_wc__db_status_not_present;
+      if (base_node)
+        base_node->presence = svn_wc__db_status_not_present;
+      else
+        below_working_node->presence = svn_wc__db_status_not_present;
     }
   else if (entry->absent)
     {

Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/props.c?rev=1188113&r1=1188112&r2=1188113&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/props.c Mon Oct 24 12:21:42 2011
@@ -145,8 +145,8 @@ diff_mergeinfo_props(svn_mergeinfo_t *de
       svn_mergeinfo_t from, to;
       SVN_ERR(svn_mergeinfo_parse(&from, from_prop_val->data, pool));
       SVN_ERR(svn_mergeinfo_parse(&to, to_prop_val->data, pool));
-      SVN_ERR(svn_mergeinfo_diff(deleted, added, from, to,
-                                 TRUE, pool));
+      SVN_ERR(svn_mergeinfo_diff2(deleted, added, from, to,
+                                  TRUE, pool, pool));
     }
   return SVN_NO_ERROR;
 }



Mime
View raw message