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/08/12 11:42:38 UTC

svn commit: r1617440 [1/2] - in /subversion/branches/remove-log-addressing: ./ build/generator/ subversion/ subversion/bindings/swig/python/libsvn_swig_py/ subversion/include/ subversion/include/private/ subversion/libsvn_fs/ subversion/libsvn_fs_fs/ s...

Author: ivan
Date: Tue Aug 12 09:42:36 2014
New Revision: 1617440

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

Added:
    subversion/branches/remove-log-addressing/subversion/include/private/svn_cert.h
      - copied unchanged from r1617438, subversion/trunk/subversion/include/private/svn_cert.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs/deprecated.c
      - copied unchanged from r1617438, subversion/trunk/subversion/libsvn_fs/deprecated.c
Modified:
    subversion/branches/remove-log-addressing/   (props changed)
    subversion/branches/remove-log-addressing/CHANGES
    subversion/branches/remove-log-addressing/build.conf
    subversion/branches/remove-log-addressing/build/generator/gen_win_dependencies.py
    subversion/branches/remove-log-addressing/configure.ac
    subversion/branches/remove-log-addressing/get-deps.sh
    subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
    subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs/access.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs/editor.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs/fs-loader.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.h
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/tree.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/index.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/noderevs.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/pack.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.c
    subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.h
    subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/ra_serf.h
    subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/util.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/deprecated.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/load-fs-vtable.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c
    subversion/branches/remove-log-addressing/subversion/libsvn_repos/repos.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/cache-memcache.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/dirent_uri.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/error.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/mutex.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/named_atomic.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/sqlite.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/utf8proc.c
    subversion/branches/remove-log-addressing/subversion/libsvn_subr/win32_xlate.c
    subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c
    subversion/branches/remove-log-addressing/subversion/svn_private_config.hw
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/externals_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/lock-helper.c
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/main.py
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/fs-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_x/   (props changed)
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/dirent_uri-test.c
    subversion/branches/remove-log-addressing/subversion/tests/libsvn_subr/named_atomic-test-common.h
    subversion/branches/remove-log-addressing/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
    subversion/branches/remove-log-addressing/tools/dev/build-svn-deps-win.pl
    subversion/branches/remove-log-addressing/tools/dev/unix-build/Makefile.svn

Propchange: subversion/branches/remove-log-addressing/
------------------------------------------------------------------------------
  Merged /subversion/branches/authzperf:r1615360
  Merged /subversion/trunk:r1614846-1617438

Modified: subversion/branches/remove-log-addressing/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/CHANGES?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/CHANGES (original)
+++ subversion/branches/remove-log-addressing/CHANGES Tue Aug 12 09:42:36 2014
@@ -425,6 +425,47 @@ http://svn.apache.org/repos/asf/subversi
     * javahl: support incomplete reads from streams (r1569631)
     * javahl: allow revert API to take a set of paths (r1571461)
 
+Version 1.8.10
+(11 Aug 2014, from /branches/1.8.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.8.10
+
+ User-visible changes:
+  - Client-side bugfixes:
+    * guard against md5 hash collisions when finding cached credentials
+        (r1550691, r1550772, r1600909)
+    * ra_serf: properly match wildcards in SSL certs. (r1615211, 1615219)
+    * ra_serf: ignore the CommonName in SSL certs where there are Subject Alt
+        Names (r1565531, r1566503, r1568349, r1568361)
+    * ra_serf: fix a URI escaping bug that prevented deleting locked paths
+        (r1594223, r1553501, r1553556, r1559197, issue #3674)
+    * rm: Display the proper URL when deleting a URL in the commit log editor
+        (r1591123)
+    * log: Fix another instance of broken pipe error (r1596866, issue #3014)
+    * copy: Properly handle props not present or excluded on cross wc copy
+        (r1589184, r1589188)
+    * copy: Fix copying parents of locally deleted nodes between wcs
+        (r1589460, r1589486)
+    * externals: Properly delete ancestor directories of externals when
+        removing the external by changing svn:externals. (r1600311, 1600315,
+        r1600323, r1600393)
+    * ra_serf: fix memory lifetime of some hash values (r1606009)
+
+  - Server-side bugfixes:
+    * fsfs: omit config file when creating pre-1.5 format repos (r1547454,
+        r1561703)
+
+ Developer-visible changes:
+  - General:
+    * fix improper linking when serf is in the same prefix as existing svn
+        libraries. (r1609004)
+    * use proper intermediate directory when building with VS 2003-2008
+        (r1595431)
+    * support generating VS 2013 and later project files.
+
+  - Bindings:
+    * ruby: removing warning about Ruby 1.9 support being new. (r1593992)
+    * python: fix notify_func callbacks (r1594794, r1594814, r1594834, r1595061)
+
 
 Version 1.8.9
 (07 May 2014, from /branches/1.8.x)
@@ -1115,6 +1156,24 @@ http://svn.apache.org/repos/asf/subversi
     * fix some reference counting bugs in swig-py bindings (r1464899, r1466524)
 
 
+Version 1.7.18
+(11 Aug 2014, from /branches/1.7.x)
+http://svn.apache.org/repos/asf/subversion/tags/1.7.18
+
+ User-visible changes:
+  - Client-side bugfixes:
+    * guard against md5 hash collisions when finding cached credentials
+        (r1550691, r1550772, r1600909)
+    * ra_serf: properly match wildcards in SSL certs. (r1615211, 1615219)
+    * ra_serf: ignore the CommonName in SSL certs where there are Subject Alt
+        Names (r1565531, r1566503, r1568349)
+
+ Developer-visible changes:
+  - General:
+    * fix ocassional failure in checkout_tests.py test 12. (r1496127)
+    * disable building ZLib's assembly optimizations on Windows.
+
+
 Version 1.7.17
 (07 May 2014, from /branches/1.7.x)
 http://svn.apache.org/repos/asf/subversion/tags/1.7.17

Modified: subversion/branches/remove-log-addressing/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/build.conf?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/build.conf (original)
+++ subversion/branches/remove-log-addressing/build.conf Tue Aug 12 09:42:36 2014
@@ -383,7 +383,7 @@ msvc-export = 
         private\svn_sorts_private.h
         private\svn_string_private.h private\svn_magic.h
         private\svn_subr_private.h private\svn_mutex.h private\svn_named_atomic.h
-        private\svn_packed_data.h private\svn_object_pool.h
+        private\svn_packed_data.h private\svn_object_pool.h private\svn_cert.h
 
 # Working copy management lib
 [libsvn_wc]

Modified: subversion/branches/remove-log-addressing/build/generator/gen_win_dependencies.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/build/generator/gen_win_dependencies.py?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/build/generator/gen_win_dependencies.py (original)
+++ subversion/branches/remove-log-addressing/build/generator/gen_win_dependencies.py Tue Aug 12 09:42:36 2014
@@ -862,15 +862,21 @@ class GenDependenciesBase(gen_base.Gener
     "Find the right perl library name to link swig bindings with"
 
     fp = os.popen('perl -MConfig -e ' + escape_shell_arg(
+                  'print "$Config{libperl}\\n"; '
                   'print "$Config{PERL_REVISION}.$Config{PERL_VERSION}.'
                           '$Config{PERL_SUBVERSION}\\n"; '
                   'print "$Config{archlib}\\n"'), 'r')
     try:
       line = fp.readline()
       if line:
+        perl_lib = line.strip()
+      else:
+        return
+
+      line = fp.readline()
+      if line:
         perl_version = line.strip()
         perl_ver = perl_version.split('.')
-        perl_lib = 'perl%s%s.lib' % (perl_ver[0], perl_ver[1])
       else:
         return
 

Modified: subversion/branches/remove-log-addressing/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/configure.ac?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/configure.ac (original)
+++ subversion/branches/remove-log-addressing/configure.ac Tue Aug 12 09:42:36 2014
@@ -779,6 +779,10 @@ AH_BOTTOM([
 # define SVN__FORCE_INLINE APR_INLINE
 # define SVN__PREVENT_INLINE
 #endif
+
+/* Macro used to specify that a variable is intentionally left unused.
+   Supresses compiler warnings about the variable being unused.  */
+#define SVN_UNUSED(v) ( (void)(v) )
 ])
 
 dnl Used to simulate makefile conditionals.

Modified: subversion/branches/remove-log-addressing/get-deps.sh
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/get-deps.sh?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/get-deps.sh (original)
+++ subversion/branches/remove-log-addressing/get-deps.sh Tue Aug 12 09:42:36 2014
@@ -37,7 +37,7 @@ SERF_VERSION=${SERF_VERSION:-"1.3.4"}
 ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
 SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
 GMOCK_VERSION=${GMOCK_VERSION:-"1.6.0"}
-HTTPD_VERSION=${HTTPD_VERSION:-"2.4.7"}
+HTTPD_VERSION=${HTTPD_VERSION:-"2.4.10"}
 APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"}
 
 APR=apr-${APR_VERSION}

Modified: subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/remove-log-addressing/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Tue Aug 12 09:42:36 2014
@@ -445,7 +445,7 @@ static PyObject *make_ob_pool(void *pool
   apr_pool_t *new_pool = svn_pool_create(application_pool);
   PyObject *new_py_pool = svn_swig_py_new_pointer_obj(new_pool,
     svn_swig_TypeQuery("apr_pool_t *"), application_py_pool, NULL);
-  (void) pool; /* Silence compiler warnings about unused parameter. */
+  SVN_UNUSED(pool);
   return new_py_pool;
 }
 static PyObject *make_ob_fs_root(svn_fs_root_t *ptr, PyObject *py_pool)

Modified: subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/remove-log-addressing/subversion/include/svn_error_codes.h Tue Aug 12 09:42:36 2014
@@ -851,6 +851,11 @@ SVN_ERROR_START
              SVN_ERR_FS_CATEGORY_START + 60,
              "Unsupported FS type")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_FS_CONTAINER_SIZE,
+             SVN_ERR_FS_CATEGORY_START + 61,
+             "Container capacity exceeded.")
+
   /* repos errors */
 
   SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,
@@ -1426,8 +1431,13 @@ SVN_ERROR_START
              "Recursive locks are not supported")
 
   /** @since New in 1.9. */
-  SVN_ERRDEF(SVN_ERR_INVALID_INPUT,
+  SVN_ERRDEF(SVN_ERR_INVALID_UNLOCK,
              SVN_ERR_MISC_CATEGORY_START + 44,
+             "Tried to release a non-locked mutex")
+
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_INVALID_INPUT,
+             SVN_ERR_MISC_CATEGORY_START + 45,
              "Parser error: invalid input")
 
   /* command-line client errors */

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs/access.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs/access.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs/access.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs/access.c Tue Aug 12 09:42:36 2014
@@ -91,13 +91,6 @@ svn_fs_access_add_lock_token2(svn_fs_acc
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_fs_access_add_lock_token(svn_fs_access_t *access_ctx,
-                             const char *token)
-{
-  return svn_fs_access_add_lock_token2(access_ctx, (const char *) 1, token);
-}
-
 apr_hash_t *
 svn_fs__access_get_lock_tokens(svn_fs_access_t *access_ctx)
 {

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs/editor.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs/editor.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs/editor.c Tue Aug 12 09:42:36 2014
@@ -63,8 +63,6 @@ struct edit_baton {
 };
 
 #define FSPATH(relpath, pool) apr_pstrcat(pool, "/", relpath, SVN_VA_NULL)
-#define UNUSED(x) ((void)(x))
-
 
 static svn_error_t *
 get_root(svn_fs_root_t **root,
@@ -522,7 +520,8 @@ alter_symlink_cb(void *baton,
 {
   struct edit_baton *eb = baton;
 
-  UNUSED(eb); SVN__NOT_IMPLEMENTED();
+  SVN_UNUSED(eb);
+  SVN__NOT_IMPLEMENTED();
 }
 
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs/fs-loader.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs/fs-loader.c Tue Aug 12 09:42:36 2014
@@ -559,12 +559,6 @@ svn_fs_upgrade2(const char *path,
 }
 
 svn_error_t *
-svn_fs_upgrade(const char *path, apr_pool_t *pool)
-{
-  return svn_error_trace(svn_fs_upgrade2(path, NULL, NULL, NULL, NULL, pool));
-}
-
-svn_error_t *
 svn_fs_verify(const char *path,
               apr_hash_t *fs_config,
               svn_revnum_t start,
@@ -679,26 +673,6 @@ svn_fs_hotcopy3(const char *src_path, co
 }
 
 svn_error_t *
-svn_fs_hotcopy2(const char *src_path, const char *dest_path,
-                svn_boolean_t clean, svn_boolean_t incremental,
-                svn_cancel_func_t cancel_func, void *cancel_baton,
-                apr_pool_t *scratch_pool)
-{
-  return svn_error_trace(svn_fs_hotcopy3(src_path, dest_path, clean,
-                                         incremental, NULL, NULL,
-                                         cancel_func, cancel_baton,
-                                         scratch_pool));
-}
-
-svn_error_t *
-svn_fs_hotcopy(const char *src_path, const char *dest_path,
-               svn_boolean_t clean, apr_pool_t *pool)
-{
-  return svn_error_trace(svn_fs_hotcopy2(src_path, dest_path, clean,
-                                         FALSE, NULL, NULL, pool));
-}
-
-svn_error_t *
 svn_fs_pack(const char *path,
             svn_fs_pack_notify_t notify_func,
             void *notify_baton,
@@ -848,14 +822,6 @@ svn_fs_begin_txn2(svn_fs_txn_t **txn_p, 
 
 
 svn_error_t *
-svn_fs_begin_txn(svn_fs_txn_t **txn_p, svn_fs_t *fs, svn_revnum_t rev,
-                 apr_pool_t *pool)
-{
-  return svn_error_trace(svn_fs_begin_txn2(txn_p, fs, rev, 0, pool));
-}
-
-
-svn_error_t *
 svn_fs_commit_txn(const char **conflict_p, svn_revnum_t *new_rev,
                    svn_fs_txn_t *txn, apr_pool_t *pool)
 {
@@ -1561,14 +1527,6 @@ svn_fs_change_rev_prop2(svn_fs_t *fs, sv
 }
 
 svn_error_t *
-svn_fs_change_rev_prop(svn_fs_t *fs, svn_revnum_t rev, const char *name,
-                       const svn_string_t *value, apr_pool_t *pool)
-{
-  return svn_error_trace(
-           svn_fs_change_rev_prop2(fs, rev, name, NULL, value, pool));
-}
-
-svn_error_t *
 svn_fs_get_file_delta_stream(svn_txdelta_stream_t **stream_p,
                              svn_fs_root_t *source_root,
                              const char *source_path,
@@ -1832,16 +1790,6 @@ svn_fs_get_locks2(svn_fs_t *fs, const ch
                                                get_locks_baton, pool));
 }
 
-svn_error_t *
-svn_fs_get_locks(svn_fs_t *fs, const char *path,
-                 svn_fs_get_locks_callback_t get_locks_func,
-                 void *get_locks_baton, apr_pool_t *pool)
-{
-  return svn_error_trace(svn_fs_get_locks2(fs, path, svn_depth_infinity,
-                                           get_locks_func, get_locks_baton,
-                                           pool));
-}
-
 
 /* --- History functions --- */
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/cached_data.c Tue Aug 12 09:42:36 2014
@@ -416,20 +416,11 @@ get_fs_id_at_offset(svn_fs_id_t **id_p,
    changed path offset in *CHANGES_OFFSET.  If either of these
    pointers is NULL, do nothing with it.
 
-   If PACKED is true, REV_FILE should be a packed shard file.
-   ### There is currently no such parameter.  This function assumes that
-       svn_fs_fs__is_packed_rev(FS, REV) will indicate whether REV_FILE is
-       a packed file.  Therefore FS->fsap_data->min_unpacked_rev must not
-       have been refreshed since REV_FILE was opened if there is a
-       possibility that revision REV may have become packed since then.
-       TODO: Take an IS_PACKED parameter instead, in order to remove this
-       requirement.
-
    Allocate temporary variables from POOL. */
 static svn_error_t *
 get_root_changes_offset(apr_off_t *root_offset,
                         apr_off_t *changes_offset,
-                        apr_file_t *rev_file,
+                        svn_fs_fs__revision_file_t *rev_file,
                         svn_fs_t *fs,
                         svn_revnum_t rev,
                         apr_pool_t *pool)
@@ -452,8 +443,7 @@ get_root_changes_offset(apr_off_t *root_
      Unless the next revision is in a different file, in which case, we can
      just seek to the end of the pack file -- just like we do in the
      non-packed case. */
-  if (svn_fs_fs__is_packed_rev(fs, rev)
-      && ((rev + 1) % ffd->max_files_per_dir != 0))
+  if (rev_file->is_packed && ((rev + 1) % ffd->max_files_per_dir != 0))
     {
       SVN_ERR(svn_fs_fs__get_packed_offset(&end, fs, rev + 1, pool));
       seek_relative = APR_SET;
@@ -465,14 +455,14 @@ get_root_changes_offset(apr_off_t *root_
     }
 
   /* Offset of the revision from the start of the pack file, if applicable. */
-  if (svn_fs_fs__is_packed_rev(fs, rev))
+  if (rev_file->is_packed)
     SVN_ERR(svn_fs_fs__get_packed_offset(&rev_offset, fs, rev, pool));
   else
     rev_offset = 0;
 
   /* 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, &end, pool));
+  SVN_ERR(svn_io_file_seek(rev_file->file, seek_relative, &end, pool));
 
   if (end < sizeof(buffer))
     {
@@ -486,8 +476,9 @@ get_root_changes_offset(apr_off_t *root_
     }
 
   /* Read in this last block, from which we will identify the last line. */
-  SVN_ERR(aligned_seek(fs, rev_file, NULL, start, pool));
-  SVN_ERR(svn_io_file_read_full2(rev_file, buffer, len, NULL, NULL, pool));
+  SVN_ERR(aligned_seek(fs, rev_file->file, NULL, start, pool));
+  SVN_ERR(svn_io_file_read_full2(rev_file->file, buffer, len, NULL, NULL,
+                                 pool));
 
   /* Parse the last line. */
   trailer = svn_stringbuf_ncreate(buffer, len, pool);
@@ -528,7 +519,8 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
   SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev,
                                            scratch_pool, scratch_pool));
   SVN_ERR(get_root_changes_offset(&root_offset, NULL,
-                                  revision_file->file, fs, rev, scratch_pool));
+                                  revision_file, fs, rev,
+                                  scratch_pool));
 
   SVN_ERR(get_fs_id_at_offset(&root_id, revision_file, fs, rev,
                               root_offset, result_pool));
@@ -2597,7 +2589,7 @@ svn_fs_fs__get_changes(apr_array_header_
 
       /* physical addressing mode code path */
       SVN_ERR(get_root_changes_offset(NULL, &changes_offset,
-                                      revision_file->file, fs, rev,
+                                      revision_file, fs, rev,
                                       scratch_pool));
 
       /* Actual reading and parsing are the same, though. */

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.c Tue Aug 12 09:42:36 2014
@@ -155,11 +155,22 @@ fs_freeze_body(void *baton,
 }
 
 static svn_error_t *
+fs_freeze_body2(void *baton,
+                apr_pool_t *pool)
+{
+  struct fs_freeze_baton_t *b = baton;
+  SVN_ERR(svn_fs_fs__with_write_lock(b->fs, fs_freeze_body, baton, pool));
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 fs_freeze(svn_fs_t *fs,
           svn_fs_freeze_func_t freeze_func,
           void *freeze_baton,
           apr_pool_t *pool)
 {
+  fs_fs_data_t *ffd = fs->fsap_data;
   struct fs_freeze_baton_t b;
 
   b.fs = fs;
@@ -167,7 +178,11 @@ fs_freeze(svn_fs_t *fs,
   b.freeze_baton = freeze_baton;
 
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
-  SVN_ERR(svn_fs_fs__with_write_lock(fs, fs_freeze_body, &b, pool));
+
+  if (ffd->format >= SVN_FS_FS__MIN_PACK_LOCK_FORMAT)
+    SVN_ERR(svn_fs_fs__with_pack_lock(fs, fs_freeze_body2, &b, pool));
+  else
+    SVN_ERR(fs_freeze_body2(&b, pool));
 
   return SVN_NO_ERROR;
 }
@@ -229,6 +244,16 @@ initialize_fs_struct(svn_fs_t *fs)
   return SVN_NO_ERROR;
 }
 
+/* Reset vtable and fsap_data fields in FS such that the FS is basically
+ * closed now.  Note that FS must not hold locks when you call this. */
+static svn_error_t *
+uninitialize_fs_struct(svn_fs_t *fs)
+{
+  fs->vtable = NULL;
+  fs->fsap_data = NULL;
+  return SVN_NO_ERROR;
+}
+
 /* This implements the fs_library_vtable_t.create() API.  Create a new
    fsfs-backed Subversion filesystem at path PATH and link it into
    *FS.  Perform temporary allocations in POOL, and fs-global allocations
@@ -397,11 +422,13 @@ fs_hotcopy(svn_fs_t *src_fs,
   if (cancel_func)
     SVN_ERR(cancel_func(cancel_baton));
 
-  /* Provide FFD for DST_FS, test / initialize target repo, remove FFD. */
+  /* Test target repo when in INCREMENTAL mode, initialize it when not.
+   * For this, we need our FS internal data structures to be temporarily
+   * available. */
   SVN_ERR(initialize_fs_struct(dst_fs));
   SVN_ERR(svn_fs_fs__hotcopy_prepare_target(src_fs, dst_fs, dst_path,
                                             incremental, pool));
-  dst_fs->fsap_data = NULL;
+  SVN_ERR(uninitialize_fs_struct(dst_fs));
 
   /* Now, the destination repo should open just fine. */
   SVN_ERR(fs_open(dst_fs, dst_path, common_pool_lock, pool, common_pool));

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.h?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/fs.h Tue Aug 12 09:42:36 2014
@@ -277,7 +277,7 @@ typedef struct fs_fs_data_t
      layouts) or zero (for linear layouts). */
   int max_files_per_dir;
 
-  /* Rev / pack file read granularity. */
+  /* Rev / pack file read granularity in bytes. */
   apr_int64_t block_size;
 
   /* The revision that was youngest, last time we checked. */

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=1617440&r1=1617439&r2=1617440&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 Tue Aug 12 09:42:36 2014
@@ -874,7 +874,7 @@ write_config(svn_fs_t *fs,
 "### may improve latency while still maximizing throughput.  If block-read"  NL
 "### has not been enabled, this will be capped to 4 kBytes."                 NL
 "### Can be changed at any time but must be a power of 2."                   NL
-"### block-size is 64 kBytes by default."                                    NL
+"### block-size is given in kBytes and with a default of 64 kBytes."         NL
 "# " CONFIG_OPTION_BLOCK_SIZE " = 64"                                        NL
 ;
 #undef NL

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/hotcopy.c Tue Aug 12 09:42:36 2014
@@ -1008,7 +1008,8 @@ hotcopy_body(void *baton, apr_pool_t *po
   return SVN_NO_ERROR;
 }
 
-/* Wrapper around hotcopy_body taking out all necessary source repositories.
+/* Wrapper around hotcopy_body taking out all necessary source repository
+ * locks.
  */
 static svn_error_t *
 hotcopy_locking_src_body(void *baton, apr_pool_t *pool)

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/tree.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/tree.c Tue Aug 12 09:42:36 2014
@@ -1072,7 +1072,7 @@ open_path(parent_path_t **parent_path_p,
 
           if (flags & open_path_node_only)
             {
-              /* Shortcut: the caller only wan'ts the final DAG node. */
+              /* Shortcut: the caller only wants the final DAG node. */
               parent_path->node = child;
             }
           else

Propchange: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/libsvn_fs_x:r1614846-1617438

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=1617440&r1=1617439&r2=1617440&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 Tue Aug 12 09:42:36 2014
@@ -1638,7 +1638,7 @@ l2p_proto_index_lookup(apr_off_t *offset
       if (!eof && entry.item_index == item_index)
         {
           *offset = (apr_off_t)entry.offset - 1;
-          *sub_item = (apr_off_t)entry.sub_item;
+          *sub_item = entry.sub_item;
           break;
         }
     }

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/noderevs.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/noderevs.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/noderevs.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/noderevs.c Tue Aug 12 09:42:36 2014
@@ -740,7 +740,7 @@ svn_fs_x__read_noderevs_container(svn_fs
   count
     = svn_packed__int_count(svn_packed__first_int_substream(ids_stream));
   noderevs->ids
-    = apr_array_make(result_pool, count, sizeof(binary_id_t));
+    = apr_array_make(result_pool, (int)count, sizeof(binary_id_t));
   for (i = 0; i < count; ++i)
     {
       binary_id_t id;
@@ -765,7 +765,7 @@ svn_fs_x__read_noderevs_container(svn_fs
   count
     = svn_packed__int_count(svn_packed__first_int_substream(noderevs_stream));
   noderevs->noderevs
-    = apr_array_make(result_pool, count, sizeof(binary_noderev_t));
+    = apr_array_make(result_pool, (int)count, sizeof(binary_noderev_t));
   for (i = 0; i < count; ++i)
     {
       binary_noderev_t noderev;

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=1617440&r1=1617439&r2=1617440&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 Tue Aug 12 09:42:36 2014
@@ -1343,8 +1343,8 @@ write_reps_containers(pack_context_t *co
       SVN_ERR(svn_stream_read_full(stream, contents->data, &contents->len));
       SVN_ERR(svn_stream_close(stream));
 
-      list_index = svn_fs_x__reps_add(container,
-                                svn_stringbuf__morph_into_string(contents));
+      SVN_ERR(svn_fs_x__reps_add(&list_index, container,
+                                 svn_stringbuf__morph_into_string(contents)));
       SVN_ERR_ASSERT(list_index == sub_items->nelts);
       block_left -= entry->size;
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.c Tue Aug 12 09:42:36 2014
@@ -27,6 +27,8 @@
 #include "private/svn_packed_data.h"
 #include "private/svn_temp_serializer.h"
 
+#include "svn_private_config.h"
+
 #include "cached_data.h"
 
 /* Length of the text chunks we hash and match.  The algorithm will find
@@ -38,6 +40,16 @@
  */
 #define MATCH_BLOCKSIZE 64
 
+/* Limit the total text body within a container to 16MB.  Larger values
+ * of up to 2GB are possible but become increasingly impractical as the
+ * container has to be loaded in its entirety before any of it can be read.
+ */
+#define MAX_TEXT_BODY 0x1000000
+
+/* Limit the size of the instructions stream.  This should not exceed the
+ * text body size limit. */
+#define MAX_INSTRUCTIONS (MAX_TEXT_BODY / 8)
+
 /* value of unused hash buckets */
 #define NO_OFFSET ((apr_uint32_t)(-1))
 
@@ -398,15 +410,17 @@ svn_fs_x__reps_add_base(svn_fs_x__reps_b
 
   svn_stream_t *stream;
   svn_string_t *contents;
+  apr_size_t idx;
   SVN_ERR(svn_fs_x__get_contents(&stream, builder->fs, rep, FALSE,
                                  scratch_pool));
   SVN_ERR(svn_string_from_stream(&contents, stream, scratch_pool,
                                  scratch_pool));
+  SVN_ERR(svn_fs_x__reps_add(&idx, builder, contents));
 
   base.revision = svn_fs_x__get_revnum(rep->id.change_set);
   base.item_index = rep->id.number;
   base.priority = priority;
-  base.rep = (apr_uint32_t)svn_fs_x__reps_add(builder, contents);
+  base.rep = (apr_uint32_t)idx;
 
   APR_ARRAY_PUSH(builder->bases, base_t) = base;
   builder->base_text_len += builder->text->len - text_start_offset;
@@ -430,8 +444,8 @@ add_new_text(svn_fs_x__reps_builder_t *b
     return;
 
   /* new instruction */
-  instruction.offset = builder->text->len;
-  instruction.count = len;
+  instruction.offset = (apr_int32_t)builder->text->len;
+  instruction.count = (apr_uint32_t)len;
   APR_ARRAY_PUSH(builder->instructions, instruction_t) = instruction;
 
   /* add to text corpus */
@@ -457,13 +471,14 @@ add_new_text(svn_fs_x__reps_builder_t *b
       else if (builder->hash.offsets[idx] >= instruction.offset)
         continue;
 
-      builder->hash.offsets[idx] = offset;
+      builder->hash.offsets[idx] = (apr_uint32_t)offset;
       builder->hash.prefixes[idx] = builder->text->data[offset];
     }
 }
 
-apr_size_t
-svn_fs_x__reps_add(svn_fs_x__reps_builder_t *builder,
+svn_error_t *
+svn_fs_x__reps_add(apr_size_t *rep_idx,
+                   svn_fs_x__reps_builder_t *builder,
                    const svn_string_t *contents)
 {
   rep_t rep;
@@ -472,8 +487,16 @@ svn_fs_x__reps_add(svn_fs_x__reps_builde
   const char *end = current + contents->len;
   const char *last_to_test = end - MATCH_BLOCKSIZE - 1;
 
-  rep.first_instruction = (apr_uint32_t)builder->instructions->nelts;
+  if (builder->text->len + contents->len > MAX_TEXT_BODY)
+    return svn_error_create(SVN_ERR_FS_CONTAINER_SIZE, NULL,
+                      _("Text body exceeds star delta container capacity"));
+
+  if (  builder->instructions->nelts + 2 * contents->len / MATCH_BLOCKSIZE
+      > MAX_INSTRUCTIONS)
+    return svn_error_create(SVN_ERR_FS_CONTAINER_SIZE, NULL,
+              _("Instruction count exceeds star delta container capacity"));
 
+  rep.first_instruction = (apr_uint32_t)builder->instructions->nelts;
   while (current < last_to_test)
     {
       hash_key_t key = hash_key(current);
@@ -501,7 +524,7 @@ svn_fs_x__reps_add(svn_fs_x__reps_builde
       if (current < last_to_test)
         {
           instruction_t instruction;
-          
+
           /* extend the match */
 
           size_t prefix_match
@@ -522,8 +545,9 @@ svn_fs_x__reps_add(svn_fs_x__reps_builde
 
           /* add instruction for matching section */
 
-          instruction.offset = offset - prefix_match;
-          instruction.count = prefix_match + postfix_match + MATCH_BLOCKSIZE;
+          instruction.offset = (apr_int32_t)(offset - prefix_match);
+          instruction.count = (apr_uint32_t)(prefix_match + postfix_match +
+                                             MATCH_BLOCKSIZE);
           APR_ARRAY_PUSH(builder->instructions, instruction_t) = instruction;
 
           processed = current + MATCH_BLOCKSIZE + postfix_match;
@@ -536,7 +560,8 @@ svn_fs_x__reps_add(svn_fs_x__reps_builde
                         - rep.first_instruction;
   APR_ARRAY_PUSH(builder->reps, rep_t) = rep;
 
-  return (apr_size_t)(builder->reps->nelts - 1);
+  *rep_idx = (apr_size_t)(builder->reps->nelts - 1);
+  return SVN_NO_ERROR;
 }
 
 apr_size_t
@@ -594,7 +619,7 @@ get_text(svn_fs_x__rep_extractor_t *extr
         /* a section that we need to fill from some external base rep. */
         missing_t missing;
         missing.base = 0;
-        missing.start = extractor->result->len;
+        missing.start = (apr_uint32_t)extractor->result->len;
         missing.count = instruction->count;
         missing.offset = instruction->offset;
         svn_stringbuf_appendfill(extractor->result, 0, instruction->count);
@@ -812,7 +837,7 @@ svn_fs_x__read_reps_container(svn_fs_x__
   for (i = 0; i < reps->rep_count; ++i)
     first_instructions[i]
       = (apr_uint32_t)svn_packed__get_uint(reps_stream);
-  first_instructions[reps->rep_count] = reps->instruction_count;
+  first_instructions[reps->rep_count] = (apr_uint32_t)reps->instruction_count;
 
   /* other elements */
   reps->base_text_len = (apr_size_t)svn_packed__get_uint(misc_stream);

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.h?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.h (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_x/reps.h Tue Aug 12 09:42:36 2014
@@ -96,10 +96,11 @@ svn_fs_x__reps_add_base(svn_fs_x__reps_b
                         apr_pool_t *scratch_pool);
 
 /* Add the byte string CONTENTS to BUILDER.  Return the item index under
- * which the fulltext can be retrieved from the final container.
+ * which the fulltext can be retrieved from the final container in *REP_IDX.
  */
-apr_size_t
-svn_fs_x__reps_add(svn_fs_x__reps_builder_t *builder,
+svn_error_t *
+svn_fs_x__reps_add(apr_size_t *rep_idx,
+                   svn_fs_x__reps_builder_t *builder,
                    const svn_string_t *contents);
 
 /* Return a rough estimate in bytes for the serialized representation

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/ra_serf.h?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/ra_serf.h Tue Aug 12 09:42:36 2014
@@ -54,9 +54,6 @@ extern "C" {
 #error Please update your version of serf to at least 1.2.1.
 #endif
 
-/** Use this to silence compiler warnings about unused parameters. */
-#define UNUSED_CTX(x) ((void)(x))
-
 /** Wait duration (in microseconds) used in calls to serf_context_run() */
 #define SVN_RA_SERF__CONTEXT_RUN_DURATION 500000
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/util.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_ra_serf/util.c Tue Aug 12 09:42:36 2014
@@ -28,7 +28,6 @@
 #define APR_WANT_STRFUNC
 #include <apr.h>
 #include <apr_want.h>
-#include <apr_fnmatch.h>
 
 #include <serf.h>
 #include <serf_bucket_types.h>
@@ -45,6 +44,7 @@
 #include "private/svn_dep_compat.h"
 #include "private/svn_fspath.h"
 #include "private/svn_auth_private.h"
+#include "private/svn_cert.h"
 
 #include "ra_serf.h"
 
@@ -231,36 +231,36 @@ ssl_server_cert(void *baton, int failure
       ### This should really be handled by serf, which should pass an error
           for this case, but that has backwards compatibility issues. */
       apr_array_header_t *san;
-      svn_boolean_t found_san_entry = FALSE;
       svn_boolean_t found_matching_hostname = FALSE;
+      svn_string_t *actual_hostname =
+          svn_string_create(conn->session->session_url.hostname, scratch_pool);
 
       serf_cert = serf_ssl_cert_certificate(cert, scratch_pool);
 
       san = svn_hash_gets(serf_cert, "subjectAltName");
-      /* Try to find matching server name via subjectAltName first... */
-      if (san)
+      /* Match server certificate CN with the hostname of the server iff
+       * we didn't find any subjectAltName fields and try to match them.
+       * Per RFC 2818 they are authoritative if present and CommonName
+       * should be ignored.  NOTE: This isn't 100% correct since serf
+       * only loads the subjectAltName hash with dNSNames, technically
+       * we should ignore the CommonName if any subjectAltName entry
+       * exists even if it is one we don't support. */
+      if (san && san->nelts > 0)
         {
           int i;
-          found_san_entry = san->nelts > 0;
           for (i = 0; i < san->nelts; i++)
             {
               const char *s = APR_ARRAY_IDX(san, i, const char*);
-              if (APR_SUCCESS == apr_fnmatch(s,
-                                            conn->session->session_url.hostname,
-                                            APR_FNM_PERIOD |
-                                            APR_FNM_CASE_BLIND))
+              svn_string_t *cert_hostname = svn_string_create(s, scratch_pool);
+
+              if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
                 {
                   found_matching_hostname = TRUE;
                   break;
                 }
             }
         }
-
-      /* Match server certificate CN with the hostname of the server iff
-       * we didn't find any subjectAltName fields and try to match them.
-       * Per RFC 2818 they are authoritative if present and CommonName
-       * should be ignored. */
-      if (!found_matching_hostname && !found_san_entry)
+      else
         {
           const char *hostname = NULL;
 
@@ -269,11 +269,15 @@ ssl_server_cert(void *baton, int failure
           if (subject)
             hostname = svn_hash_gets(subject, "CN");
 
-          if (hostname
-              && apr_fnmatch(hostname, conn->session->session_url.hostname,
-                             APR_FNM_PERIOD | APR_FNM_CASE_BLIND) == APR_SUCCESS)
+          if (hostname)
             {
-              found_matching_hostname = TRUE;
+              svn_string_t *cert_hostname = svn_string_create(hostname,
+                                                              scratch_pool);
+
+              if (svn_cert__match_dns_identity(cert_hostname, actual_hostname))
+                {
+                  found_matching_hostname = TRUE;
+                }
             }
         }
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_repos/deprecated.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_repos/deprecated.c Tue Aug 12 09:42:36 2014
@@ -226,6 +226,30 @@ svn_repos_upgrade(const char *path,
   return svn_repos_upgrade2(path, nonblocking, recovery_started, &rb, pool);
 }
 
+svn_error_t *
+svn_repos_hotcopy2(const char *src_path,
+                   const char *dst_path,
+                   svn_boolean_t clean_logs,
+                   svn_boolean_t incremental,
+                   svn_cancel_func_t cancel_func,
+                   void *cancel_baton,
+                   apr_pool_t *pool)
+{
+  return svn_error_trace(svn_repos_hotcopy3(src_path, dst_path, clean_logs,
+                                            incremental, NULL, NULL,
+                                            cancel_func, cancel_baton, pool));
+}
+
+svn_error_t *
+svn_repos_hotcopy(const char *src_path,
+                  const char *dst_path,
+                  svn_boolean_t clean_logs,
+                  apr_pool_t *pool)
+{
+  return svn_error_trace(svn_repos_hotcopy2(src_path, dst_path, clean_logs,
+                                            FALSE, NULL, NULL, pool));
+}
+
 /*** From reporter.c ***/
 svn_error_t *
 svn_repos_begin_report(void **report_baton,

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_repos/load-fs-vtable.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_repos/load-fs-vtable.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_repos/load-fs-vtable.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_repos/load-fs-vtable.c Tue Aug 12 09:42:36 2014
@@ -62,7 +62,7 @@ struct parse_baton
   const char *parent_dir; /* repository relpath, or NULL */
   svn_repos_notify_func_t notify_func;
   void *notify_baton;
-  svn_repos_notify_t *notify;
+  apr_pool_t *notify_pool; /* scratch pool for notifications */
   apr_pool_t *pool;
 
   /* Start and end (inclusive) of revision range we'll pay attention
@@ -503,9 +503,14 @@ new_revision_record(void **revision_bato
 
       if (pb->notify_func)
         {
-          pb->notify->action = svn_repos_notify_load_txn_start;
-          pb->notify->old_revision = rb->rev;
-          pb->notify_func(pb->notify_baton, pb->notify, rb->pool);
+          /* ### TODO: Use proper scratch pool instead of pb->notify_pool */
+          svn_repos_notify_t *notify = svn_repos_notify_create(
+                                            svn_repos_notify_load_txn_start,
+                                            pb->notify_pool);
+
+          notify->old_revision = rb->rev;
+          pb->notify_func(pb->notify_baton, notify, pb->notify_pool);
+          svn_pool_clear(pb->notify_pool);
         }
 
       /* Stash the oldest "old" revision committed from the load stream. */
@@ -516,9 +521,14 @@ new_revision_record(void **revision_bato
   /* If we're skipping this revision, try to notify someone. */
   if (rb->skipped && pb->notify_func)
     {
-      pb->notify->action = svn_repos_notify_load_skipped_rev;
-      pb->notify->old_revision = rb->rev;
-      pb->notify_func(pb->notify_baton, pb->notify, rb->pool);
+      /* ### TODO: Use proper scratch pool instead of pb->notify_pool */
+      svn_repos_notify_t *notify = svn_repos_notify_create(
+                                        svn_repos_notify_load_skipped_rev,
+                                        pb->notify_pool);
+
+      notify->old_revision = rb->rev;
+      pb->notify_func(pb->notify_baton, notify, pb->notify_pool);
+      svn_pool_clear(pb->notify_pool);
     }
 
   /* If we're parsing revision 0, only the revision props are (possibly)
@@ -587,8 +597,13 @@ maybe_add_with_history(struct node_baton
 
       if (pb->notify_func)
         {
-          pb->notify->action = svn_repos_notify_load_copied_node;
-          pb->notify_func(pb->notify_baton, pb->notify, rb->pool);
+          /* ### TODO: Use proper scratch pool instead of pb->notify_pool */
+          svn_repos_notify_t *notify = svn_repos_notify_create(
+                                            svn_repos_notify_load_copied_node,
+                                            pb->notify_pool);
+
+          pb->notify_func(pb->notify_baton, notify, pb->notify_pool);
+          svn_pool_clear(pb->notify_pool);
         }
     }
 
@@ -657,10 +672,14 @@ new_node_record(void **node_baton,
 
   if (pb->notify_func)
     {
-      pb->notify->action = svn_repos_notify_load_node_start;
-      pb->notify->node_action = nb->action;
-      pb->notify->path = nb->path;
-      pb->notify_func(pb->notify_baton, pb->notify, rb->pool);
+      /* ### TODO: Use proper scratch pool instead of pb->notify_pool */
+      svn_repos_notify_t *notify = svn_repos_notify_create(
+                                        svn_repos_notify_load_node_start,
+                                        pb->notify_pool);
+
+      notify->path = nb->path;
+      pb->notify_func(pb->notify_baton, notify, pb->notify_pool);
+      svn_pool_clear(pb->notify_pool);
     }
 
   switch (nb->action)
@@ -773,8 +792,14 @@ set_node_property(void *baton,
 
           if (pb->notify_func)
             {
-              pb->notify->action = svn_repos_notify_load_normalized_mergeinfo;
-              pb->notify_func(pb->notify_baton, pb->notify, nb->pool);
+              /* ### TODO: Use proper scratch pool instead of pb->notify_pool */
+              svn_repos_notify_t *notify
+                      = svn_repos_notify_create(
+                                    svn_repos_notify_load_normalized_mergeinfo,
+                                    pb->notify_pool);
+
+              pb->notify_func(pb->notify_baton, notify, pb->notify_pool);
+              svn_pool_clear(pb->notify_pool);
             }
         }
 
@@ -901,8 +926,13 @@ close_node(void *baton)
 
   if (pb->notify_func)
     {
-      pb->notify->action = svn_repos_notify_load_node_done;
-      pb->notify_func(pb->notify_baton, pb->notify, rb->pool);
+      /* ### TODO: Use proper scratch pool instead of pb->notify_pool */
+      svn_repos_notify_t *notify = svn_repos_notify_create(
+                                            svn_repos_notify_load_node_done,
+                                            pb->notify_pool);
+
+      pb->notify_func(pb->notify_baton, notify, pb->notify_pool);
+      svn_pool_clear(pb->notify_pool);
     }
 
   return SVN_NO_ERROR;
@@ -1029,12 +1059,17 @@ close_revision(void *baton)
 
   if (pb->notify_func)
     {
-      pb->notify->action = svn_repos_notify_load_txn_committed;
-      pb->notify->new_revision = committed_rev;
-      pb->notify->old_revision = ((committed_rev == rb->rev)
+      /* ### TODO: Use proper scratch pool instead of pb->notify_pool */
+      svn_repos_notify_t *notify = svn_repos_notify_create(
+                                        svn_repos_notify_load_txn_committed,
+                                        pb->notify_pool);
+
+      notify->new_revision = committed_rev;
+      notify->old_revision = ((committed_rev == rb->rev)
                                     ? SVN_INVALID_REVNUM
                                     : rb->rev);
-      pb->notify_func(pb->notify_baton, pb->notify, rb->pool);
+      pb->notify_func(pb->notify_baton, notify, pb->notify_pool);
+      svn_pool_clear(pb->notify_pool);
     }
 
   return SVN_NO_ERROR;
@@ -1092,10 +1127,10 @@ svn_repos_get_fs_build_parser4(const svn
   pb->validate_props = validate_props;
   pb->notify_func = notify_func;
   pb->notify_baton = notify_baton;
-  pb->notify = svn_repos_notify_create(svn_repos_notify_load_txn_start, pool);
   pb->uuid_action = uuid_action;
   pb->parent_dir = parent_dir;
   pb->pool = pool;
+  pb->notify_pool = svn_pool_create(pool);
   pb->rev_map = apr_hash_make(pool);
   pb->oldest_old_rev = SVN_INVALID_REVNUM;
   pb->last_rev_mapped = SVN_INVALID_REVNUM;

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_repos/log.c Tue Aug 12 09:42:36 2014
@@ -199,7 +199,13 @@ detect_changed(apr_hash_t **changed,
   if (changes == NULL)
     {
       SVN_ERR(svn_fs_paths_changed2(&changes, root, pool));
-      *changed = changes;
+
+      /* If we are going to filter the results, we won't use the exact
+       * same keys but put them into a new hash. */
+      if (authz_read_func)
+        *changed = svn_hash__make(pool);
+      else
+        *changed = changes;
     }
   else
     {

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_repos/repos.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_repos/repos.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_repos/repos.c Tue Aug 12 09:42:36 2014
@@ -2247,30 +2247,6 @@ svn_repos_hotcopy3(const char *src_path,
            dst_repos->format, pool);
 }
 
-svn_error_t *
-svn_repos_hotcopy2(const char *src_path,
-                   const char *dst_path,
-                   svn_boolean_t clean_logs,
-                   svn_boolean_t incremental,
-                   svn_cancel_func_t cancel_func,
-                   void *cancel_baton,
-                   apr_pool_t *pool)
-{
-  return svn_error_trace(svn_repos_hotcopy3(src_path, dst_path, clean_logs,
-                                            incremental, NULL, NULL,
-                                            cancel_func, cancel_baton, pool));
-}
-
-svn_error_t *
-svn_repos_hotcopy(const char *src_path,
-                  const char *dst_path,
-                  svn_boolean_t clean_logs,
-                  apr_pool_t *pool)
-{
-  return svn_error_trace(svn_repos_hotcopy2(src_path, dst_path, clean_logs,
-                                            FALSE, NULL, NULL, pool));
-}
-
 /* Return the library version number. */
 const svn_version_t *
 svn_repos_version(void)

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/cache-memcache.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/cache-memcache.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/cache-memcache.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/cache-memcache.c Tue Aug 12 09:42:36 2014
@@ -367,7 +367,7 @@ memcache_iter(svn_boolean_t *completed,
 static svn_boolean_t
 memcache_is_cachable(void *unused, apr_size_t size)
 {
-  (void)unused;  /* silence gcc warning. */
+  SVN_UNUSED(unused);
 
   /* The memcached cutoff seems to be a bit (header length?) under a megabyte.
    * We round down a little to be safe.

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/dirent_uri.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/dirent_uri.c Tue Aug 12 09:42:36 2014
@@ -38,6 +38,7 @@
 
 #include "dirent_uri.h"
 #include "private/svn_fspath.h"
+#include "private/svn_cert.h"
 
 /* The canonical empty path.  Can this be changed?  Well, change the empty
    test below and the path library will work, not so sure about the fs/wc
@@ -2625,3 +2626,81 @@ svn_urlpath__canonicalize(const char *ur
     }
   return uri;
 }
+
+
+/* -------------- The cert API (see private/svn_cert.h) ------------- */
+
+svn_boolean_t
+svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname)
+{
+  apr_size_t pattern_pos = 0, hostname_pos = 0;
+
+  /* support leading wildcards that composed of the only character in the
+   * left-most label. */
+  if (pattern->len >= 2 &&
+      pattern->data[pattern_pos] == '*' &&
+      pattern->data[pattern_pos + 1] == '.')
+    {
+      while (hostname_pos < hostname->len &&
+             hostname->data[hostname_pos] != '.')
+        {
+          hostname_pos++;
+        }
+      /* Assume that the wildcard must match something.  Rule 2 says
+       * that *.example.com should not match example.com.  If the wildcard
+       * ends up not matching anything then it matches .example.com which
+       * seems to be essentially the same as just example.com */
+      if (hostname_pos == 0)
+        return FALSE;
+
+      pattern_pos++;
+    }
+
+  while (pattern_pos < pattern->len && hostname_pos < hostname->len)
+    {
+      char pattern_c = pattern->data[pattern_pos];
+      char hostname_c = hostname->data[hostname_pos];
+
+      /* fold case as described in RFC 4343.
+       * Note: We actually convert to lowercase, since our URI
+       * canonicalization code converts to lowercase and generally
+       * most certs are issued with lowercase DNS names, meaning
+       * this avoids the fold operation in most cases.  The RFC
+       * suggests the opposite transformation, but doesn't require
+       * any specific implementation in any case.  It is critical
+       * that this folding be locale independent so you can't use
+       * tolower(). */
+      pattern_c = canonicalize_to_lower(pattern_c);
+      hostname_c = canonicalize_to_lower(hostname_c);
+
+      if (pattern_c != hostname_c)
+        {
+          /* doesn't match */
+          return FALSE;
+        }
+      else
+        {
+          /* characters match so skip both */
+          pattern_pos++;
+          hostname_pos++;
+        }
+    }
+
+  /* ignore a trailing period on the hostname since this has no effect on the
+   * security of the matching.  See the following for the long explanation as
+   * to why:
+   * https://bugzilla.mozilla.org/show_bug.cgi?id=134402#c28
+   */
+  if (pattern_pos == pattern->len &&
+      hostname_pos == hostname->len - 1 &&
+      hostname->data[hostname_pos] == '.')
+    hostname_pos++;
+
+  if (pattern_pos != pattern->len || hostname_pos != hostname->len)
+    {
+      /* end didn't match */
+      return FALSE;
+    }
+
+  return TRUE;
+}

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/error.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/error.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/error.c Tue Aug 12 09:42:36 2014
@@ -85,34 +85,15 @@ svn_error__locate(const char *file, long
 
 /* Cleanup function for errors.  svn_error_clear () removes this so
    errors that are properly handled *don't* hit this code. */
-#if defined(SVN_DEBUG)
-/* GCC >= 4.6 has support for diagnostic pragmas that let us
- * turn off warnings.  clang also supports the same pragmas */
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) \
-     || defined(__clang__))
-  #define IGNORING_UNUSED_WARNING
-  #pragma GCC diagnostic push
-  #pragma GCC diagnostic ignored "-Wunused-variable"
-#endif /* supports diagnostic pragmas */
 static apr_status_t err_abort(void *data)
 {
   svn_error_t *err = data;  /* For easy viewing in a debugger */
-#ifndef IGNORING_UNUSED_WARNING
-  /* Fake a use for the variable to avoid compiler warnings if we can't turn
-   * them off via pragmas. */
-  err = err;
-#endif /* IGNORING_UNUSED_WARNING */
+  SVN_UNUSED(err);
 
   if (!getenv("SVN_DBG_NO_ABORT_ON_ERROR_LEAK"))
     abort();
   return APR_SUCCESS;
 }
-#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) \
-     || defined(__clang__))
-  #undef IGNORING_UNUSED_WARNING
-  #pragma GCC diagnostic pop
-#endif /* supports diagnostic pragmas */
-#endif
 
 
 static svn_error_t *

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/mutex.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/mutex.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/mutex.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/mutex.c Tue Aug 12 09:42:36 2014
@@ -184,6 +184,17 @@ svn_mutex__unlock(svn_mutex__t *mutex,
              different but equivalent IDs for the same thread). */
           void *lock_owner = apr_atomic_casptr(&mutex->owner, NULL, NULL);
 
+          /* Check for double unlock. */
+          if (lock_owner == NULL)
+            {
+              /* There seems to be no guarantee that NULL is _not_ a valid
+                 thread ID.  Double check to be sure. */
+              if (!apr_os_thread_equal((apr_os_thread_t)lock_owner,
+                                       apr_os_thread_current()))
+                return svn_error_create(SVN_ERR_INVALID_UNLOCK, NULL, 
+                                  _("Tried to release a non-locked mutex"));
+            }
+
           /* Now, set it to NULL. */
           apr_atomic_casptr(&mutex->owner, NULL,  lock_owner);
         }
@@ -195,7 +206,13 @@ svn_mutex__unlock(svn_mutex__t *mutex,
 #else
       /* Update lock counter. */
       if (mutex->checked)
-        --mutex->count;
+        {
+          if (mutex->count <= 0)
+            return svn_error_create(SVN_ERR_INVALID_UNLOCK, NULL, 
+                                    _("Tried to release a non-locked mutex"));
+
+          --mutex->count;
+        }
 #endif
     }
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/named_atomic.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/named_atomic.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/named_atomic.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/named_atomic.c Tue Aug 12 09:42:36 2014
@@ -266,7 +266,7 @@ init_thread_mutex(void *baton, apr_pool_
   /* let the mutex live as long as the APR */
   apr_pool_t *global_pool = svn_pool_create(NULL);
 
-  return svn_mutex__init(&thread_mutex, USE_THREAD_MUTEX, FALSE, global_pool);
+  return svn_mutex__init(&thread_mutex, USE_THREAD_MUTEX, TRUE, global_pool);
 }
 #endif /* APR_HAS_MMAP */
 
@@ -275,10 +275,14 @@ init_thread_mutex(void *baton, apr_pool_
 static svn_error_t *
 lock(struct mutex_t *mutex)
 {
-  SVN_MUTEX__WITH_LOCK(thread_mutex,
-                       svn_io__file_lock_autocreate(mutex->lock_name,
-                                                    mutex->pool));
-  return SVN_NO_ERROR;
+  svn_error_t *err;
+  SVN_ERR(svn_mutex__lock(thread_mutex));
+
+  err = svn_io__file_lock_autocreate(mutex->lock_name, mutex->pool);
+  if (err)
+    err = svn_mutex__unlock(thread_mutex, err);
+
+  return svn_error_trace(err);
 }
 
 /* Utility that releases the lock previously acquired via lock().  If the

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/sqlite.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/sqlite.c Tue Aug 12 09:42:36 2014
@@ -934,7 +934,7 @@ close_apr(void *data)
             {
 #ifdef SVN_DEBUG
               const char *stmt_text = db->statement_strings[i];
-              stmt_text = stmt_text; /* Provide value for debugger */
+              SVN_UNUSED(stmt_text);
 
               SVN_ERR_MALFUNCTION_NO_RETURN();
 #else

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/utf8proc.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/utf8proc.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/utf8proc.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/utf8proc.c Tue Aug 12 09:42:36 2014
@@ -28,7 +28,6 @@
 #include "private/svn_string_private.h"
 #include "private/svn_utf_private.h"
 #include "svn_private_config.h"
-#define UNUSED(x) ((void)(x))
 
 #define UTF8PROC_INLINE
 /* Somehow utf8proc thinks it is nice to use strlen as an argument name,
@@ -41,10 +40,10 @@
 const char *svn_utf__utf8proc_version(void)
 {
   /* Unused static function warning removal hack. */
-  UNUSED(utf8proc_NFD);
-  UNUSED(utf8proc_NFC);
-  UNUSED(utf8proc_NFKD);
-  UNUSED(utf8proc_NFKC);
+  SVN_UNUSED(utf8proc_NFD);
+  SVN_UNUSED(utf8proc_NFC);
+  SVN_UNUSED(utf8proc_NFKD);
+  SVN_UNUSED(utf8proc_NFKC);
 
   return utf8proc_version();
 }

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_subr/win32_xlate.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_subr/win32_xlate.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_subr/win32_xlate.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_subr/win32_xlate.c Tue Aug 12 09:42:36 2014
@@ -116,7 +116,17 @@ get_page_id_from_name(UINT *page_id_p, c
   if ((page_name[0] == 'c' || page_name[0] == 'C')
       && (page_name[1] == 'p' || page_name[1] == 'P'))
     {
-      *page_id_p = atoi(page_name + 2);
+      int page_id;
+
+      err = svn_cstring_atoi(&page_id, page_name + 2);
+      if (err)
+        {
+          apr_status_t saved = err->apr_err;
+          svn_error_clear(err);
+          return saved;
+        }
+
+      *page_id_p = page_id;
       return APR_SUCCESS;
     }
 

Modified: subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_wc/workqueue.c Tue Aug 12 09:42:36 2014
@@ -1489,8 +1489,11 @@ svn_wc__wq_run(svn_wc__db_t *db,
   {
     static int count = 0;
     const char *count_env_var = getenv("SVN_DEBUG_WORK_QUEUE");
+    int count_env_val;
 
-    if (count_env_var && ++count == atoi(count_env_var))
+    SVN_ERR(svn_cstring_atoi(&count_env_val, count_env_var));
+
+    if (count_env_var && ++count == count_env_val)
       return svn_error_create(SVN_ERR_CANCELLED, NULL, "fake cancel");
   }
 #endif

Modified: subversion/branches/remove-log-addressing/subversion/svn_private_config.hw
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/svn_private_config.hw?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/svn_private_config.hw (original)
+++ subversion/branches/remove-log-addressing/subversion/svn_private_config.hw Tue Aug 12 09:42:36 2014
@@ -118,6 +118,10 @@
 #define SVN__PREDICT_TRUE(x)  (x)
 #define SVN__PREDICT_FALSE(x)  (x)
 
+/* Macro used to specify that a variable is intentionally left unused.
+   Supresses compiler warnings about the variable being unused.  */
+#define SVN_UNUSED(v) ( (void)(v) )
+
 #endif /* SVN_PRIVATE_CONFIG_HW */
 
 /* Inclusion of Berkeley DB header */

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=1617440&r1=1617439&r2=1617440&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 Tue Aug 12 09:42:36 2014
@@ -3431,7 +3431,6 @@ def update_deletes_file_external(sbox):
                                      sbox.repo_url + '/A_copy')
 
   # Update the working copy
-  sbox.simple_commit()
   sbox.simple_update()
 
   # Remove the branch

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/lock-helper.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/lock-helper.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/lock-helper.c (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/lock-helper.c Tue Aug 12 09:42:36 2014
@@ -26,7 +26,6 @@
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
 #include "svn_fs.h"
-#include "svn_fs.h"
 
 int
 main(int argc, const char *argv[])

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=1617440&r1=1617439&r2=1617440&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 Tue Aug 12 09:42:36 2014
@@ -213,6 +213,24 @@ def get_txns(repo_dir):
 
   return txns
 
+def write_sharded_format(repo_dir, shards):
+  """Rewrite the format of the FSFS or FSX repository REPO_DIR so
+  that it would use sharding with SHARDS revisions per shard."""
+
+  format_path = os.path.join(repo_dir, "db", "format")
+  contents = open(format_path, 'rb').read()
+  processed_lines = []
+
+  for line in contents.split("\n"):
+    if line.startswith("layout "):
+      processed_lines.append("layout sharded %d" % shards)
+    else:
+      processed_lines.append(line)
+
+  new_contents = "\n".join(processed_lines)
+  os.chmod(format_path, 0666)
+  open(format_path, 'wb').write(new_contents)
+
 def load_and_verify_dumpstream(sbox, expected_stdout, expected_stderr,
                                revs, check_props, dump, *varargs):
   """Load the array of lines passed in DUMP into the current tests'
@@ -1734,24 +1752,21 @@ def hotcopy_incremental(sbox):
 @SkipUnless(svntest.main.fs_has_pack)
 def hotcopy_incremental_packed(sbox):
   "'svnadmin hotcopy --incremental' with packing"
+
+  # Configure two files per shard to trigger packing.
   sbox.build()
+  write_sharded_format(sbox.repo_dir, 2)
 
   backup_dir, backup_url = sbox.add_repo_path('backup')
   os.mkdir(backup_dir)
   cwd = os.getcwd()
 
-  # Configure two files per shard to trigger packing
-  format_file = open(os.path.join(sbox.repo_dir, 'db', 'format'), 'wb')
-  if svntest.main.options.server_minor_version >= 9:
-    format_file.write("7\nlayout sharded 2\n")
-  else:
-    format_file.write("6\nlayout sharded 2\n")
-  format_file.close()
-
-  # Pack revisions 0 and 1.
-  svntest.actions.run_and_verify_svnadmin(
-    None, ['Packing revisions in shard 0...done.\n'], [], "pack",
-    os.path.join(cwd, sbox.repo_dir))
+  # Pack revisions 0 and 1 if not already packed.
+  if not (svntest.main.is_fs_type_fsfs and svntest.main.options.fsfs_packing
+          and svntest.main.options.fsfs_sharding == 2):
+    svntest.actions.run_and_verify_svnadmin(
+      None, ['Packing revisions in shard 0...done.\n'], [], "pack",
+      os.path.join(cwd, sbox.repo_dir))
 
   # Commit 5 more revs, hotcopy and pack after each commit.
   for i in [1, 2, 3, 4, 5]:
@@ -1767,7 +1782,8 @@ def hotcopy_incremental_packed(sbox):
     if i < 5:
       sbox.simple_mkdir("newdir-%i" % i)
       sbox.simple_commit()
-      if not i % 2:
+      if (svntest.main.is_fs_type_fsfs and not svntest.main.options.fsfs_packing
+          and not i % 2):
         expected_output = ['Packing revisions in shard %d...done.\n' % (i/2)]
       else:
         expected_output = []
@@ -2384,23 +2400,10 @@ def fsfs_hotcopy_old_with_id_changes(sbo
 @SkipUnless(svntest.main.fs_has_pack)
 def verify_packed(sbox):
   "verify packed with small shards"
-  sbox.build()
 
   # Configure two files per shard to trigger packing.
-  if svntest.main.is_fs_type_fsx():
-    format = "1\nlayout sharded 2\n"
-  elif svntest.main.is_fs_type_fsfs and \
-       svntest.main.options.server_minor_version >= 9:
-    format = "7\nlayout sharded 2\n"
-  elif svntest.main.is_fs_type_fsfs and \
-       svntest.main.options.server_minor_version < 9:
-    format = "6\nlayout sharded 2\n"
-  else:
-    raise svntest.Failure
-
-  format_file = open(os.path.join(sbox.repo_dir, 'db', 'format'), 'wb')
-  format_file.write(format)
-  format_file.close()
+  sbox.build()
+  write_sharded_format(sbox.repo_dir, 2)
 
   # Play with our greek tree.  These changesets fall into two
   # separate shards with r2 and r3 being in shard 1 ...
@@ -2463,7 +2466,7 @@ def verify_packed(sbox):
 def freeze_freeze(sbox):
   "svnadmin freeze svnadmin freeze (some-cmd)"
 
-  sbox.build(read_only=True) # need working copy as location for arg-file
+  sbox.build(create_wc=False, read_only=True)
   second_repo_dir, _ = sbox.add_repo_path('backup')
   svntest.actions.run_and_verify_svnadmin(None, None, [], "hotcopy",
                                           sbox.repo_dir, second_repo_dir)
@@ -2475,7 +2478,7 @@ def freeze_freeze(sbox):
                  svntest.main.svnadmin_binary, 'freeze', '--', second_repo_dir,
                  sys.executable, '-c', 'True')
 
-  arg_file = sbox.ospath('arg-file')
+  arg_file = sbox.get_tempname()
   svntest.main.file_write(arg_file,
                           "%s\n%s\n" % (sbox.repo_dir, second_repo_dir))
 
@@ -2560,17 +2563,7 @@ def fsfs_hotcopy_progress(sbox):
   sbox.build(create_wc=False)
   svntest.main.safe_rmtree(sbox.repo_dir, True)
   svntest.main.create_repos(sbox.repo_dir)
-
-  if svntest.main.options.server_minor_version >= 9:
-    format = "7\nlayout sharded 3\n"
-  elif svntest.main.options.server_minor_version < 9:
-    format = "6\nlayout sharded 3\n"
-  else:
-    raise svntest.Failure
-
-  format_file = open(os.path.join(sbox.repo_dir, 'db', 'format'), 'wb')
-  format_file.write(format)
-  format_file.close()
+  write_sharded_format(sbox.repo_dir, 3)
 
   inc_backup_dir, inc_backup_url = sbox.add_repo_path('incremental-backup')
 

Modified: subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/main.py?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/cmdline/svntest/main.py Tue Aug 12 09:42:36 2014
@@ -1011,7 +1011,7 @@ def create_repos(path, minor_version = N
     # post-commit
     # Note that some tests (currently only commit_tests) create their own
     # post-commit hooks, which would override this one. :-(
-    if options.fsfs_packing:
+    if options.fsfs_packing and minor_version >=6:
       # some tests chdir.
       abs_path = os.path.abspath(path)
       create_python_hook_script(get_post_commit_hook_path(abs_path),
@@ -1507,6 +1507,10 @@ class TestSpawningThread(threading.Threa
       args.append('--exclusive-wc-locks')
     if options.memcached_server:
       args.append('--memcached-server=' + options.memcached_server)
+    if options.fsfs_sharding:
+      args.append('--fsfs-sharding=' + str(options.fsfs_sharding))
+    if options.fsfs_packing:
+      args.append('--fsfs-packing')
 
     result, stdout_lines, stderr_lines = spawn_process(command, 0, False, None,
                                                        *args)

Modified: subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/fs-test.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs/fs-test.c Tue Aug 12 09:42:36 2014
@@ -5307,6 +5307,48 @@ dir_prop_merge(const svn_test_opts_t *op
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+reopen_modify(const svn_test_opts_t *opts,
+              apr_pool_t *pool)
+{
+  svn_fs_t *fs;
+  svn_revnum_t head_rev = 0;
+  svn_fs_root_t *root, *reopen_root;
+  svn_fs_txn_t *txn, *reopen_txn;
+  const char *txn_name;
+  svn_string_t *value;
+
+  /* Create test repository with greek tree. */
+  SVN_ERR(svn_test__create_fs(&fs, "test-reopen-modify", opts, pool));
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, head_rev, pool));
+  SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+  SVN_ERR(svn_test__create_greek_tree(root, pool));
+  SVN_ERR(test_commit_txn(&head_rev, txn, NULL, pool));
+
+  /* Create txn with changes. */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, head_rev, pool));
+  SVN_ERR(svn_fs_txn_name(&txn_name, txn, pool)); 
+  SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+  SVN_ERR(svn_fs_make_dir(root, "X", pool));
+
+  /* Reopen, add more changes. */
+  SVN_ERR(svn_fs_open_txn(&reopen_txn, fs, txn_name, pool));
+  SVN_ERR(svn_fs_txn_root(&reopen_root, reopen_txn, pool));
+  SVN_ERR(svn_fs_change_node_prop(reopen_root, "A", "name",
+                                  svn_string_create("value", pool),
+                                  pool));
+
+  /* Reopen, commit */
+  SVN_ERR(svn_fs_open_txn(&reopen_txn, fs, txn_name, pool));
+  SVN_ERR(test_commit_txn(&head_rev, reopen_txn, NULL, pool));
+
+  SVN_ERR(svn_fs_revision_root(&root, fs, head_rev, pool));
+  SVN_ERR(svn_fs_node_prop(&value, root, "A", "name", pool));
+  SVN_TEST_ASSERT(value && !strcmp(value->data, "value"));
+
+  return SVN_NO_ERROR;
+}
+
 
 /* ------------------------------------------------------------------------ */
 
@@ -5402,6 +5444,8 @@ static struct svn_test_descriptor_t test
                        "test svn_fs__compatible_version"),
     SVN_TEST_OPTS_PASS(dir_prop_merge,
                        "test merge directory properties"),
+    SVN_TEST_OPTS_PASS(reopen_modify,
+                       "test reopen and modify txn"),
     SVN_TEST_NULL
   };
 

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=1617440&r1=1617439&r2=1617440&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 Tue Aug 12 09:42:36 2014
@@ -1115,9 +1115,9 @@ recursive_locking(const svn_test_opts_t 
   svn_fs_t *fs;
 
   /* Bail (with success) on known-untestable scenarios */
-  if (strcmp(opts->fs_type, "bdb") == 0)
+  if (strcmp(opts->fs_type, "fsfs") != 0)
     return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL,
-                            "BDB won't test for recursive locks");
+                            "this will test FSFS repositories only");
 
   SVN_ERR(svn_test__create_fs(&fs, REPO_NAME, opts, pool));
   SVN_ERR(svn_fs_fs__with_all_locks(fs, lock_again, fs, pool));

Propchange: subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/tests/libsvn_fs_x:r1603891-1617438

Modified: subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c?rev=1617440&r1=1617439&r2=1617440&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c (original)
+++ subversion/branches/remove-log-addressing/subversion/tests/libsvn_fs_x/fs-x-pack-test.c Tue Aug 12 09:42:36 2014
@@ -814,11 +814,12 @@ test_reps(const svn_test_opts_t *opts,
   builder = svn_fs_x__reps_builder_create(fs, pool);
   for (i = 10000; i > 10; --i)
     {
+      apr_size_t idx;
       svn_string_t string;
       string.data = contents->data;
       string.len = i;
 
-      svn_fs_x__reps_add(builder, &string);
+      SVN_ERR(svn_fs_x__reps_add(&idx, builder, &string));
     }
 
   serialized = svn_stringbuf_create_empty(pool);