You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2014/03/12 18:18:26 UTC

svn commit: r1576824 [2/7] - in /subversion/branches/fsfs-lock-many: ./ build/generator/ build/generator/templates/ subversion/bindings/ctypes-python/test/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/t...

Modified: subversion/branches/fsfs-lock-many/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/include/svn_repos.h?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/include/svn_repos.h (original)
+++ subversion/branches/fsfs-lock-many/subversion/include/svn_repos.h Wed Mar 12 17:18:20 2014
@@ -328,8 +328,9 @@ typedef struct svn_repos_notify_t
    * For #svn_fs_upgrade_format_bumped, the new format version. */
   svn_revnum_t revision;
 
-  /** For #svn_repos_notify_warning, the warning object. */
+  /** For #svn_repos_notify_warning, the warning message. */
   const char *warning_str;
+  /** For #svn_repos_notify_warning, the warning type. */
   svn_repos_notify_warning_t warning;
 
   /** For #svn_repos_notify_pack_shard_start,
@@ -2688,34 +2689,65 @@ svn_repos_info_format(int *repos_format,
 /**
  * Verify the contents of the file system in @a repos.
  *
- * If @a feedback_stream is not @c NULL, write feedback to it (lines of
- * the form "* Verified revision %ld\n").
+ * Verify the revisions from @a start_rev to @a end_rev inclusive.  If
+ * @a start_rev is #SVN_INVALID_REVNUM, start at revision 0; if @a end_rev
+ * is #SVN_INVALID_REVNUM, end at the head revision.  @a start_rev must be
+ * older than or equal to @a end_rev.  If revision 0 is included in the
+ * range, then also verify "global invariants" of the repository, as
+ * described in svn_fs_verify().
+ *
+ * When a failure is found, if @a keep_going is @c TRUE then continue
+ * verification from the next revision, otherwise stop.
+ *
+ * If @a check_normalization is @c TRUE, report any name collisions
+ * within the same directory or svn:mergeinfo property where the names
+ * differ only in character representation, but are otherwise
+ * identical.
  *
- * If @a start_rev is #SVN_INVALID_REVNUM, then start verifying at
- * revision 0.  If @a end_rev is #SVN_INVALID_REVNUM, then verify
- * through the @c HEAD revision.
- *
- * For every verified revision call @a notify_func with @a rev set to
- * the verified revision and @a warning_text @c NULL. For warnings call @a
- * notify_func with @a warning_text set.
- *
- * For every revision verification failure, if @a notify_func is not @c NULL,
- * call @a notify_func with @a rev set to the corrupt revision and @err set to
- * the corresponding error message.
+ * If @a notify_func is not null, then call it with @a notify_baton and
+ * with a notification structure in which the fields are set as follows.
+ * (For a warning or error notification that does not apply to a specific
+ * revision, the revision number is #SVN_INVALID_REVNUM.)
+ *
+ *   For each FS-specific structure warning:
+ *      @c action = svn_repos_notify_verify_rev_structure
+ *      @c revision = the revision or #SVN_INVALID_REVNUM
+ *
+ *   For a FS-specific structure failure:
+ *      @c action = #svn_repos_notify_failure
+ *      @c revision = #SVN_INVALID_REVNUM
+ *      @c err = the corresponding error chain
+ *
+ *   For each revision verification failure:
+ *      @c action = #svn_repos_notify_failure
+ *      @c revision = the revision
+ *      @c err = the corresponding error chain
+ *
+ *   For each revision verification warning:
+ *      @c action = #svn_repos_notify_warning
+ *      @c warning and @c warning_str fields set accordingly
+ *        ### TODO: Set @c revision = the revision?
+ *
+ *   For each successfully verified revision:
+ *      @c action = #svn_repos_notify_verify_rev_end
+ *      @c revision = the revision
+ *
+ *   At the end:
+ *      @c action = svn_repos_notify_verify_end
+ *        ### Do we really need a callback to tell us the function we
+ *            called has reached its end and is about to return?
+ *        ### Not sent, currently, if a FS structure error is found.
  *
  * If @a cancel_func is not @c NULL, call it periodically with @a
  * cancel_baton as argument to see if the caller wishes to cancel the
  * verification.
  *
- * If @a keep_going is @c TRUE, the verify process notifies the error message
- * and continues. If @a notify_func is @c NULL, the verification failure is
- * not notified. Finally, return an error if there were any failures during
- * verification, or SVN_NO_ERROR if there were no failures.
+ * Use @a scratch_pool for temporary allocation.
  *
- * If @a check_normalization is @c TRUE, report any name collisions
- * within the same directory or svn:mergeinfo property where the names
- * differ only in character representation, but are otherwise
- * identical.
+ * Return an error if there were any failures during verification, or
+ * #SVN_NO_ERROR if there were no failures.  A failure means an event that,
+ * if a notification callback were provided, would send a notification
+ * with @c action = #svn_repos_notify_failure.
  *
  * @since New in 1.9.
  */
@@ -2751,7 +2783,10 @@ svn_repos_verify_fs2(svn_repos_t *repos,
 
 /**
  * Similar to svn_repos_verify_fs2(), but with a feedback_stream instead of
- * handling feedback via the notify_func handler
+ * handling feedback via the notify_func handler.
+ *
+ * If @a feedback_stream is not @c NULL, write feedback to it (lines of
+ * the form "* Verified revision %ld\n").
  *
  * @since New in 1.5.
  * @deprecated Provided for backward compatibility with the 1.6 API.
@@ -2768,15 +2803,13 @@ svn_repos_verify_fs(svn_repos_t *repos,
 
 /**
  * Dump the contents of the filesystem within already-open @a repos into
- * writable @a dumpstream.  Begin at revision @a start_rev, and dump every
- * revision up through @a end_rev.  Use @a pool for all allocation.  If
- * non-@c NULL, send feedback to @a feedback_stream.  If @a dumpstream is
+ * writable @a dumpstream.  If @a dumpstream is
  * @c NULL, this is effectively a primitive verify.  It is not complete,
- * however; svn_repos_verify_fs2() and svn_fs_verify().
+ * however; see instead svn_repos_verify_fs3().
  *
- * If @a start_rev is #SVN_INVALID_REVNUM, then start dumping at revision
- * 0.  If @a end_rev is #SVN_INVALID_REVNUM, then dump through the @c HEAD
- * revision.
+ * Begin at revision @a start_rev, and dump every revision up through
+ * @a end_rev.  If @a start_rev is #SVN_INVALID_REVNUM, start at revision
+ * 0.  If @a end_rev is #SVN_INVALID_REVNUM, end at the head revision.
  *
  * If @a incremental is @c TRUE, the first revision dumped will be a diff
  * against the previous revision (usually it looks like a full dump of
@@ -2789,14 +2822,37 @@ svn_repos_verify_fs(svn_repos_t *repos,
  * be done with full plain text.  A dump with @a use_deltas set cannot
  * be loaded by Subversion 1.0.x.
  *
- * If @a notify_func is not @c NULL, then for every dumped revision call
- * @a notify_func with @a rev set to the dumped revision and @a warning_text
- * @c NULL. For warnings call @a notify_func with @a warning_text.
+ * If @a notify_func is not null, then call it with @a notify_baton and
+ * with a notification structure in which the fields are set as follows.
+ * (For a warning or error notification that does not apply to a specific
+ * revision, the revision number is #SVN_INVALID_REVNUM.)
+ *
+ *   For each warning:
+ *      @c action = #svn_repos_notify_warning
+ *      @c warning and @c warning_str fields set accordingly
+ *        ### TODO: Set @c revision = the revision or #SVN_INVALID_REVNUM?
+ *
+ *   For each successfully dumped revision:
+ *      @c action = #svn_repos_notify_dump_rev_end
+ *      @c revision = the revision
+ *
+ *   At the end:
+ *      @c action = svn_repos_notify_verify_end
+ *        ### Do we really need a callback to tell us the function we
+ *            called has reached its end and is about to return?
+ *
+ *   At the end, if there were certain warnings previously:
+ *      @c action = #svn_repos_notify_warning
+ *      @c warning and @c warning_str fields set accordingly,
+ *            reiterating the existence of previous warnings
+ *        ### This is a presentation issue. Caller could do this itself.
  *
  * 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.
  *
+ * Use @a scratch_pool for temporary allocation.
+ *
  * @since New in 1.7.
  */
 svn_error_t *
@@ -3065,9 +3121,10 @@ typedef struct svn_repos_parse_fns3_t
   /** For a given @a node_baton, remove all properties. */
   svn_error_t *(*remove_node_props)(void *node_baton);
 
-  /** For a given @a node_baton, receive a writable @a stream capable of
-   * receiving the node's fulltext.  After writing the fulltext, call
-   * the stream's close() function.
+  /** For a given @a node_baton, set @a stream to a writable stream
+   * capable of receiving the node's fulltext.  The parser will write
+   * the fulltext to the stream and then close the stream to signal
+   * completion.
    *
    * If a @c NULL is returned instead of a stream, the vtable is
    * indicating that no text is desired, and the parser will not
@@ -3078,8 +3135,9 @@ typedef struct svn_repos_parse_fns3_t
 
   /** For a given @a node_baton, set @a handler and @a handler_baton
    * to a window handler and baton capable of receiving a delta
-   * against the node's previous contents.  A NULL window will be
-   * sent to the handler after all the windows are sent.
+   * against the node's previous contents.  The parser will send all
+   * the windows of data to this handler, and will then send a NULL
+   * window to signal completion.
    *
    * If a @c NULL is returned instead of a handler, the vtable is
    * indicating that no delta is desired, and the parser will not
@@ -3136,6 +3194,12 @@ typedef struct svn_repos_parse_fns3_t
  * but still allow expansion of the format: most headers do not have
  * to be handled explicitly.
  *
+ * ### [JAF] Wouldn't it be more efficient to support a start/end rev
+ *     range here than only supporting it in receivers such as
+ *     svn_repos_get_fs_build_parser4()? This parser could then skip over
+ *     chunks of the input stream before the oldest required rev, and
+ *     could stop reading entirely after the youngest required rev.
+ *
  * @since New in 1.8.
  */
 svn_error_t *
@@ -3155,7 +3219,7 @@ svn_repos_parse_dumpstream3(svn_stream_t
  * 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
+ * (inclusive) range values of revisions 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
@@ -3194,7 +3258,7 @@ svn_repos_get_fs_build_parser4(const svn
 /**
  * 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.
+ * the magic_header_record callback.
  *
  * @deprecated Provided for backward compatibility with the 1.7 API.
  */

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_auth_gnome_keyring/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -7,3 +7,5 @@ Release
 *~
 .*~
 libsvn_auth_gnome_keyring.def
+libsvn_auth_gnome_keyring.pc.in
+libsvn_auth_gnome_keyring.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Wed Mar 12 17:18:20 2014
@@ -32,7 +32,6 @@
 #include <glib.h>
 #include <gnome-keyring.h>
 
-#include "svn_private_config.h"
 #include "svn_auth.h"
 #include "svn_config.h"
 #include "svn_error.h"
@@ -41,6 +40,8 @@
 
 #include "private/svn_auth_private.h"
 
+#include "svn_private_config.h"
+
 
 
 /*-----------------------------------------------------------------------*/

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_auth_kwallet/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -7,3 +7,5 @@ Release
 *~
 .*~
 libsvn_auth_kwallet.def
+libsvn_auth_kwallet.pc.in
+libsvn_auth_kwallet.pc

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_client/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -7,3 +7,5 @@ Release
 *~
 .*~
 libsvn_client.def
+libsvn_client.pc.in
+libsvn_client.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/add.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/add.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/add.c Wed Mar 12 17:18:20 2014
@@ -30,8 +30,6 @@
 #include <string.h>
 #include <apr_lib.h>
 #include <apr_fnmatch.h>
-
-#include "svn_private_config.h"
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_string.h"
@@ -52,6 +50,8 @@
 #include "private/svn_ra_private.h"
 #include "private/svn_magic.h"
 
+#include "svn_private_config.h"
+
 
 
 /*** Code. ***/

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/cat.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/cat.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/cat.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_string.h"
@@ -40,6 +39,7 @@
 #include "svn_props.h"
 #include "client.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/changelist.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/changelist.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/changelist.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/changelist.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_client.h"
 #include "svn_wc.h"
 #include "svn_pools.h"
@@ -37,6 +36,7 @@
 
 #include "client.h"
 #include "private/svn_wc_private.h"
+#include "svn_private_config.h"
 
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/cleanup.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/cleanup.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_time.h"
 #include "svn_wc.h"
 #include "svn_client.h"
@@ -39,6 +38,7 @@
 #include "client.h"
 #include "svn_props.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit.c Wed Mar 12 17:18:20 2014
@@ -30,8 +30,6 @@
 #include <string.h>
 #include <apr_strings.h>
 #include <apr_hash.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_wc.h"
 #include "svn_ra.h"
@@ -48,6 +46,8 @@
 #include "private/svn_wc_private.h"
 #include "private/svn_ra_private.h"
 
+#include "svn_private_config.h"
+
 struct capture_baton_t {
   svn_commit_callback2_t original_callback;
   void *original_baton;
@@ -254,76 +254,6 @@ post_process_commit_item(svn_wc_committe
                                  sha1_checksum, scratch_pool);
 }
 
-
-static svn_error_t *
-check_nonrecursive_dir_delete(svn_wc_context_t *wc_ctx,
-                              const char *target_abspath,
-                              svn_depth_t depth,
-                              apr_pool_t *scratch_pool)
-{
-  svn_node_kind_t kind;
-
-  SVN_ERR_ASSERT(depth != svn_depth_infinity);
-
-  SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, target_abspath,
-                            TRUE, FALSE, scratch_pool));
-
-
-  /* ### TODO(sd): This check is slightly too strict.  It should be
-     ### possible to:
-     ###
-     ###   * delete a directory containing only files when
-     ###     depth==svn_depth_files;
-     ###
-     ###   * delete a directory containing only files and empty
-     ###     subdirs when depth==svn_depth_immediates.
-     ###
-     ### But for now, we insist on svn_depth_infinity if you're
-     ### going to delete a directory, because we're lazy and
-     ### trying to get depthy commits working in the first place.
-     ###
-     ### This would be fairly easy to fix, though: just, well,
-     ### check the above conditions!
-     ###
-     ### GJS: I think there may be some confusion here. there is
-     ###      the depth of the commit, and the depth of a checked-out
-     ###      directory in the working copy. Delete, by its nature, will
-     ###      always delete all of its children, so it seems a bit
-     ###      strange to worry about what is in the working copy.
-  */
-  if (kind == svn_node_dir)
-    {
-      svn_wc_schedule_t schedule;
-
-      /* ### Looking at schedule is probably enough, no need for
-         pristine compare etc. */
-      SVN_ERR(svn_wc__node_get_schedule(&schedule, NULL,
-                                        wc_ctx, target_abspath,
-                                        scratch_pool));
-
-      if (schedule == svn_wc_schedule_delete
-          || schedule == svn_wc_schedule_replace)
-        {
-          const apr_array_header_t *children;
-
-          SVN_ERR(svn_wc__node_get_children(&children, wc_ctx,
-                                            target_abspath, TRUE,
-                                            scratch_pool, scratch_pool));
-
-          if (children->nelts > 0)
-            return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-                                     _("Cannot delete the directory '%s' "
-                                       "in a non-recursive commit "
-                                       "because it has children"),
-                                     svn_dirent_local_style(target_abspath,
-                                                            scratch_pool));
-        }
-    }
-
-  return SVN_NO_ERROR;
-}
-
-
 /* Given a list of committables described by their common base abspath
    BASE_ABSPATH and a list of relative dirents TARGET_RELPATHS determine
    which absolute paths must be locked to commit all these targets and
@@ -674,26 +604,6 @@ svn_client_commit6(const apr_array_heade
                                                   base_abspath,
                                                   pool);
 
-  /* If a non-recursive commit is desired, do not allow a deleted directory
-     as one of the targets. */
-  if (depth != svn_depth_infinity && ! commit_as_operations)
-    for (i = 0; i < rel_targets->nelts; i++)
-      {
-        const char *relpath = APR_ARRAY_IDX(rel_targets, i, const char *);
-        const char *target_abspath;
-
-        svn_pool_clear(iterpool);
-
-        target_abspath = svn_dirent_join(base_abspath, relpath, iterpool);
-
-        cmt_err = svn_error_trace(
-          check_nonrecursive_dir_delete(ctx->wc_ctx, target_abspath,
-                                        depth, iterpool));
-
-        if (cmt_err)
-          goto cleanup;
-      }
-
   /* Crawl the working copy for commit items. */
   {
     struct check_url_kind_baton cukb;

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit_util.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/commit_util.c Wed Mar 12 17:18:20 2014
@@ -30,7 +30,6 @@
 #include <apr_hash.h>
 #include <apr_md5.h>
 
-#include "svn_private_config.h"
 #include "client.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -43,6 +42,7 @@
 #include <assert.h>
 #include <stdlib.h>  /* for qsort() */
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_client_private.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy.c Wed Mar 12 17:18:20 2014
@@ -28,8 +28,6 @@
 /*** Includes. ***/
 
 #include <string.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_error.h"
@@ -45,6 +43,7 @@
 #include "client.h"
 #include "mergeinfo.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_ra_private.h"
 #include "private/svn_mergeinfo_private.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy_foreign.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy_foreign.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy_foreign.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/copy_foreign.c Wed Mar 12 17:18:20 2014
@@ -26,8 +26,6 @@
 /*** Includes. ***/
 
 #include <string.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_delta.h"
@@ -45,6 +43,7 @@
 #include "client.h"
 #include "private/svn_subr_private.h"
 #include "private/svn_wc_private.h"
+#include "svn_private_config.h"
 
 struct edit_baton_t
 {

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/ctx.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/ctx.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/ctx.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/ctx.c Wed Mar 12 17:18:20 2014
@@ -28,8 +28,6 @@
 /*** Includes. ***/
 
 #include <apr_pools.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_error.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/delete.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/delete.c Wed Mar 12 17:18:20 2014
@@ -28,8 +28,6 @@
 /*** Includes. ***/
 
 #include <apr_file_io.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_pools.h"
@@ -44,6 +42,8 @@
 #include "private/svn_wc_private.h"
 #include "private/svn_ra_private.h"
 
+#include "svn_private_config.h"
+
 
 /*** Code. ***/
 
@@ -346,14 +346,14 @@ delete_urls_multi_repos(const apr_array_
          RA error code otherwise for 1.6 compatibility.)  */
       if (!repos_relpath || !*repos_relpath)
         return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
-                                 "URL '%s' not within a repository", uri);
+                                 _("URL '%s' not within a repository"), uri);
 
       /* Now, test to see if the thing actually exists in HEAD. */
       SVN_ERR(svn_ra_check_path(repos_deletables->ra_session, repos_relpath,
                                 SVN_INVALID_REVNUM, &kind, pool));
       if (kind == svn_node_none)
         return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
-                                 "URL '%s' does not exist", uri);
+                                 _("URL '%s' does not exist"), uri);
     }
 
   /* Now we iterate over the DELETABLES hash, issuing a commit for

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/deprecated.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/deprecated.c Wed Mar 12 17:18:20 2014
@@ -33,8 +33,6 @@
 #define SVN_DEPRECATED
 
 #include <string.h>
-
-#include "svn_private_config.h"
 #include "svn_client.h"
 #include "svn_path.h"
 #include "svn_compat.h"
@@ -49,6 +47,8 @@
 
 #include "private/svn_opt_private.h"
 #include "private/svn_wc_private.h"
+#include "svn_private_config.h"
+
 
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff.c Wed Mar 12 17:18:20 2014
@@ -30,8 +30,6 @@
 #include <apr_strings.h>
 #include <apr_pools.h>
 #include <apr_hash.h>
-
-#include "svn_private_config.h"
 #include "svn_types.h"
 #include "svn_hash.h"
 #include "svn_wc.h"
@@ -55,6 +53,8 @@
 #include "private/svn_subr_private.h"
 #include "private/svn_io_private.h"
 
+#include "svn_private_config.h"
+
 
 /* Utilities */
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_local.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_local.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_local.c Wed Mar 12 17:18:20 2014
@@ -30,8 +30,6 @@
 #include <apr_strings.h>
 #include <apr_pools.h>
 #include <apr_hash.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_wc.h"
@@ -50,6 +48,8 @@
 #include "private/svn_wc_private.h"
 #include "private/svn_diff_tree.h"
 
+#include "svn_private_config.h"
+
 
 /* Try to get properties for LOCAL_ABSPATH and return them in the property
  * hash *PROPS. If there are no properties because LOCAL_ABSPATH is not

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_summarize.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_summarize.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_summarize.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/diff_summarize.c Wed Mar 12 17:18:20 2014
@@ -22,7 +22,7 @@
  * ====================================================================
  */
 
-#include "svn_private_config.h"
+
 #include "svn_dirent_uri.h"
 #include "svn_hash.h"
 #include "svn_path.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/export.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/export.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/export.c Wed Mar 12 17:18:20 2014
@@ -29,8 +29,6 @@
 
 #include <apr_file_io.h>
 #include <apr_md5.h>
-
-#include "svn_private_config.h"
 #include "svn_types.h"
 #include "svn_client.h"
 #include "svn_string.h"
@@ -44,6 +42,7 @@
 #include "svn_props.h"
 #include "client.h"
 
+#include "svn_private_config.h"
 #include "private/svn_subr_private.h"
 #include "private/svn_delta_private.h"
 #include "private/svn_wc_private.h"
@@ -268,7 +267,9 @@ export_node(void *baton,
                                                       scratch_pool));
     }
 
-  if (status->file_external)
+  /* Skip file externals if they are a descendant of the export,
+     BUT NOT if we are explictly exporting the file external. */
+  if (status->file_external && strcmp(eib->origin_abspath, local_abspath) != 0)
     return SVN_NO_ERROR;
 
   /* Produce overwrite errors for the export root */
@@ -1588,3 +1589,4 @@ svn_client_export5(svn_revnum_t *result_
 
   return SVN_NO_ERROR;
 }
+

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/externals.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/externals.c Wed Mar 12 17:18:20 2014
@@ -28,8 +28,6 @@
 /*** Includes. ***/
 
 #include <apr_uri.h>
-
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_wc.h"
 #include "svn_pools.h"
@@ -42,6 +40,7 @@
 #include "svn_config.h"
 #include "client.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/import.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/import.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/import.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/import.c Wed Mar 12 17:18:20 2014
@@ -32,7 +32,6 @@
 #include <apr_hash.h>
 #include <apr_md5.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_ra.h"
 #include "svn_delta.h"
@@ -53,6 +52,8 @@
 #include "private/svn_subr_private.h"
 #include "private/svn_magic.h"
 
+#include "svn_private_config.h"
+
 /* Import context baton.
 
    ### TODO:  Add the following items to this baton:

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/info.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/info.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/info.c Wed Mar 12 17:18:20 2014
@@ -23,7 +23,8 @@
 
 /* ==================================================================== */
 
-#include "svn_private_config.h"
+
+
 #include "client.h"
 #include "svn_client.h"
 #include "svn_dirent_uri.h"
@@ -33,6 +34,7 @@
 
 #include "svn_wc.h"
 
+#include "svn_private_config.h"
 #include "private/svn_fspath.h"
 #include "private/svn_sorts_private.h"
 #include "private/svn_wc_private.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/iprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/iprops.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/iprops.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/iprops.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_error.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
@@ -37,6 +36,7 @@
 #include "svn_path.h"
 
 #include "client.h"
+#include "svn_private_config.h"
 
 #include "private/svn_wc_private.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/list.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/list.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/list.c Wed Mar 12 17:18:20 2014
@@ -21,7 +21,6 @@
  * ====================================================================
  */
 
-#include "svn_private_config.h"
 #include "svn_client.h"
 #include "svn_dirent_uri.h"
 #include "svn_hash.h"
@@ -37,6 +36,7 @@
 #include "private/svn_ra_private.h"
 #include "private/svn_sorts_private.h"
 #include "private/svn_wc_private.h"
+#include "svn_private_config.h"
 
 /* Prototypes for referencing before declaration */
 static svn_error_t *

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/locking_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/locking_commands.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/locking_commands.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_client.h"
 #include "svn_hash.h"
 #include "client.h"
@@ -36,6 +35,7 @@
 #include "svn_xml.h"
 #include "svn_pools.h"
 
+#include "svn_private_config.h"
 #include "private/svn_client_private.h"
 #include "private/svn_wc_private.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/log.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/log.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/log.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 #include <apr_strings.h>
 #include <apr_pools.h>
 
-#include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_client.h"
 #include "svn_compat.h"
@@ -40,6 +39,7 @@
 
 #include "client.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 
 #include <assert.h>

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/merge.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/merge.c Wed Mar 12 17:18:20 2014
@@ -31,8 +31,6 @@
 #include <apr_strings.h>
 #include <apr_tables.h>
 #include <apr_hash.h>
-
-#include "svn_private_config.h"
 #include "svn_types.h"
 #include "svn_hash.h"
 #include "svn_wc.h"
@@ -63,6 +61,8 @@
 #include "private/svn_subr_private.h"
 #include "private/svn_wc_private.h"
 
+#include "svn_private_config.h"
+
 
 /*-----------------------------------------------------------------------*/
 
@@ -11464,7 +11464,7 @@ find_reintegrate_merge(merge_source_t **
           SVN_ERR(svn_mergeinfo__catalog_to_formatted_string(
             &source_mergeinfo_cat_string,
             final_unmerged_catalog,
-            "  ", "    Missing ranges: ", scratch_pool));
+            "  ", _("    Missing ranges: "), scratch_pool));
           return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE,
                                    NULL,
                                    _("Reintegrate can only be used if "

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/mergeinfo.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/mergeinfo.c Wed Mar 12 17:18:20 2014
@@ -24,7 +24,6 @@
 #include <apr_pools.h>
 #include <apr_strings.h>
 
-#include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -48,6 +47,7 @@
 #include "private/svn_fspath.h"
 #include "client.h"
 #include "mergeinfo.h"
+#include "svn_private_config.h"
 
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/patch.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/patch.c Wed Mar 12 17:18:20 2014
@@ -29,8 +29,6 @@
 
 #include <apr_hash.h>
 #include <apr_fnmatch.h>
-
-#include "svn_private_config.h"
 #include "svn_client.h"
 #include "svn_dirent_uri.h"
 #include "svn_diff.h"
@@ -44,6 +42,7 @@
 #include "svn_wc.h"
 #include "client.h"
 
+#include "svn_private_config.h"
 #include "private/svn_eol_private.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_dep_compat.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/prop_commands.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/prop_commands.c Wed Mar 12 17:18:20 2014
@@ -30,7 +30,6 @@
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
 
-#include "svn_private_config.h"
 #include "svn_error.h"
 #include "svn_client.h"
 #include "client.h"
@@ -41,6 +40,7 @@
 #include "svn_hash.h"
 #include "svn_sorts.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_ra_private.h"
 #include "private/svn_client_private.h"
@@ -1222,7 +1222,7 @@ recursive_proplist_receiver(void *baton,
          Report iprops anyway */
 
       SVN_ERR(b->wrapped_receiver(b->wrapped_receiver_baton,
-                                  b->anchor ? b->anchor : local_abspath,
+                                  b->anchor ? b->anchor : b->anchor_abspath,
                                   NULL /* prop_hash */,
                                   b->iprops,
                                   scratch_pool));

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/ra.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/ra.c Wed Mar 12 17:18:20 2014
@@ -25,7 +25,6 @@
 
 #include <apr_pools.h>
 
-#include "svn_private_config.h"
 #include "svn_error.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
@@ -40,6 +39,7 @@
 #include "client.h"
 #include "mergeinfo.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 #include "private/svn_client_private.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/repos_diff.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/repos_diff.c Wed Mar 12 17:18:20 2014
@@ -36,7 +36,6 @@
 #include <apr_md5.h>
 #include <assert.h>
 
-#include "svn_private_config.h"
 #include "svn_checksum.h"
 #include "svn_hash.h"
 #include "svn_wc.h"
@@ -45,6 +44,7 @@
 #include "svn_path.h"
 #include "svn_io.h"
 #include "svn_props.h"
+#include "svn_private_config.h"
 
 #include "client.h"
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/resolved.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/resolved.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/resolved.c Wed Mar 12 17:18:20 2014
@@ -29,7 +29,6 @@
 
 #include <stdlib.h>
 
-#include "svn_private_config.h"
 #include "svn_types.h"
 #include "svn_wc.h"
 #include "svn_client.h"
@@ -41,6 +40,8 @@
 #include "svn_sorts.h"
 #include "client.h"
 #include "private/svn_wc_private.h"
+
+#include "svn_private_config.h"
 
 /*** Code. ***/
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/revert.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/revert.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/revert.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_path.h"
 #include "svn_wc.h"
 #include "svn_client.h"
@@ -40,6 +39,8 @@
 #include "client.h"
 #include "private/svn_wc_private.h"
 
+#include "svn_private_config.h"
+
 
 /*** Code. ***/
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/switch.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/switch.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_client.h"
 #include "svn_error.h"
 #include "svn_hash.h"
@@ -38,6 +37,7 @@
 #include "svn_pools.h"
 #include "client.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/update.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/update.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/update.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 
 /*** Includes. ***/
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_wc.h"
 #include "svn_client.h"
@@ -40,6 +39,7 @@
 #include "svn_io.h"
 #include "client.h"
 
+#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 
 /* Implements svn_wc_dirents_func_t for update and switch handling. Assumes

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_client/util.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_client/util.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_client/util.c Wed Mar 12 17:18:20 2014
@@ -24,7 +24,6 @@
 #include <apr_pools.h>
 #include <apr_strings.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
@@ -41,6 +40,8 @@
 
 #include "client.h"
 
+#include "svn_private_config.h"
+
 svn_client__pathrev_t *
 svn_client__pathrev_create(const char *repos_root_url,
                            const char *repos_uuid,

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_delta/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -7,3 +7,5 @@ Release
 *~
 .*~
 libsvn_delta.def
+libsvn_delta.pc.in
+libsvn_delta.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_delta/compat.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_delta/compat.c Wed Mar 12 17:18:20 2014
@@ -33,6 +33,8 @@
 #include "svn_props.h"
 #include "svn_pools.h"
 
+#include "svn_private_config.h"
+
 #include "private/svn_delta_private.h"
 #include "private/svn_sorts_private.h"
 #include "svn_private_config.h"
@@ -188,6 +190,7 @@ struct change_node
 
   apr_hash_t *props;  /* new/final set of props to apply  */
 
+  svn_boolean_t contents_changed; /* the file contents changed */
   const char *contents_abspath;  /* file containing new fulltext  */
   svn_checksum_t *checksum;  /* checksum of new fulltext  */
 
@@ -347,17 +350,26 @@ process_actions(struct ev2_edit_baton *e
       return SVN_NO_ERROR;
     }
 
-  if (change->contents_abspath != NULL)
+  if (change->contents_changed)
     {
       /* We can only set text on files. */
       /* ### validate we aren't overwriting KIND?  */
       kind = svn_node_file;
 
-      /* ### the checksum might be in CHANGE->CHECKSUM  */
-      SVN_ERR(svn_io_file_checksum2(&checksum, change->contents_abspath,
-                                    svn_checksum_sha1, scratch_pool));
-      SVN_ERR(svn_stream_open_readonly(&contents, change->contents_abspath,
-                                       scratch_pool, scratch_pool));
+      if (change->contents_abspath)
+        {
+          /* ### the checksum might be in CHANGE->CHECKSUM  */
+          SVN_ERR(svn_io_file_checksum2(&checksum, change->contents_abspath,
+                                        svn_checksum_sha1, scratch_pool));
+          SVN_ERR(svn_stream_open_readonly(&contents, change->contents_abspath,
+                                           scratch_pool, scratch_pool));
+        }
+      else
+        {
+          contents = svn_stream_empty(scratch_pool);
+          checksum = svn_checksum_empty_checksum(svn_checksum_sha1,
+                                                 scratch_pool);
+        }
     }
 
   if (change->props != NULL)
@@ -399,7 +411,7 @@ process_actions(struct ev2_edit_baton *e
           else
             {
               /* If this file was added, but apply_txdelta() was not
-                 called (ie. no CONTENTS_ABSPATH), then we're adding
+                 called (i.e., CONTENTS_CHANGED is FALSE), then we're adding
                  an empty file.  */
               if (change->contents_abspath == NULL)
                 {
@@ -789,6 +801,26 @@ window_handler(svn_txdelta_window_t *win
   return svn_error_trace(err);
 }
 
+/* Lazy-open handler for getting a read-only stream of the delta base. */
+static svn_error_t *
+open_delta_base(svn_stream_t **stream, void *baton,
+                apr_pool_t *result_pool, apr_pool_t *scratch_pool)
+{
+  const char *const delta_base = baton;
+  return svn_stream_open_readonly(stream, delta_base,
+                                  result_pool, scratch_pool);
+}
+
+/* Lazy-open handler for opening a stream for the delta result. */
+static svn_error_t *
+open_delta_target(svn_stream_t **stream, void *baton,
+                apr_pool_t *result_pool, apr_pool_t *scratch_pool)
+{
+  const char **delta_target = baton;
+  return svn_stream_open_unique(stream, delta_target, NULL,
+                                svn_io_file_del_on_pool_cleanup,
+                                result_pool, scratch_pool);
+}
 
 static svn_error_t *
 ev2_apply_textdelta(void *file_baton,
@@ -802,10 +834,9 @@ ev2_apply_textdelta(void *file_baton,
   struct handler_baton *hb = apr_pcalloc(handler_pool, sizeof(*hb));
   struct change_node *change;
   svn_stream_t *target;
-  /* ### fix this. for now, we know this has a "short" lifetime.  */
-  apr_pool_t *scratch_pool = handler_pool;
 
   change = locate_change(fb->eb, fb->path);
+  SVN_ERR_ASSERT(!change->contents_changed);
   SVN_ERR_ASSERT(change->contents_abspath == NULL);
   SVN_ERR_ASSERT(!SVN_IS_VALID_REVNUM(change->changing)
                  || change->changing == fb->base_revision);
@@ -814,12 +845,14 @@ ev2_apply_textdelta(void *file_baton,
   if (! fb->delta_base)
     hb->source = svn_stream_empty(handler_pool);
   else
-    SVN_ERR(svn_stream_open_readonly(&hb->source, fb->delta_base, handler_pool,
-                                     scratch_pool));
-
-  SVN_ERR(svn_stream_open_unique(&target, &change->contents_abspath, NULL,
-                                 svn_io_file_del_on_pool_cleanup,
-                                 fb->eb->edit_pool, scratch_pool));
+    hb->source = svn_stream_lazyopen_create(open_delta_base,
+                                            (char*)fb->delta_base,
+                                            FALSE, handler_pool);
+
+  change->contents_changed = TRUE;
+  target = svn_stream_lazyopen_create(open_delta_target,
+                                      &change->contents_abspath,
+                                      FALSE, fb->eb->edit_pool);
 
   svn_txdelta_apply(hb->source, target,
                     NULL, NULL,
@@ -1106,6 +1139,7 @@ add_file_cb(void *baton,
   change->kind = svn_node_file;
   change->deleting = replaces_rev;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
+  change->contents_changed = TRUE;
   change->contents_abspath = tmp_filename;
   change->checksum = svn_checksum_dup(md5_checksum, eb->edit_pool);
 
@@ -1223,6 +1257,7 @@ alter_file_cb(void *baton,
     change->props = svn_prop_hash_dup(props, eb->edit_pool);
   if (contents != NULL)
     {
+      change->contents_changed = TRUE;
       change->contents_abspath = tmp_filename;
       change->checksum = svn_checksum_dup(md5_checksum, eb->edit_pool);
     }
@@ -1662,7 +1697,7 @@ apply_change(void **dir_baton,
   else
     SVN_ERR(drive_ev1_props(eb, relpath, change, file_baton, scratch_pool));
 
-  if (change->contents_abspath)
+  if (change->contents_changed && change->contents_abspath)
     {
       svn_txdelta_window_handler_t handler;
       void *handler_baton;

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_delta/svndiff.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_delta/svndiff.c Wed Mar 12 17:18:20 2014
@@ -872,23 +872,6 @@ svn_txdelta_read_svndiff_window(svn_txde
 
 
 svn_error_t *
-svn_txdelta__read_svndiff_window_sizes(svn_txdelta_window_t **window,
-                                       svn_stream_t *stream,
-                                       int svndiff_version,
-                                       apr_pool_t *pool)
-{
-  apr_size_t inslen, newlen;
-
-  *window = apr_pcalloc(pool, sizeof(**window));
-  SVN_ERR(read_window_header(stream, &(*window)->sview_offset,
-                             &(*window)->sview_len, &(*window)->tview_len,
-                             &inslen, &newlen));
-
-  return svn_error_trace(svn_stream_skip(stream, inslen + newlen));
-}
-
-
-svn_error_t *
 svn_txdelta_skip_svndiff_window(apr_file_t *file,
                                 int svndiff_version,
                                 apr_pool_t *pool)

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_delta/xdelta.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_delta/xdelta.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_delta/xdelta.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_delta/xdelta.c Wed Mar 12 17:18:20 2014
@@ -27,7 +27,6 @@
 #include <apr_general.h>        /* for APR_INLINE */
 #include <apr_hash.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_delta.h"
 #include "private/svn_string_private.h"

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_diff/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -7,4 +7,5 @@ Release
 *~
 .*~
 libsvn_diff.def
-
+libsvn_diff.pc.in
+libsvn_diff.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_diff/diff_file.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_diff/diff_file.c Wed Mar 12 17:18:20 2014
@@ -1248,7 +1248,7 @@ svn_diff_file_options_parse(svn_diff_fil
   opt_parsing_error_baton.pool = pool;
 
   argv[0] = "";
-  memcpy((void *) (argv + 1), args->elts, sizeof(char*) * args->nelts);
+  memcpy(argv + 1, args->elts, sizeof(char*) * args->nelts);
   argv[args->nelts + 1] = NULL;
 
   apr_getopt_init(&os, pool, args->nelts + 1, argv);

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_diff/parse-diff.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_diff/parse-diff.c Wed Mar 12 17:18:20 2014
@@ -25,7 +25,6 @@
 #include <stddef.h>
 #include <string.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_error.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_diff/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_diff/util.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_diff/util.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_diff/util.c Wed Mar 12 17:18:20 2014
@@ -25,7 +25,6 @@
 #include <apr.h>
 #include <apr_general.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
@@ -41,6 +40,8 @@
 #include "private/svn_diff_private.h"
 #include "diff.h"
 
+#include "svn_private_config.h"
+
 
 svn_boolean_t
 svn_diff_contains_conflicts(svn_diff_t *diff)

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_fs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -8,4 +8,5 @@ Release
 *~
 .*~
 libsvn_fs.def
-
+libsvn_fs.pc.in
+libsvn_fs.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs/access.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs/access.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs/access.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs/access.c Wed Mar 12 17:18:20 2014
@@ -24,7 +24,6 @@
 
 #include <apr_hash.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_pools.h"
@@ -34,6 +33,7 @@
 #include "fs-loader.h"
 
 
+
 svn_error_t *
 svn_fs_create_access(svn_fs_access_t **access_ctx,
                      const char *username,

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.c Wed Mar 12 17:18:20 2014
@@ -1106,7 +1106,7 @@ svn_fs_node_relation(svn_fs_node_relatio
                      apr_pool_t *pool)
 {
   /* Different repository types? */
-  if (root_a->vtable != root_b->vtable)
+  if (root_a->fs != root_b->fs)
     {
       *relation = svn_fs_node_unrelated;
       return SVN_NO_ERROR;
@@ -1809,13 +1809,21 @@ svn_fs_unparse_id(const svn_fs_id_t *id,
 svn_boolean_t
 svn_fs_check_related(const svn_fs_id_t *a, const svn_fs_id_t *b)
 {
-  return (a->vtable->compare(a, b) != -1);
+  return (a->vtable->compare(a, b) != svn_fs_node_unrelated);
 }
 
 int
 svn_fs_compare_ids(const svn_fs_id_t *a, const svn_fs_id_t *b)
 {
-  return a->vtable->compare(a, b);
+  switch (a->vtable->compare(a, b))
+    {
+    case svn_fs_node_same:
+      return 0;
+    case svn_fs_node_common_ancestor:
+      return 1;
+    default:
+      return -1;
+    }
 }
 
 svn_error_t *

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.h?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs/fs-loader.h Wed Mar 12 17:18:20 2014
@@ -429,8 +429,10 @@ typedef struct history_vtable_t
 
 typedef struct id_vtable_t
 {
-  svn_string_t *(*unparse)(const svn_fs_id_t *id, apr_pool_t *pool);
-  int (*compare)(const svn_fs_id_t *a, const svn_fs_id_t *b);
+  svn_string_t *(*unparse)(const svn_fs_id_t *id,
+                           apr_pool_t *pool);
+  svn_fs_node_relation_t (*compare)(const svn_fs_id_t *a,
+                                    const svn_fs_id_t *b);
 } id_vtable_t;
 
 

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -7,4 +7,5 @@ Release
 *.o
 *~
 .*~
-
+libsvn_fs_base.pc
+libsvn_fs_base.pc.in

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/changes-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/changes-table.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/changes-table.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/changes-table.c Wed Mar 12 17:18:20 2014
@@ -25,7 +25,6 @@
 #include <apr_hash.h>
 #include <apr_tables.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_fs.h"
 #include "svn_pools.h"
@@ -42,6 +41,7 @@
 
 #include "private/svn_fs_util.h"
 #include "private/svn_fspath.h"
+#include "svn_private_config.h"
 
 
 /*** Creating and opening the changes table. ***/

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/env.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/env.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/env.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/bdb/env.c Wed Mar 12 17:18:20 2014
@@ -31,7 +31,6 @@
 #include <apr_strings.h>
 #include <apr_hash.h>
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_pools.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/dag.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/dag.c Wed Mar 12 17:18:20 2014
@@ -22,7 +22,6 @@
 
 #include <string.h>
 
-#include "svn_private_config.h"
 #include "svn_path.h"
 #include "svn_time.h"
 #include "svn_error.h"
@@ -58,6 +57,8 @@
 #include "private/svn_fspath.h"
 #include "../libsvn_fs/fs-loader.h"
 
+#include "svn_private_config.h"
+
 
 /* Initializing a filesystem.  */
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/fs.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/fs.c Wed Mar 12 17:18:20 2014
@@ -28,8 +28,6 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
-#define SVN_WANT_BDB
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_fs.h"
@@ -45,6 +43,8 @@
 #include "tree.h"
 #include "id.h"
 #include "lock.h"
+#define SVN_WANT_BDB
+#include "svn_private_config.h"
 
 #include "bdb/bdb-err.h"
 #include "bdb/bdb_compat.h"

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.c Wed Mar 12 17:18:20 2014
@@ -108,13 +108,14 @@ svn_fs_base__id_check_related(const svn_
 }
 
 
-int
+svn_fs_node_relation_t
 svn_fs_base__id_compare(const svn_fs_id_t *a,
                         const svn_fs_id_t *b)
 {
   if (svn_fs_base__id_eq(a, b))
-    return 0;
-  return (svn_fs_base__id_check_related(a, b) ? 1 : -1);
+    return svn_fs_node_same;
+  return (svn_fs_base__id_check_related(a, b) ? svn_fs_node_common_ancestor
+                                              : svn_fs_node_unrelated);
 }
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.h?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.h (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/id.h Wed Mar 12 17:18:20 2014
@@ -53,9 +53,9 @@ svn_boolean_t svn_fs_base__id_eq(const s
 svn_boolean_t svn_fs_base__id_check_related(const svn_fs_id_t *a,
                                             const svn_fs_id_t *b);
 
-/* Return 0 if A and B are equal, 1 if they are related, -1 otherwise. */
-int svn_fs_base__id_compare(const svn_fs_id_t *a,
-                            const svn_fs_id_t *b);
+/* Return the noderev relationship between A and B. */
+svn_fs_node_relation_t svn_fs_base__id_compare(const svn_fs_id_t *a,
+                                               const svn_fs_id_t *b);
 
 /* Create an ID based on NODE_ID, COPY_ID, and TXN_ID, allocated in
    POOL. */

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/lock.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/lock.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/lock.c Wed Mar 12 17:18:20 2014
@@ -21,11 +21,11 @@
  */
 
 
-#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_fs.h"
+#include "svn_private_config.h"
 
 #include <apr_uuid.h>
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/revs-txns.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/revs-txns.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/revs-txns.c Wed Mar 12 17:18:20 2014
@@ -25,7 +25,6 @@
 #include <apr_tables.h>
 #include <apr_pools.h>
 
-#include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_time.h"
 #include "svn_fs.h"
@@ -47,6 +46,7 @@
 #include "bdb/changes-table.h"
 #include "../libsvn_fs/fs-loader.h"
 
+#include "svn_private_config.h"
 #include "private/svn_fs_util.h"
 
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/tree.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_base/tree.c Wed Mar 12 17:18:20 2014
@@ -38,7 +38,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <assert.h>
-
 #include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
@@ -570,7 +569,8 @@ get_copy_inheritance(copy_id_inherit_t *
     {
       copy_t *copy;
       SVN_ERR(svn_fs_bdb__get_copy(&copy, fs, child_copy_id, trail, pool));
-      if (svn_fs_base__id_compare(copy->dst_noderev_id, child_id) == -1)
+      if (   svn_fs_base__id_compare(copy->dst_noderev_id, child_id)
+          == svn_fs_node_unrelated)
         {
           *inherit_p = copy_id_inherit_parent;
           return SVN_NO_ERROR;
@@ -1047,15 +1047,7 @@ base_node_relation(svn_fs_node_relation_
   SVN_ERR(base_node_id(&id_a, root_a, path_a, pool));
   SVN_ERR(base_node_id(&id_b, root_b, path_b, pool));
 
-  switch (svn_fs_base__id_compare(id_a, id_b))
-    {
-      case 0:  *relation = svn_fs_node_same;
-               break;
-      case 1:  *relation = svn_fs_node_common_anchestor;
-               break;
-      default: *relation = svn_fs_node_unrelated;
-               break;
-    }
+  *relation = svn_fs_base__id_compare(id_a, id_b);
 
   return SVN_NO_ERROR;
 }
@@ -3172,7 +3164,7 @@ txn_body_copy(void *baton,
   if ((to_parent_path->node)
       && (svn_fs_base__id_compare(svn_fs_base__dag_get_id(from_node),
                                   svn_fs_base__dag_get_id
-                                  (to_parent_path->node)) == 0))
+                                  (to_parent_path->node)) == svn_fs_node_same))
     return SVN_NO_ERROR;
 
   if (! from_root->is_txn_root)

Propchange: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Mar 12 17:18:20 2014
@@ -9,3 +9,5 @@ Release
 .*~
 rep-cache-db.h
 revprops-db.h
+libsvn_fs_fs.pc.in
+libsvn_fs_fs.pc

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/cached_data.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/cached_data.c Wed Mar 12 17:18:20 2014
@@ -462,10 +462,13 @@ get_root_changes_offset(apr_off_t *root_
                         apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
-  apr_off_t offset;
   apr_off_t rev_offset;
   apr_seek_where_t seek_relative;
-  svn_stringbuf_t *trailer = svn_stringbuf_create_ensure(64, pool);
+  svn_stringbuf_t *trailer;
+  char buffer[64];
+  apr_off_t start;
+  apr_off_t end;
+  apr_size_t len;
 
   /* Determine where to seek to in the file.
 
@@ -479,13 +482,13 @@ get_root_changes_offset(apr_off_t *root_
   if (svn_fs_fs__is_packed_rev(fs, rev)
       && ((rev + 1) % ffd->max_files_per_dir != 0))
     {
-      SVN_ERR(svn_fs_fs__get_packed_offset(&offset, fs, rev + 1, pool));
+      SVN_ERR(svn_fs_fs__get_packed_offset(&end, fs, rev + 1, pool));
       seek_relative = APR_SET;
     }
   else
     {
       seek_relative = APR_END;
-      offset = 0;
+      end = 0;
     }
 
   /* Offset of the revision from the start of the pack file, if applicable. */
@@ -496,16 +499,25 @@ get_root_changes_offset(apr_off_t *root_
 
   /* We will assume that the last line containing the two offsets
      will never be longer than 64 characters. */
-  SVN_ERR(svn_io_file_seek(rev_file, seek_relative, &offset, pool));
+  SVN_ERR(svn_io_file_seek(rev_file, seek_relative, &end, pool));
 
-  trailer->len = trailer->blocksize-1;
-  SVN_ERR(aligned_seek(fs, rev_file, NULL, offset - trailer->len, pool));
+  if (end < sizeof(buffer))
+    {
+      len = (apr_size_t)end;
+      start = 0;
+    }
+  else
+    {
+      len = sizeof(buffer);
+      start = end - sizeof(buffer);
+    }
 
   /* Read in this last block, from which we will identify the last line. */
-  SVN_ERR(svn_io_file_read(rev_file, trailer->data, &trailer->len, pool));
-  trailer->data[trailer->len] = 0;
+  SVN_ERR(aligned_seek(fs, rev_file, NULL, start, pool));
+  SVN_ERR(svn_io_file_read_full2(rev_file, buffer, len, NULL, NULL, pool));
 
   /* Parse the last line. */
+  trailer = svn_stringbuf_ncreate(buffer, len, pool);
   SVN_ERR(svn_fs_fs__parse_revision_trailer(root_offset,
                                             changes_offset,
                                             trailer,
@@ -719,10 +731,9 @@ create_rep_state_body(rep_state_t **rep_
       && (   ((*shared_file)->revision / ffd->max_files_per_dir)
           == (rep->revision / ffd->max_files_per_dir));
 
-  representation_cache_key_t key;
+  pair_cache_key_t key;
   key.revision = rep->revision;
-  key.is_packed = rep->revision < ffd->min_unpacked_rev;
-  key.item_index = rep->item_index;
+  key.second = rep->item_index;
 
   /* continue constructing RS and RA */
   rs->size = rep->size;
@@ -1130,7 +1141,7 @@ set_cached_window(svn_txdelta_window_t *
  * cache. This will be a no-op and IS_CACHED will be set to FALSE if no
  * cache has been given. If a cache is available IS_CACHED will inform
  * the caller about the success of the lookup. Allocations (of the window
- * in particualar) will be made from POOL.
+ * in particular) will be made from POOL.
  */
 static svn_error_t *
 get_cached_combined_window(svn_stringbuf_t **window_p,
@@ -1346,7 +1357,8 @@ read_delta_window(svn_txdelta_window_t *
      because the block is unlikely to contain other data. */
   if (   rs->chunk_index == 0
       && SVN_IS_VALID_REVNUM(rs->revision)
-      && svn_fs_fs__use_log_addressing(rs->sfile->fs, rs->revision))
+      && svn_fs_fs__use_log_addressing(rs->sfile->fs, rs->revision)
+      && rs->window_cache)
     {
       SVN_ERR(block_read(NULL, rs->sfile->fs, rs->revision, rs->item_index,
                          rs->sfile->rfile, pool, pool));
@@ -2428,62 +2440,83 @@ init_rep_state(rep_state_t *rs,
   return SVN_NO_ERROR;
 }
 
+/* Implement svn_cache__partial_getter_func_t for txdelta windows.
+ * Instead of the whole window data, return only the
+ * svn_fs_fs__txdelta_cached_window_t wrapper containing the end-offset.
+ */
+static svn_error_t *
+get_window_header(void **out,
+                  const void *data,
+                  apr_size_t data_len,
+                  void *baton,
+                  apr_pool_t *result_pool)
+{
+  *out = apr_pmemdup(result_pool, data,
+                     sizeof(svn_fs_fs__txdelta_cached_window_t));
+
+  return SVN_NO_ERROR;
+}
+
 /* Walk through all windows in the representation addressed by RS in FS
  * (excluding the delta bases) and put those not already cached into the
- * window caches.  As a side effect, return the total sum of all expanded
- * window sizes in *FULLTEXT_LEN.  Use POOL for temporary allocations.
+ * window caches.  If MAX_OFFSET is not -1, don't read windows that start
+ * at or beyond that offset.  Use POOL for temporary allocations.
  */
 static svn_error_t *
-cache_windows(svn_filesize_t *fulltext_len,
-              svn_fs_t *fs,
+cache_windows(svn_fs_t *fs,
               rep_state_t *rs,
+              apr_off_t max_offset,
               apr_pool_t *pool)
 {
-  *fulltext_len = 0;
-
   while (rs->current < rs->size)
     {
-      svn_txdelta_window_t *window;
-      apr_off_t start_offset = rs->start + rs->current;
-      apr_off_t end_offset;
+      svn_fs_fs__txdelta_cached_window_t *cached_window;
       svn_boolean_t found = FALSE;
 
-      /* We don't need to read the data again, if it is already in cache.
+      if (max_offset != -1 && rs->start + rs->current >= max_offset)
+        return SVN_NO_ERROR;
+
+      /* We don't need to read the data again if it is already in cache.
        */
       if (rs->window_cache)
         {
-          window_cache_key_t key = {0};
-          SVN_ERR(svn_cache__has_key(&found, rs->window_cache,
-                                     get_window_key(&key, rs), pool));
+          window_cache_key_t key = { 0 };
+          SVN_ERR(svn_cache__get_partial((void **) &cached_window, &found,
+                                         rs->window_cache,
+                                         get_window_key(&key, rs),
+                                         get_window_header, NULL, pool));
         }
 
-      /* navigate to the current window */
-      SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, pool));
-
-      /* Skip or actually read the window - depending on cache status. */
       if (found)
-        SVN_ERR(svn_txdelta__read_svndiff_window_sizes(&window,
-                                                rs->sfile->rfile->stream,
-                                                rs->ver, pool));
+        {
+          /* Skip this window; we already have it. */
+          rs->current = cached_window->end_offset;
+        }
       else
-        SVN_ERR(svn_txdelta_read_svndiff_window(&window,
-                                                rs->sfile->rfile->stream,
-                                                rs->ver, pool));
-
-      /* aggregate expanded window size */
-      *fulltext_len += window->tview_len;
-
-      /* determine on-disk window size */
-      SVN_ERR(get_file_offset(&end_offset, rs, pool));
-      rs->current = end_offset - rs->start;
+        {
+          /* Read, decode and cache the window. */
+          svn_txdelta_window_t *window;
+          apr_off_t start_offset = rs->start + rs->current;
+          apr_off_t end_offset;
+
+          /* navigate to the current window */
+          SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, pool));
+          SVN_ERR(svn_txdelta_read_svndiff_window(&window,
+                                                  rs->sfile->rfile->stream,
+                                                  rs->ver, pool));
+
+          /* determine on-disk window size */
+          SVN_ERR(get_file_offset(&end_offset, rs, pool));
+          rs->current = end_offset - rs->start;
+
+          /* cache the window now */
+          SVN_ERR(set_cached_window(window, rs, pool));
+        }
+
       if (rs->current > rs->size)
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                      _("Reading one svndiff window read beyond "
-                                  "the end of the representation"));
-
-      /* cache the window now */
-      if (!found)
-        SVN_ERR(set_cached_window(window, rs, pool));
+                                _("Reading one svndiff window read beyond "
+                                            "the end of the representation"));
 
       rs->chunk_index++;
     }
@@ -2493,7 +2526,8 @@ cache_windows(svn_filesize_t *fulltext_l
 
 /* Read all txdelta / plain windows following REP_HEADER in FS as described
  * by ENTRY.  Read the data from the already open FILE and the wrapping
- * STREAM object.  Use POOL for allocations.
+ * STREAM object.  If MAX_OFFSET is not -1, don't read windows that start
+ * at or beyond that offset.  Use POOL for allocations.
  * If caching is not enabled, this is a no-op.
  */
 static svn_error_t *
@@ -2501,6 +2535,7 @@ block_read_windows(svn_fs_fs__rep_header
                    svn_fs_t *fs,
                    svn_fs_fs__revision_file_t *rev_file,
                    svn_fs_fs__p2l_entry_t* entry,
+                   apr_off_t max_offset,
                    apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
@@ -2545,8 +2580,7 @@ block_read_windows(svn_fs_fs__rep_header
     }
   else
     {
-      svn_filesize_t fulltext_len;
-      SVN_ERR(cache_windows(&fulltext_len, fs, &rs, pool));
+      SVN_ERR(cache_windows(fs, &rs, max_offset, pool));
     }
 
   return SVN_NO_ERROR;
@@ -2561,7 +2595,7 @@ static svn_error_t *
 read_rep_header(svn_fs_fs__rep_header_t **rep_header,
                 svn_fs_t *fs,
                 svn_stream_t *stream,
-                representation_cache_key_t *key,
+                pair_cache_key_t *key,
                 apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
@@ -2586,24 +2620,26 @@ read_rep_header(svn_fs_fs__rep_header_t 
 /* Fetch the representation data (header, txdelta / plain windows)
  * addressed by ENTRY->ITEM in FS and cache it if caches are enabled.
  * Read the data from the already open FILE and the wrapping
- * STREAM object.  Use POOL for allocations.
+ * STREAM object.  If MAX_OFFSET is not -1, don't read windows that start
+ * at or beyond that offset.  Use POOL for allocations.
  */
 static svn_error_t *
 block_read_contents(svn_fs_t *fs,
                     svn_fs_fs__revision_file_t *rev_file,
                     svn_fs_fs__p2l_entry_t* entry,
+                    apr_off_t max_offset,
                     apr_pool_t *pool)
 {
-  representation_cache_key_t header_key = { 0 };
+  pair_cache_key_t header_key = { 0 };
   svn_fs_fs__rep_header_t *rep_header;
 
   header_key.revision = (apr_int32_t)entry->item.revision;
-  header_key.is_packed = svn_fs_fs__is_packed_rev(fs, header_key.revision);
-  header_key.item_index = entry->item.number;
+  header_key.second = entry->item.number;
 
   SVN_ERR(read_rep_header(&rep_header, fs, rev_file->stream, &header_key,
                           pool));
-  SVN_ERR(block_read_windows(rep_header, fs, rev_file, entry, pool));
+  SVN_ERR(block_read_windows(rep_header, fs, rev_file, entry, max_offset,
+                             pool));
 
   return SVN_NO_ERROR;
 }
@@ -2811,7 +2847,7 @@ block_read(void **result,
       /* read all items from the block */
       for (i = 0; i < entries->nelts; ++i)
         {
-          svn_boolean_t is_result;
+          svn_boolean_t is_result, is_wanted;
           apr_pool_t *pool;
           svn_fs_fs__p2l_entry_t* entry;
 
@@ -2823,10 +2859,10 @@ block_read(void **result,
             continue;
 
           /* the item / container we were looking for? */
-          is_result =    result
-                      && entry->offset == wanted_offset
+          is_wanted =    entry->offset == wanted_offset
                       && entry->item.revision == revision
                       && entry->item.number == item_index;
+          is_result = result && is_wanted;
 
           /* select the pool that we want the item to be allocated in */
           pool = is_result ? result_pool : iterpool;
@@ -2847,6 +2883,9 @@ block_read(void **result,
                   case SVN_FS_FS__ITEM_TYPE_FILE_PROPS:
                   case SVN_FS_FS__ITEM_TYPE_DIR_PROPS:
                     SVN_ERR(block_read_contents(fs, revision_file, entry,
+                                                is_wanted
+                                                  ? -1
+                                                  : block_start + ffd->block_size,
                                                 pool));
                     break;
 

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/caching.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/caching.c Wed Mar 12 17:18:20 2014
@@ -29,10 +29,10 @@
 #include "temp_serializer.h"
 #include "../libsvn_fs/fs-loader.h"
 
-#include "svn_private_config.h"
 #include "svn_config.h"
 #include "svn_cache_config.h"
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_pools.h"
 
@@ -510,9 +510,9 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                        1, 1000, /* ~8 bytes / entry; 1k entries total */
                        svn_fs_fs__serialize_rep_header,
                        svn_fs_fs__deserialize_rep_header,
-                       sizeof(representation_cache_key_t),
+                       sizeof(pair_cache_key_t),
                        apr_pstrcat(pool, prefix, "REPHEADER", SVN_VA_NULL),
-                       SVN_CACHE__MEMBUFFER_HIGH_PRIORITY,
+                       SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
                        fs,
                        no_handler,
                        fs->pool));

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs.h?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs.h Wed Mar 12 17:18:20 2014
@@ -55,6 +55,7 @@ extern "C" {
 #define PATH_UUID             "uuid"             /* Contains UUID */
 #define PATH_CURRENT          "current"          /* Youngest revision */
 #define PATH_LOCK_FILE        "write-lock"       /* Revision lock file */
+#define PATH_PACK_LOCK_FILE   "pack-lock"        /* Pack lock file */
 #define PATH_REVS_DIR         "revs"             /* Directory of revisions */
 #define PATH_REVPROPS_DIR     "revprops"         /* Directory of revprops */
 #define PATH_TXNS_DIR         "transactions"     /* Directory of transactions */
@@ -170,6 +171,9 @@ extern "C" {
 /* The minimum format number that supports packed revprops. */
 #define SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT 7
 
+/* Minimum format number that providing a separate lock file for pack ops */
+#define SVN_FS_FS__MIN_PACK_LOCK_FORMAT 7
+
 /* Minimum format number that stores mergeinfo-mode flag in changed paths */
 #define SVN_FS_FS__MIN_MERGEINFO_IN_CHANGES_FORMAT 7
 
@@ -250,37 +254,27 @@ typedef struct fs_fs_dag_cache_t fs_fs_d
 
 /* Key type for all caches that use revision + offset / counter as key.
 
-   NOTE: always initialize this using calloc() or '= {0};'!  This is used
-   as a cache key and the padding bytes on 32 bit archs should be zero for
-   cache effectiveness. */
+   Note: Cache keys should be 16 bytes for best performance and there
+         should be no padding. */
 typedef struct pair_cache_key_t
 {
-  svn_revnum_t revision;
+  /* The object's revision.  Use the 64 data type to prevent padding. */
+  apr_int64_t revision;
 
+  /* Sub-address: item index, revprop generation, packed flag, etc. */
   apr_int64_t second;
 } pair_cache_key_t;
 
-/* Key type that identifies a representation / rep header. */
-typedef struct representation_cache_key_t
-{
-  /* Revision that contains the representation */
-  apr_uint32_t revision;
-
-  /* Packed or non-packed representation? */
-  svn_boolean_t is_packed;
-
-  /* Item index of the representation */
-  apr_uint64_t item_index;
-} representation_cache_key_t;
+/* Key type that identifies a txdelta window.
 
-/* Key type that identifies a txdelta window. */
+   Note: Cache keys should require no padding. */
 typedef struct window_cache_key_t
 {
-  /* Revision that contains the representation */
-  apr_uint32_t revision;
+  /* The object's revision.  Use the 64 data type to prevent padding. */
+  apr_int64_t revision;
 
-  /* Window number within that representation */
-  apr_int32_t chunk_index;
+  /* Window number within that representation. */
+  apr_int64_t chunk_index;
 
   /* Item index of the representation */
   apr_uint64_t item_index;

Modified: subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs_fs.c?rev=1576824&r1=1576823&r2=1576824&view=diff
==============================================================================
--- subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fsfs-lock-many/subversion/libsvn_fs_fs/fs_fs.c Wed Mar 12 17:18:20 2014
@@ -114,9 +114,9 @@ path_lock(svn_fs_t *fs, apr_pool_t *pool
 
 
 /* Get a lock on empty file LOCK_FILENAME, creating it in POOL. */
-static svn_error_t *
-get_lock_on_filesystem(const char *lock_filename,
-                       apr_pool_t *pool)
+svn_error_t *
+svn_fs_fs__get_lock_on_filesystem(const char *lock_filename,
+                                  apr_pool_t *pool)
 {
   svn_error_t *err = svn_io_file_lock2(lock_filename, TRUE, FALSE, pool);
 
@@ -160,7 +160,8 @@ with_some_lock_file(svn_fs_t *fs,
                     apr_pool_t *pool)
 {
   apr_pool_t *subpool = svn_pool_create(pool);
-  svn_error_t *err = get_lock_on_filesystem(lock_filename, subpool);
+  svn_error_t *err = svn_fs_fs__get_lock_on_filesystem(lock_filename,
+                                                       subpool);
 
   if (!err)
     {