You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2014/09/19 16:30:46 UTC

svn commit: r1626236 - in /subversion/branches/remove-log-addressing: ./ subversion/include/ subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_fs_x/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/svn-bench/ subversion/svn/ ...

Author: ivan
Date: Fri Sep 19 14:30:45 2014
New Revision: 1626236

URL: http://svn.apache.org/r1626236
Log:
On remove-log-addressing branch: Merge changes from trunk.

Removed:
    subversion/branches/remove-log-addressing/subversion/svn-bench/client_errors.h
    subversion/branches/remove-log-addressing/subversion/svn/client_errors.h
Modified:
    subversion/branches/remove-log-addressing/   (props changed)
    subversion/branches/remove-log-addressing/configure.ac
    subversion/branches/remove-log-addressing/subversion/include/svn_client.h
    subversion/branches/remove-log-addressing/subversion/include/svn_fs.h
    subversion/branches/remove-log-addressing/subversion/include/svn_io.h
    subversion/branches/remove-log-addressing/subversion/libsvn_client/upgrade.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/transaction.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/util.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/cached_data.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/index.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/pack.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/transaction.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/io.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/externals.c
    subversion/branches/remove-log-addressing/subversion/svn/svn.c
    subversion/branches/remove-log-addressing/subversion/svnmucc/svnmucc.c
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/externals_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/io-test.c
    subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.c
    subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.h
    subversion/branches/remove-log-addressing/tools/dev/unix-build/Makefile.svn
    subversion/branches/remove-log-addressing/tools/server-side/svnpredumpfilter.py

Propchange: subversion/branches/remove-log-addressing/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1623988-1626219

Modified: subversion/branches/remove-log-addressing/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/configure.ac?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/configure.ac (original)
+++ subversion/branches/remove-log-addressing/configure.ac Fri Sep 19 14:30:45 2014
@@ -319,18 +319,6 @@ case $host in
 esac
 AC_SUBST(LT_NO_UNDEFINED)
 
-AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
-case $host in
-  *-*-cygwin*)
-    AC_MSG_RESULT([yes])
-    AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1,
-              [Define if circular linkage is not possible on this platform.])
-    ;;
-  *)
-    AC_MSG_RESULT([no])
-    ;;
-esac
-
 dnl Check for trang.
 trang=yes
 AC_ARG_WITH(trang,

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_client.h?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_client.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_client.h Fri Sep 19 14:30:45 2014
@@ -1081,20 +1081,15 @@ svn_client_create_context(svn_client_ctx
 /** @} end group: Client context management */
 
 /**
- * @name Authentication information file names
- *
- * Names of files that contain authentication information.
- *
- * These filenames are decided by libsvn_client, since this library
- * implements all the auth-protocols;  libsvn_wc does nothing but
- * blindly store and retrieve these files from protected areas.
- *
- * @defgroup clnt_auth_filenames Client authentication file names
- * @{
+ * @deprecated Provided for backward compatibility. This constant was never
+ * used in released versions.
  */
 #define SVN_CLIENT_AUTH_USERNAME            "username"
+/**
+ * @deprecated Provided for backward compatibility. This constant was never
+ * used in released versions.
+ */
 #define SVN_CLIENT_AUTH_PASSWORD            "password"
-/** @} group end: Authentication information file names */
 
 /** Client argument processing
  *

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_fs.h?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_fs.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_fs.h Fri Sep 19 14:30:45 2014
@@ -110,6 +110,13 @@ typedef struct svn_fs_t svn_fs_t;
  */
 #define SVN_FS_CONFIG_FSFS_CACHE_NS             "fsfs-cache-namespace"
 
+/** String with a decimal representation of the FSFS format shard size.
+ * Zero ("0") means that a repository with linear layout should be created.
+ *
+ * @since New in 1.9.
+ */
+#define SVN_FS_CONFIG_FSFS_SHARD_SIZE           "fsfs-shard-size"
+
 /* Note to maintainers: if you add further SVN_FS_CONFIG_FSFS_CACHE_* knobs,
    update fs_fs.c:verify_as_revision_before_current_plus_plus(). */
 

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_io.h?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_io.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_io.h Fri Sep 19 14:30:45 2014
@@ -1534,6 +1534,10 @@ typedef svn_error_t *
  * If the only "access" the returned stream gets is to close it
  * then @a open_func will only be called if @a open_on_close is TRUE.
  *
+ * Allocate the returned stream in @a result_pool. Also arrange for
+ * @a result_pool to be passed as the @c result_pool parameter to
+ * @a open_func when it is called.
+ *
  * @since New in 1.8.
  */
 svn_stream_t *

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_client/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_client/upgrade.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_client/upgrade.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_client/upgrade.c Fri Sep 19 14:30:45 2014
@@ -82,6 +82,14 @@ fetch_repos_info(const char **repos_root
   return SVN_NO_ERROR;
 }
 
+/* Forward definition. Upgrades svn:externals properties in the working copy
+   LOCAL_ABSPATH to the WC-NG  storage.
+ */
+static svn_error_t *
+upgrade_externals_from_properties(svn_client_ctx_t *ctx,
+                                  const char *local_abspath,
+                                  apr_pool_t *scratch_pool);
+
 svn_error_t *
 svn_client_upgrade(const char *path,
                    svn_client_ctx_t *ctx,
@@ -89,10 +97,6 @@ svn_client_upgrade(const char *path,
 {
   const char *local_abspath;
   apr_hash_t *externals;
-  apr_hash_index_t *hi;
-  apr_pool_t *iterpool;
-  apr_pool_t *iterpool2;
-  svn_opt_revision_t rev = {svn_opt_revision_unspecified, {0}};
   struct repos_info_baton info_baton;
 
   info_baton.state_pool = scratch_pool;
@@ -111,6 +115,80 @@ svn_client_upgrade(const char *path,
                          ctx->notify_func2, ctx->notify_baton2,
                          scratch_pool));
 
+  SVN_ERR(svn_wc__externals_defined_below(&externals,
+                                          ctx->wc_ctx, local_abspath,
+                                          scratch_pool, scratch_pool));
+
+  if (apr_hash_count(externals) > 0)
+    {
+      apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+      apr_hash_index_t *hi;
+
+      /* We are upgrading from >= 1.7. No need to upgrade from
+         svn:externals properties. And by that avoiding the removal
+         of recorded externals information (issue #4519)
+
+         Only directory externals need an explicit upgrade */
+      for (hi = apr_hash_first(scratch_pool, externals);
+           hi;
+           hi = apr_hash_next(hi))
+        {
+          const char *ext_abspath;
+          svn_node_kind_t kind;
+
+          svn_pool_clear(iterpool);
+
+          ext_abspath = apr_hash_this_key(hi);
+
+          SVN_ERR(svn_wc__read_external_info(&kind, NULL, NULL, NULL, NULL,
+                                             ctx->wc_ctx, local_abspath,
+                                             ext_abspath, FALSE,
+                                             iterpool, iterpool));
+
+          if (kind == svn_node_dir)
+            {
+              svn_error_t *err = svn_client_upgrade(ext_abspath, ctx, iterpool);
+
+              if (err)
+                {
+                  svn_wc_notify_t *notify =
+                            svn_wc_create_notify(ext_abspath,
+                                                 svn_wc_notify_failed_external,
+                                                 iterpool);
+                  notify->err = err;
+                  ctx->notify_func2(ctx->notify_baton2,
+                                    notify, iterpool);
+                  svn_error_clear(err);
+                  /* Next external node, please... */
+                }
+            }
+        }
+
+      svn_pool_destroy(iterpool);
+    }
+  else
+    {
+      /* Upgrading from <= 1.6, or no svn:properties defined.
+         (There is no way to detect the difference from libsvn_client :( ) */
+
+      SVN_ERR(upgrade_externals_from_properties(ctx, local_abspath,
+                                                scratch_pool));
+    }
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+upgrade_externals_from_properties(svn_client_ctx_t *ctx,
+                                  const char *local_abspath,
+                                  apr_pool_t *scratch_pool)
+{
+  apr_hash_index_t *hi;
+  apr_pool_t *iterpool;
+  apr_pool_t *iterpool2;
+  apr_hash_t *externals;
+  svn_opt_revision_t rev = {svn_opt_revision_unspecified, {0}};
+  struct repos_info_baton info_baton;
+
   /* Now it's time to upgrade the externals too. We do it after the wc
      upgrade to avoid that errors in the externals causes the wc upgrade to
      fail. Thanks to caching the performance penalty of walking the wc a
@@ -163,7 +241,7 @@ svn_client_upgrade(const char *path,
                                     iterpool);
       if (!err)
         err = svn_wc_parse_externals_description3(
-                  &externals_p, svn_dirent_dirname(path, iterpool),
+                  &externals_p, svn_dirent_dirname(local_abspath, iterpool),
                   external_desc->data, FALSE, iterpool);
       if (err)
         {

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c Fri Sep 19 14:30:45 2014
@@ -1432,12 +1432,14 @@ svn_fs_fs__create(svn_fs_t *fs,
 {
   int format = SVN_FS_FS__FORMAT_NUMBER;
   fs_fs_data_t *ffd = fs->fsap_data;
+  int shard_size = SVN_FS_FS_DEFAULT_MAX_FILES_PER_DIR;
 
   fs->path = apr_pstrdup(fs->pool, path);
-  /* See if compatibility with older versions was explicitly requested. */
+  /* Process the given filesystem config. */
   if (fs->config)
     {
       svn_version_t *compatible_version;
+      const char *shard_size_str;
       SVN_ERR(svn_fs__compatible_version(&compatible_version, fs->config,
                                          pool));
 
@@ -1467,12 +1469,22 @@ svn_fs_fs__create(svn_fs_t *fs,
 
           default:format = SVN_FS_FS__FORMAT_NUMBER;
         }
+
+      shard_size_str = svn_hash_gets(fs->config, SVN_FS_CONFIG_FSFS_SHARD_SIZE);
+      if (shard_size_str)
+        {
+          apr_int64_t val;
+          SVN_ERR(svn_cstring_strtoi64(&val, shard_size_str, 0,
+                                       APR_INT32_MAX, 10));
+
+          shard_size = (int) val;
+        }
     }
   ffd->format = format;
 
-  /* Override the default linear layout if this is a new-enough format. */
+  /* Use an appropriate sharding mode if supported by the format. */
   if (format >= SVN_FS_FS__MIN_LAYOUT_FORMAT_OPTION_FORMAT)
-    ffd->max_files_per_dir = SVN_FS_FS_DEFAULT_MAX_FILES_PER_DIR;
+    ffd->max_files_per_dir = shard_size;
 
   /* Create the revision data directories. */
   if (ffd->max_files_per_dir)

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/transaction.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/transaction.c Fri Sep 19 14:30:45 2014
@@ -3083,10 +3083,10 @@ commit_body(void *baton, apr_pool_t *poo
   trailer
     = svn_fs_fs__unparse_revision_trailer
               ((apr_off_t)svn_fs_fs__id_item(new_root_id),
-                changed_path_offset,
-                pool);
+               changed_path_offset,
+               pool);
   SVN_ERR(svn_io_file_write_full(proto_file, trailer->data, trailer->len,
-                                  NULL, pool));
+                                 NULL, pool));
 
   SVN_ERR(svn_io_file_flush_to_disk(proto_file, pool));
   SVN_ERR(svn_io_file_close(proto_file, pool));

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/util.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/util.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/util.c Fri Sep 19 14:30:45 2014
@@ -412,7 +412,6 @@ svn_fs_fs__read_current(svn_revnum_t *re
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   svn_stringbuf_t *content;
-  const char *str;
 
   SVN_ERR(svn_fs_fs__read_content(&content,
                                   svn_fs_fs__path_current(fs, pool),
@@ -420,16 +419,20 @@ svn_fs_fs__read_current(svn_revnum_t *re
 
   if (ffd->format >= SVN_FS_FS__MIN_NO_GLOBAL_IDS_FORMAT)
     {
-      SVN_ERR(svn_revnum_parse(rev, content->data, &str));
-      if (*str != '\n')
-        return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,
-                                _("Corrupt 'current' file"));
+      /* When format 1 and 2 filesystems are upgraded, the 'current' file is
+         left intact.  As a consequence, there is a window when a filesystem
+         has a new format, but this file still contains the IDs left from an
+         old format, i.e. looks like "359 j5 v\n".  Do not be too strict here
+         and only expect a parseable revision number. */
+      SVN_ERR(svn_revnum_parse(rev, content->data, NULL));
 
       *next_node_id = 0;
       *next_copy_id = 0;
     }
   else
     {
+      const char *str;
+
       SVN_ERR(svn_revnum_parse(rev, content->data, &str));
       if (*str != ' ')
         return svn_error_create(SVN_ERR_FS_CORRUPT, NULL,

Propchange: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/libsvn_fs_x:r1620575-1626219

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/cached_data.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/cached_data.c Fri Sep 19 14:30:45 2014
@@ -3116,7 +3116,7 @@ block_read(void **result,
               key.revision = svn_fs_x__get_revnum(entry->items[0].change_set);
               key.second = entry->items[0].number;
 
-              SVN_ERR(svn_io_file_seek(revision_file, SEEK_SET,
+              SVN_ERR(svn_io_file_seek(revision_file, APR_SET,
                                        &entry->offset, iterpool));
               switch (entry->type)
                 {

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/index.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/index.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/index.c Fri Sep 19 14:30:45 2014
@@ -200,7 +200,7 @@ stream_error_create(packed_number_stream
   apr_off_t offset = 0;
   SVN_ERR(svn_io_file_name_get(&file_name, stream->file,
                                stream->pool));
-  SVN_ERR(svn_io_file_seek(stream->file, SEEK_CUR, &offset, stream->pool));
+  SVN_ERR(svn_io_file_seek(stream->file, APR_CUR, &offset, stream->pool));
 
   return svn_error_createf(err, NULL, message, file_name,
                            (apr_uint64_t)offset);

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/pack.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/pack.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/pack.c Fri Sep 19 14:30:45 2014
@@ -483,7 +483,7 @@ copy_item_to_temp(pack_context_t *contex
   svn_fs_x__p2l_entry_t *new_entry
     = svn_fs_x__p2l_entry_dup(entry, context->info_pool);
   new_entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(temp_file, SEEK_CUR, &new_entry->offset, pool));
+  SVN_ERR(svn_io_file_seek(temp_file, APR_CUR, &new_entry->offset, pool));
   APR_ARRAY_PUSH(entries, svn_fs_x__p2l_entry_t *) = new_entry;
   
   SVN_ERR(copy_file_data(context, temp_file, rev_file, entry->size, pool));
@@ -573,7 +573,7 @@ copy_rep_to_temp(pack_context_t *context
    * store it in CONTEXT */
   entry = svn_fs_x__p2l_entry_dup(entry, context->info_pool);
   entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(context->reps_file, SEEK_CUR, &entry->offset,
+  SVN_ERR(svn_io_file_seek(context->reps_file, APR_CUR, &entry->offset,
                            pool));
   add_item_rep_mapping(context, entry);
 
@@ -596,7 +596,7 @@ copy_rep_to_temp(pack_context_t *context
     }
 
   /* copy the whole rep (including header!) to our temp file */
-  SVN_ERR(svn_io_file_seek(rev_file, SEEK_SET, &source_offset, pool));
+  SVN_ERR(svn_io_file_seek(rev_file, APR_SET, &source_offset, pool));
   SVN_ERR(copy_file_data(context, context->reps_file, rev_file, entry->size,
                          pool));
 
@@ -699,12 +699,12 @@ copy_node_to_temp(pack_context_t *contex
    * store it in CONTEXT */
   entry = svn_fs_x__p2l_entry_dup(entry, context->info_pool);
   entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(context->reps_file, SEEK_CUR,
+  SVN_ERR(svn_io_file_seek(context->reps_file, APR_CUR,
                            &entry->offset, pool));
   add_item_rep_mapping(context, entry);
 
   /* copy the noderev to our temp file */
-  SVN_ERR(svn_io_file_seek(rev_file, SEEK_SET, &source_offset, pool));
+  SVN_ERR(svn_io_file_seek(rev_file, APR_SET, &source_offset, pool));
   SVN_ERR(copy_file_data(context, context->reps_file, rev_file, entry->size,
                          pool));
 
@@ -1245,7 +1245,7 @@ write_reps_container(pack_context_t *con
 
   SVN_ERR(svn_fs_x__write_reps_container(pack_stream, container, pool));
   SVN_ERR(svn_stream_close(pack_stream));
-  SVN_ERR(svn_io_file_seek(context->pack_file, SEEK_CUR, &offset, pool));
+  SVN_ERR(svn_io_file_seek(context->pack_file, APR_CUR, &offset, pool));
 
   container_entry.offset = context->pack_offset;
   container_entry.size = offset - container_entry.offset;
@@ -1327,7 +1327,7 @@ write_reps_containers(pack_context_t *co
 
       /* select the change list in the source file, parse it and add it to
        * the container */
-      SVN_ERR(svn_io_file_seek(temp_file, SEEK_SET, &entry->offset,
+      SVN_ERR(svn_io_file_seek(temp_file, APR_SET, &entry->offset,
                                iterpool));
       SVN_ERR(svn_fs_x__get_representation_length(&representation.size,
                                              &representation.expanded_size,
@@ -1414,7 +1414,7 @@ store_items(pack_context_t *context,
 
       /* select the item in the source file and copy it into the target
        * pack file */
-      SVN_ERR(svn_io_file_seek(temp_file, SEEK_SET, &entry->offset,
+      SVN_ERR(svn_io_file_seek(temp_file, APR_SET, &entry->offset,
                                iterpool));
       SVN_ERR(copy_file_data(context, context->pack_file, temp_file,
                              entry->size, iterpool));
@@ -1558,7 +1558,7 @@ write_changes_container(pack_context_t *
                                              container,
                                              pool));
   SVN_ERR(svn_stream_close(pack_stream));
-  SVN_ERR(svn_io_file_seek(context->pack_file, SEEK_CUR, &offset, pool));
+  SVN_ERR(svn_io_file_seek(context->pack_file, APR_CUR, &offset, pool));
 
   container_entry.offset = context->pack_offset;
   container_entry.size = offset - container_entry.offset;
@@ -1654,7 +1654,7 @@ write_changes_containers(pack_context_t 
 
       /* select the change list in the source file, parse it and add it to
        * the container */
-      SVN_ERR(svn_io_file_seek(temp_file, SEEK_SET, &entry->offset,
+      SVN_ERR(svn_io_file_seek(temp_file, APR_SET, &entry->offset,
                                iterpool));
       SVN_ERR(svn_fs_x__read_changes(&changes, temp_stream, iterpool));
       SVN_ERR(svn_fs_x__changes_append_list(&list_index, container, changes));
@@ -1880,7 +1880,7 @@ pack_range(pack_context_t *context,
               offset = entry->offset;
               if (offset < finfo.size)
                 {
-                  SVN_ERR(svn_io_file_seek(rev_file, SEEK_SET, &offset,
+                  SVN_ERR(svn_io_file_seek(rev_file, APR_SET, &offset,
                                            iterpool));
 
                   if (entry->type == SVN_FS_X__ITEM_TYPE_CHANGES)

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/transaction.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/transaction.c Fri Sep 19 14:30:45 2014
@@ -1513,7 +1513,7 @@ allocate_item_index(apr_uint64_t *item_i
   to_write = svn__ui64toa(buffer, *item_index + 1);
 
   /* write it back to disk */
-  SVN_ERR(svn_io_file_seek(file, SEEK_SET, &offset, pool));
+  SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, pool));
   SVN_ERR(svn_io_file_write_full(file, buffer, to_write, NULL, pool));
   SVN_ERR(svn_io_file_close(file, pool));
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/io.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/io.c Fri Sep 19 14:30:45 2014
@@ -3662,7 +3662,7 @@ svn_io_file_aligned_seek(apr_file_t *fil
          buffer and no I/O will actually happen in the FILL_BUFFER
          section below.
        */
-      SVN_ERR(svn_io_file_seek(file, SEEK_CUR, &current, pool));
+      SVN_ERR(svn_io_file_seek(file, APR_CUR, &current, pool));
       fill_buffer = aligned_offset + file_buffer_size <= current
                  || current <= aligned_offset;
     }
@@ -3673,7 +3673,7 @@ svn_io_file_aligned_seek(apr_file_t *fil
       apr_status_t status;
 
       /* seek to the start of the block and cause APR to read 1 block */
-      SVN_ERR(svn_io_file_seek(file, SEEK_SET, &aligned_offset, pool));
+      SVN_ERR(svn_io_file_seek(file, APR_SET, &aligned_offset, pool));
       status = apr_file_getc(&dummy, file);
 
       /* read may fail if we seek to or behind EOF.  That's ok then. */
@@ -3686,7 +3686,7 @@ svn_io_file_aligned_seek(apr_file_t *fil
 
   /* finally, seek to the OFFSET the caller wants */
   desired_offset = offset;
-  SVN_ERR(svn_io_file_seek(file, SEEK_SET, &offset, pool));
+  SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, pool));
   if (desired_offset != offset)
     return do_io_file_wrapper_cleanup(file, APR_EOF,
                                       N_("Can't seek in file '%s'"),

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/externals.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/externals.c Fri Sep 19 14:30:45 2014
@@ -943,29 +943,62 @@ close_edit(void *edit_baton,
 {
   struct edit_baton *eb = edit_baton;
 
-  if (!eb->file_closed
-      || eb->iprops)
+  if (!eb->file_closed)
     {
-      apr_hash_t *wcroot_iprops = NULL;
+      /* The file wasn't updated, but its url or revision might have...
+         e.g. switch between branches for relative externals.
 
-      if (eb->iprops)
-        {
-          wcroot_iprops = apr_hash_make(pool);
-          svn_hash_sets(wcroot_iprops, eb->local_abspath, eb->iprops);
-        }
-
-      /* The node wasn't updated, so we just have to bump its revision */
-      SVN_ERR(svn_wc__db_op_bump_revisions_post_update(eb->db,
-                                                       eb->local_abspath,
-                                                       svn_depth_infinity,
-                                                       NULL, NULL, NULL,
-                                                       *eb->target_revision,
-                                                       apr_hash_make(pool),
-                                                       wcroot_iprops,
-                                                       TRUE /* empty update */,
-                                                       eb->notify_func,
-                                                       eb->notify_baton,
-                                                       pool));
+         Just bump the information as that is just as expensive as
+         investigating when we should and shouldn't update it...
+         and avoid hard to debug edge cases */
+
+      svn_node_kind_t kind;
+      const char *old_repos_relpath;
+      svn_revnum_t changed_rev;
+      apr_time_t changed_date;
+      const char *changed_author;
+      const svn_checksum_t *checksum;
+      apr_hash_t *pristine_props;
+      const char *repos_relpath = svn_uri_skip_ancestor(eb->repos_root_url,
+                                                        eb->url, pool);
+
+      SVN_ERR(svn_wc__db_base_get_info(NULL, &kind, NULL, &old_repos_relpath,
+                                       NULL, NULL, &changed_rev, &changed_date,
+                                       &changed_author, NULL, &checksum, NULL,
+                                       NULL, NULL, &pristine_props, NULL,
+                                       eb->db, eb->local_abspath,
+                                       pool, pool));
+
+      if (kind != svn_node_file)
+        return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+                                   _("Node '%s' is no existing file external"),
+                                   svn_dirent_local_style(eb->local_abspath,
+                                                          pool));
+
+      SVN_ERR(svn_wc__db_external_add_file(
+                    eb->db,
+                    eb->local_abspath,
+                    eb->wri_abspath,
+                    repos_relpath,
+                    eb->repos_root_url,
+                    eb->repos_uuid,
+                    *eb->target_revision,
+                    pristine_props,
+                    eb->iprops,
+                    eb->changed_rev,
+                    eb->changed_date,
+                    eb->changed_author,
+                    checksum,
+                    NULL /* clear dav props */,
+                    eb->record_ancestor_abspath,
+                    eb->recorded_repos_relpath,
+                    eb->recorded_peg_revision,
+                    eb->recorded_revision,
+                    FALSE, NULL,
+                    TRUE /* keep_recorded_info */,
+                    NULL /* conflict_skel */,
+                    NULL /* work_items */,
+                    pool));
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/remove-log-addressing/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn/svn.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/svn/svn.c (original)
+++ subversion/branches/remove-log-addressing/subversion/svn/svn.c Fri Sep 19 14:30:45 2014
@@ -1505,9 +1505,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "                  another Subversion client modifying the working copy\n"
      "      ' ' not locked for writing\n"
      "      'L' locked for writing\n"
-     "    Fourth column: Scheduled commit will contain addition-with-history\n"
-     "      ' ' no history scheduled with commit\n"
-     "      '+' history scheduled with commit\n"
+     "    Fourth column: Scheduled commit will create a copy (addition-with-history)\n"
+     "      ' ' no history scheduled with commit (item was newly added)\n"
+     "      '+' history scheduled with commit (item was copied)\n"
      "    Fifth column: Whether the item is switched or a file external\n"
      "      ' ' normal\n"
      "      'S' the item has a Switched URL relative to the parent\n"

Modified: subversion/branches/remove-log-addressing/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svnmucc/svnmucc.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/remove-log-addressing/subversion/svnmucc/svnmucc.c Fri Sep 19 14:30:45 2014
@@ -251,14 +251,21 @@ sanitize_url(const char *url,
   return svn_uri_canonicalize(url, pool);
 }
 
+static void
+usage(apr_pool_t *pool)
+{
+  svn_error_clear(svn_cmdline_fprintf
+                  (stderr, pool, _("Type 'svnmucc --help' for usage.\n")));
+}
+
 /* Print a usage message on STREAM. */
 static void
-usage(FILE *stream, apr_pool_t *pool)
+help(FILE *stream, apr_pool_t *pool)
 {
   svn_error_clear(svn_cmdline_fputs(
     _("usage: svnmucc ACTION...\n"
       "Subversion multiple URL command client.\n"
-      "Type 'svnmucc --version' to see the program version.\n"
+      "Type 'svnmucc --version' to see the program version and RA modules.\n"
       "\n"
       "  Perform one or more Subversion repository URL-based ACTIONs, committing\n"
       "  the result as a (single) new revision.\n"
@@ -308,7 +315,7 @@ insufficient(void)
 }
 
 static svn_error_t *
-display_version(apr_getopt_t *os, apr_pool_t *pool)
+display_version(apr_pool_t *pool)
 {
   const char *ra_desc_start
     = "The following repository access (RA) modules are available:\n\n";
@@ -317,7 +324,7 @@ display_version(apr_getopt_t *os, apr_po
   version_footer = svn_stringbuf_create(ra_desc_start, pool);
   SVN_ERR(svn_ra_print_modules(version_footer, pool));
 
-  SVN_ERR(svn_opt_print_help4(os, "svnmucc", TRUE, FALSE, FALSE,
+  SVN_ERR(svn_opt_print_help4(NULL, "svnmucc", TRUE, FALSE, FALSE,
                               version_footer->data,
                               NULL, NULL, NULL, NULL, NULL, pool));
 
@@ -487,6 +494,8 @@ sub_main(int *exit_code, int argc, const
   svn_boolean_t force_interactive = FALSE;
   svn_boolean_t trust_server_cert = FALSE;
   svn_boolean_t no_auth_cache = FALSE;
+  svn_boolean_t show_version = FALSE;
+  svn_boolean_t show_help = FALSE;
   svn_revnum_t base_revision = SVN_INVALID_REVNUM;
   apr_array_header_t *action_args;
   apr_hash_t *revprops = apr_hash_make(pool);
@@ -514,7 +523,11 @@ sub_main(int *exit_code, int argc, const
       if (APR_STATUS_IS_EOF(status))
         break;
       if (status != APR_SUCCESS)
-        return svn_error_wrap_apr(status, "getopt failure");
+        {
+          usage(pool);
+          *exit_code = EXIT_FAILURE;
+          return SVN_NO_ERROR;
+        }
       switch(opt)
         {
         case 'm':
@@ -582,15 +595,27 @@ sub_main(int *exit_code, int argc, const
           no_auth_cache = TRUE;
           break;
         case version_opt:
-          SVN_ERR(display_version(opts, pool));
-          return SVN_NO_ERROR;
+          show_version = TRUE;
+          break;
         case 'h':
         case '?':
-          usage(stdout, pool);
-          return SVN_NO_ERROR;
+          show_help = TRUE;
+          break;
         }
     }
 
+  if (show_help)
+    {
+      help(stdout, pool);
+      return SVN_NO_ERROR;
+    }
+
+  if (show_version)
+    {
+      SVN_ERR(display_version(pool));
+      return SVN_NO_ERROR;
+    }
+
   if (non_interactive && force_interactive)
     {
       return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
@@ -711,7 +736,7 @@ sub_main(int *exit_code, int argc, const
       else if (! strcmp(action_string, "?") || ! strcmp(action_string, "h")
                || ! strcmp(action_string, "help"))
         {
-          usage(stdout, pool);
+          help(stdout, pool);
           return SVN_NO_ERROR;
         }
       else
@@ -872,7 +897,7 @@ sub_main(int *exit_code, int argc, const
   if (! actions->nelts)
     {
       *exit_code = EXIT_FAILURE;
-      usage(stderr, pool);
+      help(stderr, pool);
       return SVN_NO_ERROR;
     }
 

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/externals_tests.py?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/externals_tests.py Fri Sep 19 14:30:45 2014
@@ -3228,7 +3228,6 @@ def update_dir_external_shallow(sbox):
                                         sbox.ospath('A/B/E'))
 
 @Issue(4411)
-@XFail()
 def switch_parent_relative_file_external(sbox):
   "switch parent-relative file external"
 
@@ -3444,6 +3443,41 @@ def update_deletes_file_external(sbox):
   sbox.simple_update()
   
 
+@Issue(4519)
+def switch_relative_externals(sbox):
+  "switch relative externals"
+
+  sbox.build(create_wc=False)
+
+  svntest.actions.run_and_verify_svnmucc(None, None, [],
+                                         '-U', sbox.repo_url, '-m', 'Q',
+                                         'mkdir', 'branches',
+                                         'cp', '1', 'A', 'trunk',
+                                         'cp', '1', 'A', 'branches/A',
+                                         'propset', 'svn:externals',
+                                            '../C dirExC\n ../mu fileExMu',
+                                            'trunk/B',
+                                         'propset', 'svn:externals',
+                                            '../C dirExC\n ../mu fileExMu',
+                                            'branches/A/B')
+
+  wc = sbox.add_wc_path('wc')
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'co', sbox.repo_url + '/trunk', wc)
+
+  # This forgets to update some externals data
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'switch', sbox.repo_url + '/branches/A', wc)
+
+  # This upgrade makes the following update fail
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'upgrade', wc)
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'up', wc)
+
+
 ########################################################################
 # Run the tests
 
@@ -3500,7 +3534,8 @@ test_list = [ None,
               file_external_unversioned_obstruction,
               file_external_versioned_obstruction,
               update_external_peg_rev,
-              update_deletes_file_external
+              update_deletes_file_external,
+              switch_relative_externals,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py Fri Sep 19 14:30:45 2014
@@ -2829,6 +2829,20 @@ def freeze_same_uuid(sbox):
                                           sys.executable, '-c', 'True')
 
 
+@Skip(svntest.main.is_fs_type_fsx)
+def upgrade(sbox):
+  "upgrade --compatible-version=1.3"
+
+  sbox.build(create_wc=False, minor_version=3)
+  svntest.actions.run_and_verify_svnadmin(None, None, [], "upgrade",
+                                          sbox.repo_dir)
+  # Does the repository work after upgrade?
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
+                                     'Committed revision 2.\n'], [], 'mkdir',
+                                     '-m', svntest.main.make_log_msg(),
+                                     sbox.repo_url + '/dir')
+
+
 ########################################################################
 # Run the tests
 
@@ -2881,6 +2895,7 @@ test_list = [ None,
               fsfs_hotcopy_progress_with_revprop_changes,
               fsfs_hotcopy_progress_old,
               freeze_same_uuid,
+              upgrade,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Fri Sep 19 14:30:45 2014
@@ -50,46 +50,6 @@ ignore_fs_warnings(void *baton, svn_erro
   return;
 }
 
-/* Write the format number and maximum number of files per directory
-   to a new format file in PATH, overwriting a previously existing
-   file.  Use POOL for temporary allocation.
-
-   (This implementation is largely stolen from libsvn_fs_fs/fs_fs.c.) */
-static svn_error_t *
-write_format(const char *path,
-             int format,
-             int max_files_per_dir,
-             apr_pool_t *pool)
-{
-  const char *contents;
-
-  path = svn_dirent_join(path, "format", pool);
-
-  if (format >= SVN_FS_FS__MIN_LAYOUT_FORMAT_OPTION_FORMAT)
-    {
-      if (max_files_per_dir)
-        contents = apr_psprintf(pool,
-                                "%d\n"
-                                "layout sharded %d\n",
-                                format, max_files_per_dir);
-      else
-        contents = apr_psprintf(pool,
-                                "%d\n"
-                                "layout linear\n",
-                                format);
-    }
-  else
-    {
-      contents = apr_psprintf(pool, "%d\n", format);
-    }
-
-  SVN_ERR(svn_io_write_atomic(path, contents, strlen(contents),
-                              NULL /* copy perms */, pool));
-
-  /* And set the perms to make it read only */
-  return svn_io_set_file_read_only(path, FALSE, pool);
-}
-
 /* Return the expected contents of "iota" in revision REV. */
 static const char *
 get_rev_contents(svn_revnum_t rev, apr_pool_t *pool)
@@ -158,7 +118,7 @@ create_packed_filesystem(const char *dir
   apr_pool_t *subpool = svn_pool_create(pool);
   struct pack_notify_baton pnb;
   apr_pool_t *iterpool;
-  int version;
+  apr_hash_t *fs_config;
 
   /* Bail (with success) on known-untestable scenarios */
   if (strcmp(opts->fs_type, "fsfs") != 0)
@@ -169,25 +129,12 @@ create_packed_filesystem(const char *dir
     return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
                             "pre-1.6 SVN doesn't support FSFS packing");
 
-  /* Create a filesystem, then close it */
-  SVN_ERR(svn_test__create_fs(&fs, dir, opts, subpool));
-  svn_pool_destroy(subpool);
-
-  subpool = svn_pool_create(pool);
-
-  /* Rewrite the format file.  (The rest of this function is backend-agnostic,
-     so we just avoid adding the FSFS-specific format information if we run on
-     some other backend.) */
-  if ((strcmp(opts->fs_type, "fsfs") == 0))
-    {
-      SVN_ERR(svn_io_read_version_file(&version,
-                                       svn_dirent_join(dir, "format", subpool),
-                                       subpool));
-      SVN_ERR(write_format(dir, version, shard_size, subpool));
-    }
+  fs_config = apr_hash_make(pool);
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_SHARD_SIZE,
+                apr_itoa(pool, shard_size));
 
-  /* Reopen the filesystem */
-  SVN_ERR(svn_fs_open2(&fs, dir, NULL, subpool, subpool));
+  /* Create a filesystem. */
+  SVN_ERR(svn_test__create_fs2(&fs, dir, opts, fs_config, subpool));
 
   /* Revision 1: the Greek tree */
   SVN_ERR(svn_fs_begin_txn(&txn, fs, 0, subpool));
@@ -334,8 +281,8 @@ pack_filesystem(const svn_test_opts_t *o
       SVN_ERR(svn_io_check_path(path, &kind, pool));
       if (kind != svn_node_file)
         return svn_error_createf(SVN_ERR_FS_GENERAL, NULL,
-                                  "Expected manifest file '%s' not found",
-                                  path);
+                                 "Expected manifest file '%s' not found",
+                                 path);
 
       /* This directory should not exist. */
       path = svn_dirent_join_many(pool, REPO_NAME, "revs",

Modified: subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/io-test.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/io-test.c Fri Sep 19 14:30:45 2014
@@ -561,7 +561,7 @@ aligned_seek(apr_file_t *file,
 
   /* we must be at the desired offset */
   current = 0;
-  SVN_ERR(svn_io_file_seek(file, SEEK_CUR, &current, pool));
+  SVN_ERR(svn_io_file_seek(file, APR_CUR, &current, pool));
   SVN_TEST_ASSERT(current == (apr_off_t)offset);
 
   return SVN_NO_ERROR;

Modified: subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.c?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.c Fri Sep 19 14:30:45 2014
@@ -104,10 +104,14 @@ create_fs(svn_fs_t **fs_p,
           const char *name,
           const char *fs_type,
           int server_minor_version,
+          apr_hash_t *overlay_fs_config,
           apr_pool_t *pool)
 {
   apr_hash_t *fs_config = make_fs_config(fs_type, server_minor_version, pool);
 
+  if (overlay_fs_config)
+    fs_config = apr_hash_overlay(pool, overlay_fs_config, fs_config);
+
   /* If there's already a repository named NAME, delete it.  Doing
      things this way means that repositories stick around after a
      failure for postmortem analysis, but also that tests can be
@@ -172,20 +176,21 @@ svn_test__create_bdb_fs(svn_fs_t **fs_p,
                         const svn_test_opts_t *opts,
                         apr_pool_t *pool)
 {
-  return create_fs(fs_p, name, "bdb", opts->server_minor_version, pool);
+  return create_fs(fs_p, name, "bdb", opts->server_minor_version, NULL, pool);
 }
 
 
 svn_error_t *
-svn_test__create_fs(svn_fs_t **fs_p,
-                    const char *name,
-                    const svn_test_opts_t *opts,
-                    apr_pool_t *pool)
+svn_test__create_fs2(svn_fs_t **fs_p,
+                     const char *name,
+                     const svn_test_opts_t *opts,
+                     apr_hash_t *fs_config,
+                     apr_pool_t *pool)
 {
   svn_boolean_t must_reopen;
 
-  SVN_ERR(create_fs(fs_p, name, opts->fs_type,
-                    opts->server_minor_version, pool));
+  SVN_ERR(create_fs(fs_p, name, opts->fs_type, opts->server_minor_version,
+                    fs_config, pool));
 
   SVN_ERR(maybe_install_fs_conf(*fs_p, opts, &must_reopen, pool));
   if (must_reopen)
@@ -197,6 +202,14 @@ svn_test__create_fs(svn_fs_t **fs_p,
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_test__create_fs(svn_fs_t **fs_p,
+                    const char *name,
+                    const svn_test_opts_t *opts,
+                    apr_pool_t *pool)
+{
+  return svn_test__create_fs2(fs_p, name, opts, NULL, pool);
+}
 
 svn_error_t *
 svn_test__create_repos(svn_repos_t **repos_p,

Modified: subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.h?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.h (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/svn_test_fs.h Fri Sep 19 14:30:45 2014
@@ -57,7 +57,16 @@ svn_test__create_bdb_fs(svn_fs_t **fs_p,
 
 
 /* Create a filesystem based on OPTS in a subdir NAME and return a new
-   FS object which points to it.  */
+   FS object which points to it.  Override the default test filesystem
+   config with values from FS_CONFIG. */
+svn_error_t *
+svn_test__create_fs2(svn_fs_t **fs_p,
+                     const char *name,
+                     const svn_test_opts_t *opts,
+                     apr_hash_t *fs_config,
+                     apr_pool_t *pool);
+
+/* The same as svn_test__create_fs2() but with FS_CONFIG set to NULL. */
 svn_error_t *
 svn_test__create_fs(svn_fs_t **fs_p,
                     const char *name,

Modified: subversion/branches/remove-log-addressing/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/tools/dev/unix-build/Makefile.svn?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/remove-log-addressing/tools/dev/unix-build/Makefile.svn Fri Sep 19 14:30:45 2014
@@ -72,7 +72,7 @@ APR_VER		= 1.5.1
 APR_ICONV_VER	= 1.2.1
 GNU_ICONV_VER	= 1.14
 APR_UTIL_VER	= 1.5.3
-HTTPD_VER	= 2.2.27
+HTTPD_VER	= 2.2.29
 NEON_VER	= 0.30.0
 SERF_VER	= 1.3.7
 SERF_OLD_VER	= 0.3.1
@@ -91,7 +91,7 @@ GNU_ICONV_DIST	= libiconv-$(GNU_ICONV_VE
 NEON_DIST	= neon-$(NEON_VER).tar.gz
 SQLITE_DIST	= sqlite-autoconf-$(SQLITE_VER).tar.gz
 CYRUS_SASL_DIST	= cyrus-sasl-$(CYRUS_SASL_VER).tar.gz
-HTTPD_DIST	= httpd-$(HTTPD_VER).tar.bz2
+HTTPD_DIST	= httpd-$(HTTPD_VER).tar.gz
 LIBMAGIC_DIST	= file-$(LIBMAGIC_VER).tar.gz
 RUBY_DIST	= ruby-$(RUBY_VER).tar.gz
 BZ2_DIST	= bzip2-$(BZ2_VER).tar.gz
@@ -102,7 +102,7 @@ GETTEXT_DIST	= gettext-$(GETTEXT_VER).ta
 SHA256_${BDB_DIST} = f14fd96dd38915a1d63dcb94a63fbb8092334ceba6b5060760427096f631263e
 SHA256_${APR_ICONV_DIST} = 19381959d50c4a5f3b9c84d594a5f9ffb3809786919b3058281f4c87e1f4b245
 SHA256_${GNU_ICONV_DIST} = 72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613
-SHA256_${HTTPD_DIST} = 205973ded6ca55c056ce9c84d73ab708f7829f330193bd39b651463b8d4f8147
+SHA256_${HTTPD_DIST} = cec2878884b758b0d159a1385b2667a2ae0ca21b0bc7bcc8a9a41b5cfa5452ff
 SHA256_${NEON_DIST} = 2962cfcb5d30f3272e3d2fa0e473434419770a3801afe3d46e5d1650787990c2
 SHA256_${CYRUS_SASL_DIST} = 418c16e6240a4f9b637cbe3d62937b9675627bad27c622191d47de8686fe24fe
 SHA256_${SQLITE_DIST} = 98c33abe4106e508e73fda648b2657ac9e969fe24695f543dcde68cc71f3091b
@@ -626,7 +626,7 @@ $(HTTPD_OBJDIR)/.retrieved: $(DISTDIR)/$
 	$(HTTPD_OBJDIR)/chil-engine.diff
 	$(call do_check_sha256,$(HTTPD_DIST))
 	[ -d $(HTTPD_OBJDIR) ] || mkdir -p $(HTTPD_OBJDIR)
-	tar -C $(SRCDIR) -jxf $(DISTDIR)/$(HTTPD_DIST)
+	tar -C $(SRCDIR) -zxf $(DISTDIR)/$(HTTPD_DIST)
 	cd $(HTTPD_SRCDIR) && patch -p0 < $(HTTPD_OBJDIR)/chil-engine.diff
 	cp $(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h \
 		$(HTTPD_SRCDIR)/modules/ssl/ssl_toolkit_compat.h.orig

Modified: subversion/branches/remove-log-addressing/tools/server-side/svnpredumpfilter.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/tools/server-side/svnpredumpfilter.py?rev=1626236&r1=1626235&r2=1626236&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/tools/server-side/svnpredumpfilter.py (original)
+++ subversion/branches/remove-log-addressing/tools/server-side/svnpredumpfilter.py Fri Sep 19 14:30:45 2014
@@ -38,6 +38,10 @@ Use the default ordering of revisions (t
 Return errorcode 0 if there are no additional dependencies found, 1 if
 there were; any other errorcode indicates a fatal error.
 
+Paths in mergeinfo are not considered as additional dependencies so the
+--skip-missing-merge-sources option of 'svndumpfilter' may be required
+for successful filtering with the resulting path list.
+
 Options:
 
    --help (-h)           Show this usage message and exit.
@@ -68,7 +72,7 @@ def sanitize_path(path):
 def subsumes(path, maybe_child):
   if path == maybe_child:
     return True
-  if maybe_child.find(path + '/') == 0:
+  if maybe_child.startswith(path + '/'):
     return True
   return False
 
@@ -117,20 +121,35 @@ def log(msg, min_verbosity):
 
 class DependencyTracker:
   def __init__(self, include_paths):
-    self.include_paths = include_paths[:]
-    self.dependent_paths = []
+    self.include_paths = set(include_paths)
+    self.dependent_paths = set()
 
   def path_included(self, path):
-    for include_path in self.include_paths + self.dependent_paths:
+    for include_path in self.include_paths | self.dependent_paths:
       if subsumes(include_path, path):
         return True
     return False
 
-  def handle_changes(self, path_copies):
-    for path, copyfrom_path in path_copies.items():
-      if self.path_included(path) and copyfrom_path:
-        if not self.path_included(copyfrom_path):
-          self.dependent_paths.append(copyfrom_path)
+  def include_missing_copies(self, path_copies):
+    while True:
+      log("Cross-checking %d included paths with %d copies "
+          "for missing path dependencies..." % (
+            len(self.include_paths) + len(self.dependent_paths),
+            len(path_copies)),
+          1)
+      included_copies = []
+      for path, copyfrom_path in path_copies:
+        if self.path_included(path):
+          log("Adding copy '%s' -> '%s'" % (copyfrom_path, path), 1)
+          self.dependent_paths.add(copyfrom_path)
+          included_copies.append((path, copyfrom_path))
+      if not included_copies:
+        log("Found all missing path dependencies", 1)
+        break
+      for path, copyfrom_path in included_copies:
+        path_copies.remove((path, copyfrom_path))
+      log("Found %d new copy dependencies, need to re-check for more"
+        % len(included_copies), 1)
 
 def readline(stream):
   line = stream.readline()
@@ -151,7 +170,7 @@ def svn_log_stream_get_dependencies(stre
   line_buf = None
   last_revision = 0
   eof = False
-  path_copies = {}
+  path_copies = set()
   found_changed_path = False
 
   while not eof:
@@ -195,16 +214,15 @@ def svn_log_stream_get_dependencies(stre
         except EOFError:
           eof = True
           break
-        match = action_re.search(line)
+        match = copy_action_re.search(line)
         if match:
           found_changed_path = True
-          match = copy_action_re.search(line)
-          if match:
-            path_copies[sanitize_path(match.group(1))] = \
-              sanitize_path(match.group(2))
+          path_copies.add((sanitize_path(match.group(1)),
+                           sanitize_path(match.group(2))))
+        elif action_re.search(line):
+          found_changed_path = True
         else:
           break
-      dt.handle_changes(path_copies)
 
     # Finally, skip any log message lines.  (If there are none,
     # remember the last line we read, because it probably has
@@ -221,6 +239,7 @@ def svn_log_stream_get_dependencies(stre
                          "'svn log' with the --verbose (-v) option when "
                          "generating the input to this script?")
 
+  dt.include_missing_copies(path_copies)
   return dt
 
 def analyze_logs(included_paths):