You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/03/31 16:40:11 UTC

svn commit: r1583338 [1/2] - in /subversion/branches/remote-only-status: ./ build/generator/templates/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_fs/ subversion/libsvn_fs_fs/ subversion/libsvn_fs_x/ subv...

Author: brane
Date: Mon Mar 31 14:40:09 2014
New Revision: 1583338

URL: http://svn.apache.org/r1583338
Log:
On the remote-only-status branch: sync with trunk up to r1583335.

Removed:
    subversion/branches/remote-only-status/subversion/libsvn_repos/repos_pool.c
Modified:
    subversion/branches/remote-only-status/   (props changed)
    subversion/branches/remote-only-status/build/generator/templates/vcnet_vcxproj.ezt
    subversion/branches/remote-only-status/configure.ac
    subversion/branches/remote-only-status/subversion/include/private/svn_object_pool.h
    subversion/branches/remote-only-status/subversion/include/private/svn_repos_private.h
    subversion/branches/remote-only-status/subversion/include/svn_fs.h
    subversion/branches/remote-only-status/subversion/include/svn_repos.h
    subversion/branches/remote-only-status/subversion/include/svn_wc.h
    subversion/branches/remote-only-status/subversion/libsvn_client/blame.c
    subversion/branches/remote-only-status/subversion/libsvn_client/compat_providers.c
    subversion/branches/remote-only-status/subversion/libsvn_fs/fs-loader.c
    subversion/branches/remote-only-status/subversion/libsvn_fs_fs/lock.c
    subversion/branches/remote-only-status/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/remote-only-status/subversion/libsvn_fs_x/cached_data.c
    subversion/branches/remote-only-status/subversion/libsvn_fs_x/lock.c
    subversion/branches/remote-only-status/subversion/libsvn_ra_serf/update.c
    subversion/branches/remote-only-status/subversion/libsvn_ra_svn/client.c
    subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cram.c
    subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cyrus_auth.c
    subversion/branches/remote-only-status/subversion/libsvn_ra_svn/marshal.c
    subversion/branches/remote-only-status/subversion/libsvn_ra_svn/streams.c
    subversion/branches/remote-only-status/subversion/libsvn_repos/authz_pool.c
    subversion/branches/remote-only-status/subversion/libsvn_repos/config_pool.c
    subversion/branches/remote-only-status/subversion/libsvn_subr/object_pool.c
    subversion/branches/remote-only-status/subversion/libsvn_subr/stream.c
    subversion/branches/remote-only-status/subversion/libsvn_wc/conflicts.c
    subversion/branches/remote-only-status/subversion/libsvn_wc/update_editor.c
    subversion/branches/remote-only-status/subversion/libsvn_wc/util.c
    subversion/branches/remote-only-status/subversion/mod_dav_svn/authz.c
    subversion/branches/remote-only-status/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/remote-only-status/subversion/mod_dav_svn/liveprops.c
    subversion/branches/remote-only-status/subversion/mod_dav_svn/merge.c
    subversion/branches/remote-only-status/subversion/mod_dav_svn/reports/update.c
    subversion/branches/remote-only-status/subversion/mod_dav_svn/repos.c
    subversion/branches/remote-only-status/subversion/mod_dav_svn/util.c
    subversion/branches/remote-only-status/subversion/mod_dav_svn/version.c
    subversion/branches/remote-only-status/subversion/svn/cl.h
    subversion/branches/remote-only-status/subversion/svn/conflict-callbacks.c
    subversion/branches/remote-only-status/subversion/svn/file-merge.c
    subversion/branches/remote-only-status/subversion/svn/list-cmd.c
    subversion/branches/remote-only-status/subversion/svnlook/svnlook.c
    subversion/branches/remote-only-status/subversion/svnserve/serve.c
    subversion/branches/remote-only-status/subversion/svnserve/server.h
    subversion/branches/remote-only-status/subversion/svnserve/svnserve.c
    subversion/branches/remote-only-status/subversion/svnsync/svnsync.c
    subversion/branches/remote-only-status/subversion/tests/cmdline/davautocheck.sh
    subversion/branches/remote-only-status/subversion/tests/libsvn_fs_x/   (props changed)
    subversion/branches/remote-only-status/subversion/tests/libsvn_fs_x/string-table-test.c
    subversion/branches/remote-only-status/subversion/tests/libsvn_repos/repos-test.c
    subversion/branches/remote-only-status/subversion/tests/libsvn_subr/packed-data-test.c
    subversion/branches/remote-only-status/subversion/tests/libsvn_subr/string-test.c
    subversion/branches/remote-only-status/subversion/tests/libsvn_wc/conflict-data-test.c
    subversion/branches/remote-only-status/subversion/tests/svn_test_main.c
    subversion/branches/remote-only-status/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh
    subversion/branches/remote-only-status/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
    subversion/branches/remote-only-status/tools/buildbot/slaves/svn-sparc-solaris/svncleanup.sh
    subversion/branches/remote-only-status/tools/dev/unix-build/Makefile.svn

Propchange: subversion/branches/remote-only-status/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1581845-1583335

Modified: subversion/branches/remote-only-status/build/generator/templates/vcnet_vcxproj.ezt
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/build/generator/templates/vcnet_vcxproj.ezt?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/build/generator/templates/vcnet_vcxproj.ezt (original)
+++ subversion/branches/remote-only-status/build/generator/templates/vcnet_vcxproj.ezt Mon Mar 31 14:40:09 2014
@@ -18,8 +18,7 @@
      under the License.
 -->
 ]<?xml version="1.0" encoding="utf-8"?>
-[format "xml"]
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+[format "xml"]<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
 [for configs][for platforms]    <ProjectConfiguration Include="[configs.name]|[platforms]">
       <Configuration>[configs.name]</Configuration>
@@ -33,9 +32,9 @@
 [for platforms][for configs]  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'" Label="Configuration">
     <ConfigurationType>[config_type]</ConfigurationType>
     <UseDebugLibraries>[is configs.name "Debug"]true[else]false[end]</UseDebugLibraries>
+    <PlatformToolset>[toolset_version]</PlatformToolset>
 [is configs.name "Release"]    <WholeProgramOptimization>true</WholeProgramOptimization>
-[end]    <PlatformToolset>[toolset_version]</PlatformToolset>
-  </PropertyGroup>
+[end]  </PropertyGroup>
 [end][end]  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   </ImportGroup>
@@ -43,21 +42,21 @@
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
 [end][end]  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-[for configs][for platforms]    <OutDir Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">$(SolutionDir)[configs.name]\[target.output_dir]\</OutDir>
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">$(SolutionDir)[configs.name]\obj\[target.intermediate_dir]\[target.proj_name]\</IntDir>
-    <TargetName Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">[target.output_name_without_ext]</TargetName>
-[is config_type "DynamicLibrary"][is target.output_ext ".dll"][else]    <TargetExt>[target.output_ext]</TargetExt>
-[end][end][end][end]  </PropertyGroup>
-[for configs][for platforms]  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">
+[for platforms][for configs]  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">
+    <OutDir>$(SolutionDir)[configs.name]\[target.output_dir]\</OutDir>
+    <IntDir>$(SolutionDir)[configs.name]\obj\[target.intermediate_dir]\[target.proj_name]\</IntDir>
+    <TargetName>[target.output_name_without_ext]</TargetName>
+[is configs.name "Debug"]    <LinkIncremental>false</LinkIncremental>
+[end][is config_type "DynamicLibrary"][is target.output_ext ".dll"][else]    <TargetExt>[target.output_ext]</TargetExt>
+[end][end]  </PropertyGroup>
+[end][end][for configs][for platforms]  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='[configs.name]|[platforms]'">
     <ClCompile>
 [is configs.name "Debug"]      <Optimization>Disabled</Optimization>
 [else]      <Optimization>Full</Optimization>
       <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
-      <StringPooling>true</StringPooling>
 [end]      <AdditionalIncludeDirectories>$(SolutionDir)[configs.name];[for configs.includes][configs.includes];[end]%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <StringPooling>true</StringPooling>
       <PreprocessorDefinitions>[if-any instrument_apr_pools]APR_POOL_DEBUG=[instrument_apr_pools];[end][is platforms "x64"]WIN64;[end][for configs.defines][configs.defines];[end]%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <WarningLevel>Level4</WarningLevel>
       <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -72,8 +71,9 @@
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
       <EnableUAC>true</EnableUAC>
-[is configs.name "Debug"]      <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
-[else]      <OptimizeReferences>true</OptimizeReferences>
+      <OptimizeReferences>true</OptimizeReferences>
+[is configs.name "Debug"]      <EnableCOMDATFolding>false</EnableCOMDATFolding>
+      <IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
 [end]    </Link>
 [else][is config_type "DynamicLibrary"]    <Link>
       <AdditionalDependencies>[for configs.libs][configs.libs];[end]%(AdditionalDependencies)</AdditionalDependencies>

Modified: subversion/branches/remote-only-status/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/configure.ac?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/configure.ac (original)
+++ subversion/branches/remote-only-status/configure.ac Mon Mar 31 14:40:09 2014
@@ -684,13 +684,22 @@ AC_ARG_ENABLE(nls,
   [enable_nls=$enableval],[enable_nls=yes])
 
 USE_NLS="no"
+SVN_INTL_LIBS=""
 if test "$enable_nls" = "yes"; then
   dnl First, check to see if there is a working msgfmt.
   AC_PATH_PROG(MSGFMT, msgfmt, none)
   AC_PATH_PROG(MSGMERGE, msgmerge, none)
   AC_PATH_PROG(XGETTEXT, xgettext, none)
   if test "$MSGFMT" != "none"; then
-    AC_SEARCH_LIBS(bindtextdomain, [intl], [],
+    AC_SEARCH_LIBS(bindtextdomain, [intl],
+                   [
+                      # in case libintl needs to be linked explicitly,
+                      # $ac_cv_search_bindtextdomain contains -l linker flags
+                      if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
+                      then
+                        SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
+                      fi
+                   ],
                    [
                     enable_nls="no"
                    ])
@@ -702,6 +711,10 @@ if test "$enable_nls" = "yes"; then
       AC_SEARCH_LIBS(bindtextdomain, [intl],
                      [
                       enable_nls="yes"
+                      if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
+                      then
+                        SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
+                      fi
                       # This is here so that -liconv ends up in LIBS
                       # if it worked with -liconv.
                       AC_CHECK_LIB(iconv, libiconv_open)
@@ -720,7 +733,6 @@ if test "$enable_nls" = "yes"; then
   fi
 fi
 
-dnl Currently SVN_INTL_LIBS is always empty.
 AC_SUBST(SVN_INTL_LIBS)
 
 AH_BOTTOM([

Modified: subversion/branches/remote-only-status/subversion/include/private/svn_object_pool.h
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/include/private/svn_object_pool.h?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/include/private/svn_object_pool.h (original)
+++ subversion/branches/remote-only-status/subversion/include/private/svn_object_pool.h Mon Mar 31 14:40:09 2014
@@ -90,16 +90,8 @@ typedef svn_error_t * (* svn_object_pool
  * one (or both) may be NULL and the default implementation assumes that
  * wrapper == object and updating is a no-op.
  *
- * Unused objects won't be cleaned up immediately to speed up repeated
- * lookup / release sequences.  The implementation will try to keep the
- * number of unused objects between MIN_UNUSED and MAX_UNUSED.  However,
- * there is no guarantee that it will remain in that range.
- *
- * If SHARE_OBJECTS is TRUE, #svn_object_pool__lookup will return multiple
- * references to the same object for the same key.  Otherwise, all used
- * references for the same key will be to independent instances.  If
- * THREAD_SAFE is not set, neither the object pool nor the object references
- * returned from it may be accessed from multiple threads.
+ * If THREAD_SAFE is not set, neither the object pool nor the object
+ * references returned from it may be accessed from multiple threads.
  *
  * It is not legal to call any API on the object pool after POOL got
  * cleared or destroyed.  However, existing object references handed out
@@ -110,24 +102,20 @@ svn_error_t *
 svn_object_pool__create(svn_object_pool__t **object_pool,
                         svn_object_pool__getter_t getter,
                         svn_object_pool__setter_t setter,
-                        apr_size_t min_unused,
-                        apr_size_t max_unused,
-                        svn_boolean_t share_objects,
                         svn_boolean_t thread_safe,
                         apr_pool_t *pool);
 
 /* Return the root pool containing the OBJECT_POOL and all sub-structures.
  */
 apr_pool_t *
-svn_object_pool__pool(svn_object_pool__t *object_pool);
+svn_object_pool__new_wrapper_pool(svn_object_pool__t *object_pool);
 
 /* Return the mutex used to serialize all OBJECT_POOL access.
  */
 svn_mutex__t *
 svn_object_pool__mutex(svn_object_pool__t *object_pool);
 
-/* Return the total number of object instances in OBJECT_POOL, including
- * unused ones.
+/* Return the number of object instances (used or unused) in OBJECT_POOL.
  */
 unsigned
 svn_object_pool__count(svn_object_pool__t *object_pool);

Modified: subversion/branches/remote-only-status/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/include/private/svn_repos_private.h?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/remote-only-status/subversion/include/private/svn_repos_private.h Mon Mar 31 14:40:09 2014
@@ -162,11 +162,11 @@ svn_repos__retrieve_config(svn_config_t 
  */
 typedef struct svn_repos__config_pool_t svn_repos__config_pool_t;
 
-/* Create a new configuration pool object with a minimum lifetime determined
- * by POOL and return it in *CONFIG_POOL.  References to any configuration
- * in the *CONFIG_POOL will keep the latter alive beyond POOL cleanup.
+/* Create a new configuration pool object with a lifetime determined by
+ * POOL and return it in *CONFIG_POOL.
+ * 
  * The THREAD_SAFE flag indicates whether the pool actually needs to be
- * thread-safe.
+ * thread-safe and POOL must be also be thread-safe if this flag is set.
  */
 svn_error_t *
 svn_repos__config_pool_create(svn_repos__config_pool_t **config_pool,
@@ -188,7 +188,9 @@ svn_repos__config_pool_create(svn_repos_
  * instead of creating a new repo instance.  Note that this might not
  * return the latest content.
  *
- * POOL determines the minimum lifetime of *CFG.
+ * POOL determines the minimum lifetime of *CFG (may remain cached after
+ * release) but must not exceed the lifetime of the pool provided to
+ * #svn_repos__config_pool_create.
  */
 svn_error_t *
 svn_repos__config_pool_get(svn_config_t **cfg,
@@ -215,14 +217,13 @@ svn_repos__config_pool_get(svn_config_t 
  */
 typedef struct svn_repos__authz_pool_t svn_repos__authz_pool_t;
 
-/* Create a new authorization pool object with a minimum lifetime determined
- * by POOL and return it in *AUTHZ_POOL.  CONFIG_POOL will be the common
- * source for the configuration data underlying the authz objects.
+/* Create a new authorization pool object with a lifetime determined by
+ * POOL and return it in *AUTHZ_POOL.  CONFIG_POOL will be the common
+ * source for the configuration data underlying the authz objects and must
+ * remain valid at least until POOL cleanup.
+ *
  * The THREAD_SAFE flag indicates whether the pool actually needs to be
- * thread-safe.
- * 
- * References to any authorization object in the *AUTHZ_POOL will keep the
- * latter alive beyond POOL cleanup.
+ * thread-safe and POOL must be also be thread-safe if this flag is set.
  */
 svn_error_t *
 svn_repos__authz_pool_create(svn_repos__authz_pool_t **authz_pool,
@@ -244,7 +245,9 @@ svn_repos__authz_pool_create(svn_repos__
  * instead of creating a new repo instance.  Note that this might not
  * return the latest content.
  *
- * POOL determines the minimum lifetime of *AUTHZ_P.
+ * POOL determines the minimum lifetime of *AUTHZ_P (may remain cached
+ * after release) but must not exceed the lifetime of the pool provided to
+ * svn_repos__authz_pool_create.
  */
 svn_error_t *
 svn_repos__authz_pool_get(svn_authz_t **authz_p,
@@ -257,49 +260,6 @@ svn_repos__authz_pool_get(svn_authz_t **
 
 /** @} */
 
-/**
- * @defgroup svn_repos_pool svn_repos_t object pool API
- * @{
- */
-
-/* Opaque thread-safe factory and container for svn_repos_t objects.
- */
-typedef struct svn_repos__repos_pool_t svn_repos__repos_pool_t;
-
-/* Create a new repository pool object with a minimum lifetime determined
- * by POOL and return it in *REPOS_POOL.  All repositories share the same
- * FS_CONFIG configuration which may be NULL.  The THREAD_SAFE flag
- * indicates whether the pool actually needs to be thread-safe.
- *
- * References to any repository instances in *REPOS_POOL will keep the
- * latter alive beyond POOL cleanup.
- */
-svn_error_t *
-svn_repos__repos_pool_create(svn_repos__repos_pool_t **repos_pool,
-                             apr_hash_t *fs_config,
-                             svn_boolean_t thread_safe,
-                             apr_pool_t *pool);
-
-/* Set *REPOS_P to an open repository object for the repository at local
- * path REPOS_ROOT.  If UUID is given, the repository's UUID must match it;
- * otherwise we re-read from disk.
- *
- * Once POOL gets cleared or destroyed, REPOS_POOL will store the repository
- * instance and make further callers may return that same instance.  POOL
- * determines the minimum lifetime of *REPOS_P.
- *
- * Note that you may need to update the youngest revision info cached
- * inside *REPOS_P. 
- */
-svn_error_t *
-svn_repos__repos_pool_get(svn_repos_t **repos_p,
-                          svn_repos__repos_pool_t *repos_pool,
-                          const char *repos_root,
-                          const char *uuid,
-                          apr_pool_t *pool);
-
-/** @} */
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/remote-only-status/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/include/svn_fs.h?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/include/svn_fs.h (original)
+++ subversion/branches/remote-only-status/subversion/include/svn_fs.h Mon Mar 31 14:40:09 2014
@@ -2502,7 +2502,7 @@ svn_fs_set_uuid(svn_fs_t *fs,
  * mainly due to the serialization for tokens for pre-commit hook.
  *
  * Locks are not secret; anyone can view existing locks in a
- * filesystem.  Locks are not omnipotent: they can broken and stolen
+ * filesystem.  Locks are not omnipotent: they can be broken and stolen
  * by people who don't "own" the lock.  (Though admins can tailor a
  * custom break/steal policy via libsvn_repos pre-lock hook script.)
  *
@@ -2513,7 +2513,10 @@ svn_fs_set_uuid(svn_fs_t *fs,
  */
 
 /** The @a targets hash passed to svn_fs_lock2() has <tt>const char
-   *</tt> keys and <tt>svn_fs_lock_target_t *</tt> values. */
+ * *</tt> keys and <tt>svn_fs_lock_target_t *</tt> values.
+ *
+ * @since New in 1.9.
+ */
 typedef struct svn_fs_lock_target_t
 {
   const char *token;
@@ -2522,8 +2525,11 @@ typedef struct svn_fs_lock_target_t
 } svn_fs_lock_target_t;
 
 /** The @a results hash returned by svn_fs_lock2() and svn_fs_unlock2()
-   has <tt>const char *</tt> keys and <tt>svn_fs_lock_result_t *</tt>
-   values. */
+ * has <tt>const char *</tt> keys and <tt>svn_fs_lock_result_t *</tt>
+ * values.
+ *
+ * @since New in 1.9.
+ */
 typedef struct svn_fs_lock_result_t
 {
   svn_lock_t *lock;
@@ -2532,15 +2538,14 @@ typedef struct svn_fs_lock_result_t
 } svn_fs_lock_result_t;
 
 /** Lock the paths in @a targets in @a fs, and set @a *results to the
- * locks or errors representing each new lock, allocated in @a
- * result_pool.
+ * locks or errors representing each new lock.
  *
  * @warning You may prefer to use svn_repos_fs_lock2() instead,
  * which see.
  *
  * @a fs must have a username associated with it (see
  * #svn_fs_access_t), else return #SVN_ERR_FS_NO_USER.  Set the
- * 'owner' field in the new lock to the fs username.
+ * 'owner' field in each new lock to the fs username.
  *
  * @a comment is optional: it's either an xml-escapable UTF8 string
  * which describes the lock, or it is @c NULL.
@@ -2561,7 +2566,7 @@ typedef struct svn_fs_lock_result_t
  * that existing lock.  If current_rev is a valid revnum, then do an
  * out-of-dateness check.  If the revnum is less than the
  * last-changed-revision of the path (or if the path doesn't exist in
- * HEAD), return * #SVN_ERR_FS_OUT_OF_DATE.
+ * HEAD), yeild an #SVN_ERR_FS_OUT_OF_DATE error for this path.
  *
  * If a path is already locked, then return #SVN_ERR_FS_PATH_ALREADY_LOCKED,
  * unless @a steal_lock is TRUE, in which case "steal" the existing
@@ -2575,10 +2580,14 @@ typedef struct svn_fs_lock_result_t
  * The results are returned in @a *results hash where the keys are
  * <tt>const char *</tt> paths and the values are
  * <tt>svn_fs_lock_result_t *</tt>.  The error associated with each
- * path is returned as #svn_fs_lock_result_t->err.  The caller must
- * ensure that all such errors are handled to avoid leaks.  The lock
- * associated with each path is returned as #svn_fs_lock_result_t->lock,
- * this will be @c NULL if no lock was created.
+ * path is returned as #svn_fs_lock_result_t->err. The lock associated
+ * with each path is returned as #svn_fs_lock_result_t->lock; this
+ * will be @c NULL if no lock was created. @a *results will always be
+ * a valid hash and in all cases the caller must ensure that all
+ * errors it contains are handled to avoid leaks.
+ *
+ * Allocate @a *results in @a result_pool. Use @a scratch_pool for
+ * temporary allocations.
  *
  * @note At this time, only files can be locked.
  *
@@ -2626,28 +2635,29 @@ svn_fs_generate_lock_token(const char **
 
 
 /** Remove the locks on the paths in @a targets in @a fs, and return
- * the results in @a *results allocated in @a result_pool.
+ * the results in @a *results.
  *
  * The paths to be unlocked are passed as <tt>const char *</tt> keys
- * of the @a targets hash with <tt>svn_fs_lock_target_t *</tt> values.
- * #svn_fs_lock_target_t->token provides the token to be unlocked for
- * each path. If the the token doesn't point to a lock, return
- * #SVN_ERR_FS_BAD_LOCK_TOKEN.  If the token points to an expired
- * lock, return #SVN_ERR_FS_LOCK_EXPIRED.  If @a fs has no username
- * associated with it, return #SVN_ERR_FS_NO_USER unless @a break_lock
- * is specified.
+ * of the @a targets hash with the corresponding lock tokens as
+ * <tt>const char *</tt> values.  If the the token doesn't point to a
+ * lock, yield an #SVN_ERR_FS_BAD_LOCK_TOKEN errot for this path.  If
+ * the token points to an expired lock, yield an
+ * #SVN_ERR_FS_LOCK_EXPIRED error for this path.  If @a fs has no
+ * username associated with it, yield an #SVN_ERR_FS_NO_USER unless @a
+ * break_lock is specified.
  *
  * If the token points to a lock, but the username of @a fs's access
- * context doesn't match the lock's owner, return
- * #SVN_ERR_FS_LOCK_OWNER_MISMATCH.  If @a break_lock is TRUE, however, don't
- * return error;  allow the lock to be "broken" in any case.  In the latter
- * case, the token shall be @c NULL.
+ * context doesn't match the lock's owner, yield an
+ * #SVN_ERR_FS_LOCK_OWNER_MISMATCH.  If @a break_lock is TRUE,
+ * however, don't return error; allow the lock to be "broken" in any
+ * case.  In the latter case, the token shall be @c NULL.
  *
  * The results are returned in @a *results hash where the keys are
  * <tt>const char *</tt> paths and the values are
  * <tt>svn_fs_lock_result_t *</tt>.  The error associated with each
- * path is returned as #svn_fs_lock_result_t->err.  The caller must
- * ensure that all such errors are handled to avoid leaks.
+ * path is returned as #svn_fs_lock_result_t->err.  @a *results will
+ * always be a valid hash and in all cases the caller must ensure that
+ * all errors it contains are handled to avoid leaks.
  *
  * @note #svn_fs_lock_target_t is used to allow @c NULL tokens to be
  * passed (it is not possible to pass @c NULL as a hash value
@@ -2657,7 +2667,8 @@ svn_fs_generate_lock_token(const char **
  * be returned (it is not possible to return @c SVN_NO_ERROR as a hash
  * value directly), #svn_fs_lock_result_t->lock is always NULL.
  *
- * Use @a scratch_pool for temporary allocations.
+ * Allocate @a *results in @a result_pool. Use @a scratch_pool for
+ * temporary allocations.
  *
  * @since New in 1.9.
  */

Modified: subversion/branches/remote-only-status/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/include/svn_repos.h?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/include/svn_repos.h (original)
+++ subversion/branches/remote-only-status/subversion/include/svn_repos.h Mon Mar 31 14:40:09 2014
@@ -2185,24 +2185,27 @@ svn_repos_fs_begin_txn_for_update(svn_fs
  */
 
 /** Like svn_fs_lock2(), but invoke the @a repos's pre- and
- * post-lock hooks before and after the locking action.  Use @a pool
- * for any necessary allocations.
+ * post-lock hooks before and after the locking action.
  *
- * The pre-lock is run for every path in @a targets. Those entries in
- * @a targets for which the pre-lock is successful are passed to
- * svn_fs_lock2 and the post-lock is run for those that are
- * successfully locked.
- *
- * @a results contains the result of running the pre-lock and
- * svn_fs_lock2 if the pre-lock was successful.  If an error occurs
- * when running the post-lock hook the error is returned wrapped with
- * SVN_ERR_REPOS_POST_LOCK_HOOK_FAILED.  If the caller sees this
- * error, it knows that the some locks succeeded.  In all cases the
- * caller must handle all errors in @a results to avoid leaks.
+ * The pre-lock is run for every path in @a targets. Those targets for
+ * which the pre-lock is successful are passed to svn_fs_lock2 and the
+ * post-lock is run for those that are successfully locked.
+ *
+ * @a results contains the result for each target of running the
+ * pre-lock and svn_fs_lock2 if the pre-lock was successful.
+ *
+ * If an error occurs when running the post-lock hook the error is
+ * returned wrapped with SVN_ERR_REPOS_POST_LOCK_HOOK_FAILED.  If the
+ * caller sees this error, it knows that the some locks succeeded.  In
+ * all cases the caller must handle all errors in @a results to avoid
+ * leaks.
  *
  * The pre-lock hook may cause a different token to be used for the
- * lock, instead of @a token; see the pre-lock-hook documentation for
- * more.
+ * lock, instead of the token supplied; see the pre-lock-hook
+ * documentation for more.
+ *
+ * Allocate @a *results in @a result_pool. Use @a scratch_pool for
+ * temporary allocations.
  *
  * @since New in 1.9.
  */
@@ -2235,16 +2238,26 @@ svn_repos_fs_lock(svn_lock_t **lock,
 
 
 /** Like svn_fs_unlock(), but invoke the @a repos's pre- and
- * post-unlock hooks before and after the unlocking action.  Use @a
- * pool for any necessary allocations.
+ * post-unlock hooks before and after the unlocking action.
  *
- * If the pre-unlock hook or svn_fs_unlock() fails, throw the original
- * error to caller.  If an error occurs when running the post-unlock
- * hook, return the original error wrapped with
- * SVN_ERR_REPOS_POST_UNLOCK_HOOK_FAILED.  If the caller sees this
- * error, it knows that the unlock succeeded anyway.
+ * The pre-unlock hook is run for every path in @a targets. Those
+ * targets for which the pre-unlock is successful are passed to
+ * svn_fs_unlock2 and the post-unlock is run for those that are
+ * successfully unlocked.
+ *
+ * @a results contains the result for each target of running the
+ * pre-unlock and svn_fs_unlock2 if the pre-unlock was successful.
+
+ * If an error occurs when running the post-unlock hook, return the
+ * original error wrapped with SVN_ERR_REPOS_POST_UNLOCK_HOOK_FAILED.
+ * If the caller sees this error, it knows that some unlocks
+ * succeeded.  In all cases the caller must handle all error in @a
+ * results to avoid leaks.
  *
- * @since New in 1.2.
+ * Allocate @a *results in @a result_pool. Use @a scratch_pool for
+ * temporary allocations.
+ *
+ * @since New in 1.9.
  */
 svn_error_t *
 svn_repos_fs_unlock2(apr_hash_t **results,
@@ -2254,6 +2267,10 @@ svn_repos_fs_unlock2(apr_hash_t **result
                      apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool);
 
+/* Similar to svn_repos_fs_unlock2 but only unlocks a single path.
+ *
+ * @since New in 1.2.
+ */
 svn_error_t *
 svn_repos_fs_unlock(svn_repos_t *repos,
                     const char *path,

Modified: subversion/branches/remote-only-status/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/include/svn_wc.h?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/include/svn_wc.h (original)
+++ subversion/branches/remote-only-status/subversion/include/svn_wc.h Mon Mar 31 14:40:09 2014
@@ -1806,18 +1806,16 @@ typedef struct svn_wc_conflict_descripti
    * @a base_abspath, @a their_abspath and @a my_abspath are absolute
    * paths.
    *
-   * ### Is @a merged_file relative to some directory, or absolute?
-   *
-   * All four files will be in repository-normal form -- LF
-   * line endings and contracted keywords.  (If any of these files are
-   * not available, they default to NULL.)
+   * All four files will be in repository-normal form -- Standardized LF
+   * and contracted keywords.  (If any of these files are not available
+   * they default to NULL.)
    *
    * On the other hand, if this is a property-conflict, then these
    * paths represent temporary files that contain the three different
    * property-values in conflict.  The fourth path (@c merged_file)
    * may or may not be NULL;  if set, it represents libsvn_wc's
-   * attempt to merge the property values together.  (Remember that
-   * property values are technically binary values, and thus can't
+   * attempt to merge the property values together.  (Remember that files
+   * and property values are technically binary values, and thus can't
    * always be merged.)
    */
   const char *base_abspath;  /* common ancestor of the two files being merged */
@@ -1829,7 +1827,7 @@ typedef struct svn_wc_conflict_descripti
   const char *my_abspath;
 
   /** merged version; may contain conflict markers */
-  const char *merged_file;
+  const char *merged_abspath;
 
   /** For property conflicts, the path to the property reject file. */
   const char *prop_reject_abspath;
@@ -8129,7 +8127,8 @@ typedef struct svn_wc_revision_status_t
   svn_boolean_t switched; /**< Is anything switched? */
   svn_boolean_t modified; /**< Is anything modified? */
 
-  /** Whether any WC paths are at a depth other than #svn_depth_infinity.
+  /** Whether any WC paths are at a depth other than #svn_depth_infinity or
+   * are user excluded.
    * @since New in 1.5.
    */
   svn_boolean_t sparse_checkout;

Modified: subversion/branches/remote-only-status/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_client/blame.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_client/blame.c Mon Mar 31 14:40:09 2014
@@ -281,6 +281,8 @@ add_file_blame(const char *last_file,
                struct blame_chain *chain,
                struct rev *rev,
                const svn_diff_file_options_t *diff_options,
+               svn_cancel_func_t cancel_func,
+               void *cancel_baton,
                apr_pool_t *pool)
 {
   if (!last_file)
@@ -299,7 +301,8 @@ add_file_blame(const char *last_file,
       /* We have a previous file.  Get the diff and adjust blame info. */
       SVN_ERR(svn_diff_file_diff_2(&diff, last_file, cur_file,
                                    diff_options, pool));
-      SVN_ERR(svn_diff_output(diff, &diff_baton, &output_fns));
+      SVN_ERR(svn_diff_output2(diff, &diff_baton, &output_fns,
+                               cancel_func, cancel_baton));
     }
 
   return SVN_NO_ERROR;
@@ -331,7 +334,9 @@ update_blame(void *baton)
   /* Process this file. */
   SVN_ERR(add_file_blame(frb->last_filename,
                          dbaton->filename, chain, dbaton->rev,
-                         frb->diff_options, frb->currpool));
+                         frb->diff_options,
+                         frb->ctx->cancel_func, frb->ctx->cancel_baton,
+                         frb->currpool));
 
   /* If we are including merged revisions, and the current revision is not a
      merged one, we need to add its blame info to the chain for the original
@@ -342,7 +347,9 @@ update_blame(void *baton)
 
       SVN_ERR(add_file_blame(frb->last_original_filename,
                              dbaton->filename, frb->chain, dbaton->rev,
-                             frb->diff_options, frb->currpool));
+                             frb->diff_options,
+                             frb->ctx->cancel_func, frb->ctx->cancel_baton,
+                             frb->currpool));
 
       /* This filename could be around for a while, potentially, so
          use the longer lifetime pool, and switch it with the previous one*/
@@ -792,7 +799,8 @@ svn_client_blame5(const char *target,
                                    ctx->cancel_baton, pool));
 
           SVN_ERR(add_file_blame(frb.last_filename, temppath, frb.chain, NULL,
-                                 frb.diff_options, pool));
+                                 frb.diff_options,
+                                 ctx->cancel_func, ctx->cancel_baton, pool));
 
           frb.last_filename = temppath;
         }

Modified: subversion/branches/remote-only-status/subversion/libsvn_client/compat_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_client/compat_providers.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_client/compat_providers.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_client/compat_providers.c Mon Mar 31 14:40:09 2014
@@ -27,6 +27,10 @@
 
 /*** Includes. ***/
 
+/* We define this here to remove any further warnings about the usage of
+   deprecated functions in this file. */
+#define SVN_DEPRECATED
+
 #include "svn_auth.h"
 #include "svn_client.h"
 

Modified: subversion/branches/remote-only-status/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_fs/fs-loader.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_fs/fs-loader.c Mon Mar 31 14:40:09 2014
@@ -1677,21 +1677,30 @@ svn_fs_lock(svn_lock_t **lock, svn_fs_t 
 {
   apr_hash_t *targets = apr_hash_make(pool), *results;
   svn_fs_lock_target_t target; 
-  svn_fs_lock_result_t *result;
+  svn_error_t *err;
 
   target.token = token;
   target.current_rev = current_rev;
   svn_hash_sets(targets, path, &target);
 
-  SVN_ERR(svn_fs_lock2(&results, fs, targets, comment, is_dav_comment,
-                       expiration_date, steal_lock, pool, pool));
+  err = svn_fs_lock2(&results, fs, targets, comment, is_dav_comment,
+                     expiration_date, steal_lock, pool, pool);
+
+  if (apr_hash_count(results))
+    {
+      svn_fs_lock_result_t *result
+        = svn__apr_hash_index_val(apr_hash_first(pool, results));
 
-  SVN_ERR_ASSERT(apr_hash_count(results));
-  result = svn__apr_hash_index_val(apr_hash_first(pool, results));
-  if (result->lock)
-    *lock = result->lock;
+      if (result->lock)
+        *lock = result->lock;
+
+      if (err && result->err)
+        svn_error_compose(err, result->err);
+      else if (!err)
+        err = result->err;
+    }
   
-  return result->err;
+  return err;
 }
 
 svn_error_t *
@@ -1717,18 +1726,26 @@ svn_fs_unlock(svn_fs_t *fs, const char *
               svn_boolean_t break_lock, apr_pool_t *pool)
 {
   apr_hash_t *targets = apr_hash_make(pool), *results;
-  svn_fs_lock_result_t *result;
+  svn_error_t *err;
 
   if (!token)
     token = "";
   svn_hash_sets(targets, path, token);
 
-  SVN_ERR(svn_fs_unlock2(&results, fs, targets, break_lock, pool, pool));
+  err = svn_fs_unlock2(&results, fs, targets, break_lock, pool, pool);
+
+  if (apr_hash_count(results))
+    {
+      svn_fs_lock_result_t *result
+        = svn__apr_hash_index_val(apr_hash_first(pool, results));
 
-  SVN_ERR_ASSERT(apr_hash_count(results));
-  result = svn__apr_hash_index_val(apr_hash_first(pool, results));
+      if (err && result->err)
+        svn_error_compose(err, result->err);
+      else if (!err)
+        err = result->err;
+    }
 
-  return result->err;
+  return err;
 }
 
 svn_error_t *

Modified: subversion/branches/remote-only-status/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_fs_fs/lock.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_fs_fs/lock.c Mon Mar 31 14:40:09 2014
@@ -1045,7 +1045,7 @@ unlock_body(void *baton, apr_pool_t *poo
       const svn_sort__item_t *item = &APR_ARRAY_IDX(ub->targets, i,
                                                     svn_sort__item_t);
       const char *token = item->value;
-      struct unlock_info_t info;
+      struct unlock_info_t info = { 0 };
 
       svn_pool_clear(iterpool);
 

Propchange: subversion/branches/remote-only-status/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
  Merged /subversion/trunk/subversion/libsvn_fs_x:r1581845-1583335

Modified: subversion/branches/remote-only-status/subversion/libsvn_fs_x/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_fs_x/cached_data.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_fs_x/cached_data.c Mon Mar 31 14:40:09 2014
@@ -96,14 +96,14 @@ dgb__log_access(svn_fs_t *fs,
       const char *data_rep
         = node->data_rep
         ? apr_psprintf(scratch_pool, " d=%ld/%" APR_UINT64_T_FMT,
-                       node->data_rep->revision,
-                       node->data_rep->item_index)
+                       svn_fs_x__get_revnum(node->data_rep->id.change_set),
+                       node->data_rep->id.number)
         : "";
       const char *prop_rep
         = node->prop_rep
         ? apr_psprintf(scratch_pool, " p=%ld/%" APR_UINT64_T_FMT,
-                       node->prop_rep->revision,
-                       node->prop_rep->item_index)
+                       svn_fs_x__get_revnum(node->prop_rep->id.change_set),
+                       node->prop_rep->id.number)
         : "";
       description = apr_psprintf(scratch_pool, "%s   (pc=%d%s%s)",
                                  node->created_path,

Modified: subversion/branches/remote-only-status/subversion/libsvn_fs_x/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_fs_x/lock.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_fs_x/lock.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_fs_x/lock.c Mon Mar 31 14:40:09 2014
@@ -1045,7 +1045,7 @@ unlock_body(void *baton, apr_pool_t *poo
       const svn_sort__item_t *item = &APR_ARRAY_IDX(ub->targets, i,
                                                     svn_sort__item_t);
       const char *token = item->value;
-      struct unlock_info_t info;
+      struct unlock_info_t info = { 0 };
 
       svn_pool_clear(iterpool);
 

Modified: subversion/branches/remote-only-status/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_ra_serf/update.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_ra_serf/update.c Mon Mar 31 14:40:09 2014
@@ -84,12 +84,17 @@ typedef enum report_state_e {
   PROP,
 
   FETCH_FILE,
+  FETCH_PROPS,
   TXDELTA,
 
   CHECKED_IN,
   CHECKED_IN_HREF,
 
-  MD5_CHECKSUM
+  MD5_CHECKSUM,
+
+  VERSION_NAME,
+  CREATIONDATE,
+  CREATOR_DISPLAYNAME
 } report_state_e;
 
 
@@ -193,8 +198,12 @@ static const svn_ra_serf__xml_transition
 
   { OPEN_FILE, S_, "prop", PROP,
     FALSE, { NULL }, FALSE },
+  { OPEN_DIR, S_, "prop", PROP,
+    FALSE, { NULL }, FALSE },
   { ADD_FILE, S_, "prop", PROP,
     FALSE, { NULL }, FALSE },
+  { ADD_DIR, S_, "prop", PROP,
+    FALSE, { NULL }, FALSE },
 
   { OPEN_FILE, S_, "txdelta", TXDELTA,
     FALSE, { "?base-checksum" }, TRUE },
@@ -214,6 +223,18 @@ static const svn_ra_serf__xml_transition
   { PROP, V_, "md5-checksum", MD5_CHECKSUM,
     TRUE, { NULL }, TRUE },
 
+  /* These are only reported for <= 1.6.x mod_dav_svn */
+  { OPEN_DIR, S_, "fetch-props", FETCH_PROPS,
+    FALSE, { NULL }, FALSE },
+  { OPEN_FILE, S_, "fetch-props", FETCH_PROPS,
+    FALSE, { NULL }, FALSE },
+
+  { PROP, D_, "version-name", VERSION_NAME,
+    TRUE, { NULL }, TRUE },
+  { PROP, D_, "creationdate", CREATIONDATE,
+    TRUE, { NULL }, TRUE },
+  { PROP, D_, "creator-displayname", CREATOR_DISPLAYNAME,
+    TRUE, { NULL }, TRUE },
   { 0 }
 };
 
@@ -1765,6 +1786,27 @@ update_opened(svn_ra_serf__xml_estate_t 
             }
         }
         break;
+
+      case FETCH_PROPS:
+        {
+          /* Subversion <= 1.6 servers will return a fetch-props element on
+             open-file and open-dir when non entry props were changed in
+             !send-all mode. In turn we fetch the full set of properties
+             and send all of those as *changes* to the editor. So these
+             editors have to be aware that they receive-non property changes.
+             (In case of incomplete directories they have to be aware anyway)
+
+             In r1063337 this behavior was changed in mod_dav_svn to always
+             send property changes inline in these cases. (See issue #3657)
+
+             Note that before that change the property changes to the last_*
+             entry props were already inlined via specific xml elements. */
+          if (ctx->cur_file)
+            ctx->cur_file->fetch_props = TRUE;
+          else if (ctx->cur_dir)
+            ctx->cur_dir->fetch_props = TRUE;
+        }
+        break;
     }
 
   return SVN_NO_ERROR;
@@ -2038,6 +2080,59 @@ update_closed(svn_ra_serf__xml_estate_t 
             }
         }
         break;
+
+      case VERSION_NAME:
+      case CREATIONDATE:
+      case CREATOR_DISPLAYNAME:
+        {
+          /* Subversion <= 1.6 servers would return a fetch-props element on
+             open-file and open-dir when non entry props were changed in
+             !send-all mode. In turn we fetch the full set of properties and
+             send those as *changes* to the editor. So these editors have to
+             be aware that they receive non property changes.
+             (In case of incomplete directories they have to be aware anyway)
+
+             In that case the last_* entry props are posted as 3 specific xml
+             elements, which we handle here.
+
+             In r1063337 this behavior was changed in mod_dav_svn to always
+             send property changes inline in these cases. (See issue #3657)
+           */
+
+          const char *propname;
+
+          if (ctx->cur_file)
+            SVN_ERR(ensure_file_opened(ctx->cur_file, scratch_pool));
+          else if (ctx->cur_dir)
+            SVN_ERR(ensure_dir_opened(ctx->cur_dir, scratch_pool));
+          else
+            break;
+
+          switch (leaving_state)
+            {
+              case VERSION_NAME:
+                propname = SVN_PROP_ENTRY_COMMITTED_REV;
+                break;
+              case CREATIONDATE:
+                propname = SVN_PROP_ENTRY_COMMITTED_DATE;
+                break;
+              case CREATOR_DISPLAYNAME:
+                propname = SVN_PROP_ENTRY_LAST_AUTHOR;
+                break;
+              default:
+                SVN_ERR_MALFUNCTION(); /* Impossible to reach */
+            }
+
+          if (ctx->cur_file)
+            SVN_ERR(ctx->editor->change_file_prop(ctx->cur_file->file_baton,
+                                                  propname, cdata,
+                                                  scratch_pool));
+          else
+            SVN_ERR(ctx->editor->change_dir_prop(ctx->cur_dir->dir_baton,
+                                                  propname, cdata,
+                                                  scratch_pool));
+        }
+        break;
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/remote-only-status/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_ra_svn/client.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_ra_svn/client.c Mon Mar 31 14:40:09 2014
@@ -233,7 +233,7 @@ svn_error_t *svn_ra_svn__auth_response(s
                                        apr_pool_t *pool,
                                        const char *mech, const char *mech_arg)
 {
-  return svn_ra_svn__write_tuple(conn, pool, "w(?c)", mech, mech_arg);
+  return svn_error_trace(svn_ra_svn__write_tuple(conn, pool, "w(?c)", mech, mech_arg));
 }
 
 static svn_error_t *handle_auth_request(svn_ra_svn__session_baton_t *sess,
@@ -624,8 +624,6 @@ static svn_error_t *open_session(svn_ra_
   sess->url = apr_pstrdup(pool, url);
   sess->user = uri->user;
   sess->hostname = uri->hostname;
-  sess->realm_prefix = apr_psprintf(pool, "<svn://%s:%d>", uri->hostname,
-                                    uri->port);
   sess->tunnel_name = tunnel_name;
   sess->tunnel_argv = tunnel_argv;
   sess->callbacks = callbacks;
@@ -639,6 +637,10 @@ static svn_error_t *open_session(svn_ra_
 
   if (tunnel_name)
     {
+      sess->realm_prefix = apr_psprintf(pool, "<svn+%s://%s:%d>",
+                                        tunnel_name,
+                                        uri->hostname, uri->port);
+
       if (tunnel_argv)
         SVN_ERR(make_tunnel(tunnel_argv, &conn, pool));
       else
@@ -667,6 +669,9 @@ static svn_error_t *open_session(svn_ra_
     }
   else
     {
+      sess->realm_prefix = apr_psprintf(pool, "<svn://%s:%d>", uri->hostname,
+                                        uri->port ? uri->port : SVN_RA_SVN_PORT);
+
       SVN_ERR(make_connection(uri->hostname,
                               uri->port ? uri->port : SVN_RA_SVN_PORT,
                               &sock, pool));
@@ -2005,7 +2010,7 @@ static svn_error_t *ra_svn_get_locations
 
   /* Read the response. This is so the server would have a chance to
    * report an error. */
-  return svn_ra_svn__read_cmd_response(conn, pool, "");
+  return svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, ""));
 }
 
 static svn_error_t *
@@ -2694,7 +2699,7 @@ static svn_error_t *ra_svn_replay(svn_ra
   SVN_ERR(svn_ra_svn_drive_editor2(sess->conn, pool, editor, edit_baton,
                                    NULL, TRUE));
 
-  return svn_ra_svn__read_cmd_response(sess->conn, pool, "");
+  return svn_error_trace(svn_ra_svn__read_cmd_response(sess->conn, pool, ""));
 }
 
 
@@ -2763,7 +2768,7 @@ ra_svn_replay_range(svn_ra_session_t *se
     }
   svn_pool_destroy(iterpool);
 
-  return svn_ra_svn__read_cmd_response(sess->conn, pool, "");
+  return svn_error_trace(svn_ra_svn__read_cmd_response(sess->conn, pool, ""));
 }
 
 
@@ -2829,7 +2834,8 @@ ra_svn_get_deleted_rev(svn_ra_session_t 
   SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
                                  N_("'get-deleted-rev' not implemented")));
 
-  return svn_ra_svn__read_cmd_response(conn, pool, "r", revision_deleted);
+  return svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, "r",
+                                                       revision_deleted));
 }
 
 static svn_error_t *

Modified: subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cram.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cram.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cram.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cram.c Mon Mar 31 14:40:09 2014
@@ -114,7 +114,7 @@ static svn_error_t *fail(svn_ra_svn_conn
                          const char *msg)
 {
   SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w(c)", "failure", msg));
-  return svn_ra_svn__flush(conn, pool);
+  return svn_error_trace(svn_ra_svn__flush(conn, pool));
 }
 
 /* If we can, make the nonce with random bytes.  If we can't... well,

Modified: subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cyrus_auth.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cyrus_auth.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_ra_svn/cyrus_auth.c Mon Mar 31 14:40:09 2014
@@ -709,7 +709,8 @@ static svn_error_t *
 sasl_data_available_cb(void *baton, svn_boolean_t *data_available)
 {
   sasl_baton_t *sasl_baton = baton;
-  return svn_ra_svn__stream_data_available(sasl_baton->stream, data_available);
+  return svn_error_trace(svn_ra_svn__stream_data_available(sasl_baton->stream,
+                                                         data_available));
 }
 
 svn_error_t *svn_ra_svn__enable_sasl_encryption(svn_ra_svn_conn_t *conn,
@@ -945,8 +946,8 @@ svn_ra_svn__do_cyrus_auth(svn_ra_svn__se
                  the CRAM-MD5 or ANONYMOUS plugins, in which case we can simply use
                  the built-in implementation. In all other cases this call will be
                  useless, but hey, at least we'll get consistent error messages. */
-              return svn_ra_svn__do_internal_auth(sess, mechlist,
-                                                  realm, pool);
+              return svn_error_trace(svn_ra_svn__do_internal_auth(sess, mechlist,
+                                                                realm, pool));
             }
           return err;
         }

Modified: subversion/branches/remote-only-status/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_ra_svn/marshal.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_ra_svn/marshal.c Mon Mar 31 14:40:09 2014
@@ -1546,7 +1546,7 @@ svn_ra_svn__read_cmd_response(svn_ra_svn
     }
   else if (strcmp(status, "failure") == 0)
     {
-      return svn_ra_svn__handle_failure_status(params, pool);
+      return svn_error_trace(svn_ra_svn__handle_failure_status(params, pool));
     }
 
   return svn_error_createf(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,

Modified: subversion/branches/remote-only-status/subversion/libsvn_ra_svn/streams.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_ra_svn/streams.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_ra_svn/streams.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_ra_svn/streams.c Mon Mar 31 14:40:09 2014
@@ -200,7 +200,7 @@ svn_error_t *
 svn_ra_svn__stream_write(svn_ra_svn__stream_t *stream,
                          const char *data, apr_size_t *len)
 {
-  return svn_stream_write(stream->out_stream, data, len);
+  return svn_error_trace(svn_stream_write(stream->out_stream, data, len));
 }
 
 svn_error_t *

Modified: subversion/branches/remote-only-status/subversion/libsvn_repos/authz_pool.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_repos/authz_pool.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_repos/authz_pool.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_repos/authz_pool.c Mon Mar 31 14:40:09 2014
@@ -130,11 +130,10 @@ svn_repos__authz_pool_create(svn_repos__
   svn_object_pool__t *object_pool;
 
   /* there is no setter as we don't need to update existing authz */
-  SVN_ERR(svn_object_pool__create(&object_pool, getter, NULL,
-                                  4, APR_UINT32_MAX, TRUE, thread_safe,
+  SVN_ERR(svn_object_pool__create(&object_pool, getter, NULL, thread_safe,
                                   pool));
 
-  result = apr_pcalloc(svn_object_pool__pool(object_pool), sizeof(*result));
+  result = apr_pcalloc(pool, sizeof(*result));
   result->object_pool = object_pool;
   result->config_pool = config_pool;
 
@@ -152,7 +151,7 @@ svn_repos__authz_pool_get(svn_authz_t **
                           apr_pool_t *pool)
 {
   apr_pool_t *authz_ref_pool
-    = svn_pool_create(svn_object_pool__pool(authz_pool->object_pool));
+    = svn_object_pool__new_wrapper_pool(authz_pool->object_pool);
   authz_object_t *authz_ref
     = apr_pcalloc(authz_ref_pool, sizeof(*authz_ref));
   svn_boolean_t have_all_keys;

Modified: subversion/branches/remote-only-status/subversion/libsvn_repos/config_pool.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_repos/config_pool.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_repos/config_pool.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_repos/config_pool.c Mon Mar 31 14:40:09 2014
@@ -212,7 +212,7 @@ auto_parse(svn_config_t **cfg,
     return SVN_NO_ERROR;
 
   /* create a pool for the new config object and parse the data into it  */
-  cfg_pool = svn_pool_create(svn_object_pool__pool(config_pool->object_pool));
+  cfg_pool = svn_object_pool__new_wrapper_pool(config_pool->object_pool);
 
   config_object = apr_pcalloc(cfg_pool, sizeof(*config_object));
 
@@ -439,19 +439,16 @@ svn_repos__config_pool_create(svn_repos_
 {
   svn_repos__config_pool_t *result;
   svn_object_pool__t *object_pool;
-  apr_pool_t *root_pool;
 
   SVN_ERR(svn_object_pool__create(&object_pool, getter, setter,
-                                  4, APR_UINT32_MAX, TRUE, thread_safe,
-                                  pool));
-  root_pool = svn_object_pool__pool(object_pool);
+                                  thread_safe, pool));
 
   /* construct the config pool in our private ROOT_POOL to survive POOL
    * cleanup and to prevent threading issues with the allocator */
-  result = apr_pcalloc(root_pool, sizeof(*result));
+  result = apr_pcalloc(pool, sizeof(*result));
 
   result->object_pool = object_pool;
-  result->in_repo_hash_pool = svn_pool_create(root_pool);
+  result->in_repo_hash_pool = svn_pool_create(pool);
   result->in_repo_configs = svn_hash__make(result->in_repo_hash_pool);
 
   *config_pool = result;

Modified: subversion/branches/remote-only-status/subversion/libsvn_subr/object_pool.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_subr/object_pool.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_subr/object_pool.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_subr/object_pool.c Mon Mar 31 14:40:09 2014
@@ -57,9 +57,6 @@ typedef struct object_ref_t
 
   /* Number of references to this data struct */
   volatile svn_atomic_t ref_count;
-
-  /* next struct in the hash bucket (same KEY) */
-  struct object_ref_t *next;
 } object_ref_t;
 
 
@@ -70,11 +67,6 @@ struct svn_object_pool__t
   /* serialization object for all non-atomic data in this struct */
   svn_mutex__t *mutex;
 
-  /* set to TRUE when pool passed to svn_object_pool__create() gets cleaned
-   * up.  When set, the last object reference released must also destroy
-   * this object pool object. */
-  volatile svn_atomic_t ready_for_cleanup;
-
   /* object_ref_t.KEY -> object_ref_t* mapping.
    *
    * In shared object mode, there is at most one such entry per key and it
@@ -83,172 +75,68 @@ struct svn_object_pool__t
    * instances for the key. */
   apr_hash_t *objects;
 
-  /* if TRUE, we operate in shared mode and in exclusive mode otherwise.
-   * This must not change over the lifetime. */
-  svn_boolean_t share_objects;
+  /* same as objects->count but allows for non-sync'ed access */
+  volatile svn_atomic_t object_count;
 
-  /* number of entries in CONFIGS with a reference count > 0 */
-  volatile svn_atomic_t used_count;
+  /* Number of entries in OBJECTS with a reference count 0.
+     Due to races, this may be *temporarily* off by one or more.
+     Hence we must not strictly depend on it. */
   volatile svn_atomic_t unused_count;
 
-  /* try to keep UNUSED_COUNT within this range */
-  apr_size_t min_unused;
-  apr_size_t max_unused;
-
   /* the root pool owning this structure */
-  apr_pool_t *root_pool;
-
-  /* this pool determines the minimum lifetime of this container.
-   * We use this to unregister cleanup routines (see below). */
-  apr_pool_t *owning_pool;
+  apr_pool_t *pool;
   
-  /* allocate the OBJECTS index here */
-  apr_pool_t *objects_hash_pool;
-
   /* extractor and updater for the user object wrappers */
   svn_object_pool__getter_t getter;
   svn_object_pool__setter_t setter;
 };
 
 
-/* Destructor function for the whole OBJECT_POOL.
- */
-static apr_status_t
-destroy_object_pool(svn_object_pool__t *object_pool)
-{
-  svn_mutex__lock(object_pool->mutex);
-
-  /* there should be no outstanding references to any object in this pool */
-  assert(svn_atomic_read(&object_pool->used_count) == 0);
-
-  /* make future attempts to access this pool cause definitive segfaults */
-  object_pool->objects = NULL;
-
-  /* This is the actual point of destruction. */
-  /* Destroying the pool will also release the lock. */
-  svn_pool_destroy(object_pool->root_pool);
-
-  return APR_SUCCESS;
-}
-
-/* Forward-declaration */
-static apr_status_t
-root_object_pool_cleanup(void *baton);
-
-/* Pool cleanup function for the whole object pool.  Actual destruction
- * will be deferred until no configurations are left in use.
+/* Pool cleanup function for the whole object pool.
  */
 static apr_status_t
 object_pool_cleanup(void *baton)
 {
   svn_object_pool__t *object_pool = baton;
 
-  /* disable the alternative cleanup */
-  apr_pool_cleanup_kill(object_pool->root_pool, baton,
-                        root_object_pool_cleanup);
-
-  /* from now on, anyone is allowed to destroy the OBJECT_POOL */
-  svn_atomic_set(&object_pool->ready_for_cleanup, TRUE);
-
-  /* are there no more external references and can we grab the cleanup flag? */
-  if (   svn_atomic_read(&object_pool->used_count) == 0
-      && svn_atomic_cas(&object_pool->ready_for_cleanup, FALSE, TRUE) == TRUE)
-    {
-      /* Attempts to get a configuration from a pool whose cleanup has
-       * already started is illegal.
-       * So, used_count must not increase again.
-       */
-      destroy_object_pool(object_pool);
-    }
+  /* all entries must have been released up by now */
+  SVN_ERR_ASSERT_NO_RETURN(   object_pool->object_count
+                           == object_pool->unused_count);
 
   return APR_SUCCESS;
 }
 
-/* This will be called when the root pool gets destroyed before the actual
- * owner pool.  This may happen if the owner pool is the global root pool. 
- * In that case, all the relevant cleanup has either already been done or
- * is default-scheduled.
- */
-static apr_status_t
-root_object_pool_cleanup(void *baton)
-{
-  svn_object_pool__t *object_pool = baton;
- 
-  /* disable the full-fledged cleanup code */
-  apr_pool_cleanup_kill(object_pool->owning_pool, baton,
-                        object_pool_cleanup);
-  
-  return APR_SUCCESS;
-}
-
-/* Re-allocate OBJECTS in OBJECT_POOL and remove all unused objects to
- * minimize memory consumption.
+/* Remove entries from OBJECTS in OBJECT_POOL that have a ref-count of 0.
  *
  * Requires external serialization on OBJECT_POOL.
  */
 static void
 remove_unused_objects(svn_object_pool__t *object_pool)
 {
-  apr_pool_t *new_pool = svn_pool_create(object_pool->root_pool);
-  apr_hash_t *new_hash = svn_hash__make(new_pool);
+  apr_pool_t *subpool = svn_pool_create(object_pool->pool);
 
   /* process all hash buckets */
   apr_hash_index_t *hi;
-  for (hi = apr_hash_first(object_pool->objects_hash_pool,
-                           object_pool->objects);
+  for (hi = apr_hash_first(subpool, object_pool->objects);
        hi != NULL;
        hi = apr_hash_next(hi))
     {
-      object_ref_t *previous = NULL;
       object_ref_t *object_ref = svn__apr_hash_index_val(hi);
-      object_ref_t *next;
 
-      /* follow the chain of object_ref_ts in this bucket */
-      for (; object_ref; object_ref = next)
+      /* note that we won't hand out new references while access
+         to the hash is serialized */
+      if (svn_atomic_read(&object_ref->ref_count) == 0)
         {
-          next = object_ref->next;
-          if (object_ref->ref_count == 0)
-            {
-              svn_atomic_dec(&object_pool->unused_count);
-              svn_pool_destroy(object_ref->pool);
-            }
-          else
-            {
-              object_ref->next = previous;
-              apr_hash_set(new_hash, object_ref->key.data,
-                           object_ref->key.size, object_ref);
-              previous = object_ref;
-            }
-        }
+          apr_hash_set(object_pool->objects, object_ref->key.data,
+                       object_ref->key.size, NULL);
+          svn_atomic_dec(&object_pool->object_count);
+          svn_atomic_dec(&object_pool->unused_count);
 
+          svn_pool_destroy(object_ref->pool);
+        }
     }
 
-  /* swap out the old container for the new one */
-  svn_pool_destroy(object_pool->objects_hash_pool);
-  object_pool->objects = new_hash;
-  object_pool->objects_hash_pool = new_pool;
-}
-
-/* If ERR is not SVN_NO_ERROR, handle it and terminate the application.
- *
- * Please make this generic if necessary instead of duplicating this code.
- */
-static void
-exit_on_error(const char *file, int line, svn_error_t *err)
-{
-  if (err)
-    {
-      char buffer[1024];
-
-      /* The svn_error_clear() is to make static analyzers happy.
-         svn_error__malfunction() will never return */
-      svn_error_clear(
-            svn_error__malfunction(FALSE /* can_return */, file, line,
-                                   svn_err_best_message(err, buffer,
-                                                        sizeof(buffer))
-                                   ));
-      abort(); /* Only reached by broken malfunction handlers */
-    }
+  svn_pool_destroy(subpool);
 }
 
 /* Cleanup function called when an object_ref_t gets released.
@@ -259,64 +147,17 @@ object_ref_cleanup(void *baton)
   object_ref_t *object = baton;
   svn_object_pool__t *object_pool = object->object_pool;
 
-  /* if we don't share objects and we are not allowed to hold on to
-   * unused object, delete them immediately. */
-  if (!object_pool->share_objects && object_pool->max_unused == 0)
-    {
-       /* there must only be the one references we are releasing right now */
-      assert(object->ref_count == 1);
-      svn_pool_destroy(object->pool);
-
-      /* see below for a more info on this final cleanup check */
-      if (   svn_atomic_dec(&object_pool->used_count) == 0
-          && svn_atomic_cas(&object_pool->ready_for_cleanup, FALSE, TRUE)
-             == TRUE)
-        {
-          destroy_object_pool(object_pool);
-        }
-
-     return APR_SUCCESS;
-    }
-
-  /* begin critical section */
-  exit_on_error(__FILE__, __LINE__,
-                svn_error_trace(svn_mutex__lock(object_pool->mutex)));
-
-  /* put back into "available" container */
-  if (!object_pool->share_objects)
-    {
-      svn_membuf_t *key = &object->key;
-
-      object->next = apr_hash_get(object_pool->objects, key->data, key->size);
-      apr_hash_set(object_pool->objects, key->data, key->size, object);
-    }
-
-  /* Release unused configurations if there are relatively frequent. */
-  if (   object_pool->unused_count > object_pool->max_unused
-      ||   object_pool->used_count * 2 + object_pool->min_unused
-         < object_pool->unused_count)
-    {
-      remove_unused_objects(object_pool);
-    }
-
-  /* end critical section */
-  exit_on_error(__FILE__, __LINE__,
-                svn_error_trace(svn_mutex__unlock(object_pool->mutex, NULL)));
+  /* If we released the last reference to object, there is one more
+     unused entry.
 
-  /* Maintain reference counters and handle object cleanup */
+     Note that unused_count does not need to be always exact but only
+     needs to become exact *eventually* (we use it to check whether we
+     should remove unused objects every now and then).  I.e. it must
+     never drift off / get stuck but always reflect the true value once
+     all threads left the racy sections.
+   */
   if (svn_atomic_dec(&object->ref_count) == 0)
-    {
-      svn_atomic_inc(&object_pool->unused_count);
-      if (   svn_atomic_dec(&object_pool->used_count) == 0
-          && svn_atomic_cas(&object_pool->ready_for_cleanup, FALSE, TRUE)
-             == TRUE)
-        {
-          /* There cannot be any future references to a config in this pool.
-           * So, we are the last one and need to finally clean it up.
-           */
-          destroy_object_pool(object_pool);
-        }
-    }
+    svn_atomic_inc(&object_pool->unused_count);
 
   return APR_SUCCESS;
 }
@@ -330,20 +171,10 @@ static void
 add_object_ref(object_ref_t *object_ref,
               apr_pool_t *pool)
 {
-  /* in exclusive mode, we only keep unused items in our hash */
-  if (!object_ref->object_pool->share_objects)
-    {
-      apr_hash_set(object_ref->object_pool->objects, object_ref->key.data,
-                   object_ref->key.size, object_ref->next);
-      object_ref->next = NULL;
-    }
-
-  /* update ref counter and global usage counters */
+  /* Update ref counter. 
+     Note that this is racy with object_ref_cleanup; see comment there. */
   if (svn_atomic_inc(&object_ref->ref_count) == 0)
-    {
-      svn_atomic_inc(&object_ref->object_pool->used_count);
-      svn_atomic_dec(&object_ref->object_pool->unused_count);
-    }
+    svn_atomic_dec(&object_ref->object_pool->unused_count);
 
   /* make sure the reference gets released automatically */
   apr_pool_cleanup_register(pool, object_ref, object_ref_cleanup,
@@ -392,7 +223,7 @@ insert(void **object,
 {
   object_ref_t *object_ref
     = apr_hash_get(object_pool->objects, key->data, key->size);
-  if (object_ref && object_pool->share_objects)
+  if (object_ref)
     {
       /* entry already exists (e.g. race condition) */
       svn_error_t *err = object_pool->setter(&object_ref->wrapper,
@@ -406,8 +237,14 @@ insert(void **object,
            * available ones.
            */
           apr_hash_set(object_pool->objects, key->data, key->size, NULL);
+          svn_atomic_dec(&object_pool->object_count);
+
+          /* for the unlikely case that the object got created _and_
+           * already released since we last checked: */
+          if (svn_atomic_read(&object_ref->ref_count) == 0)
+            svn_atomic_dec(&object_pool->unused_count);
 
-          /* cleanup the new data as well because it's now safe to use
+          /* cleanup the new data as well because it's not safe to use
            * either.
            */
           svn_pool_destroy(wrapper_pool);
@@ -428,8 +265,6 @@ insert(void **object,
       object_ref->object_pool = object_pool;
       object_ref->wrapper = wrapper;
       object_ref->pool = wrapper_pool;
-      object_ref->next = apr_hash_get(object_pool->objects, key->data,
-                                      key->size);
 
       svn_membuf__create(&object_ref->key, key->size, wrapper_pool);
       object_ref->key.size = key->size;
@@ -437,6 +272,7 @@ insert(void **object,
 
       apr_hash_set(object_pool->objects, object_ref->key.data,
                    object_ref->key.size, object_ref);
+      svn_atomic_inc(&object_pool->object_count);
 
       /* the new entry is *not* in use yet.
        * add_object_ref will update counters again. 
@@ -448,6 +284,11 @@ insert(void **object,
   *object = object_pool->getter(object_ref->wrapper, baton, result_pool);
   add_object_ref(object_ref, result_pool);
 
+  /* limit memory usage */
+  if (svn_atomic_read(&object_pool->unused_count) * 2
+      > apr_hash_count(object_pool->objects) + 2)
+    remove_unused_objects(object_pool);
+
   return SVN_NO_ERROR;
 }
 
@@ -479,43 +320,21 @@ svn_error_t *
 svn_object_pool__create(svn_object_pool__t **object_pool,
                         svn_object_pool__getter_t getter,
                         svn_object_pool__setter_t setter,
-                        apr_size_t min_unused,
-                        apr_size_t max_unused,
-                        svn_boolean_t share_objects,
                         svn_boolean_t thread_safe,
                         apr_pool_t *pool)
 {
   svn_object_pool__t *result;
 
-  /* our allocator may need to be thread-safe */
-  apr_pool_t *root_pool
-    = apr_allocator_owner_get(svn_pool_create_allocator(thread_safe));
-
-  /* paranoia limiter code */
-  if (max_unused > APR_UINT32_MAX)
-    max_unused = APR_UINT32_MAX;
-  if (min_unused > APR_UINT32_MAX)
-    min_unused = APR_UINT32_MAX;
-
-  if (max_unused < min_unused)
-    max_unused = min_unused;
-
   /* construct the object pool in our private ROOT_POOL to survive POOL
    * cleanup and to prevent threading issues with the allocator
    */
-  result = apr_pcalloc(root_pool, sizeof(*result));
-  SVN_ERR(svn_mutex__init(&result->mutex, thread_safe, root_pool));
+  result = apr_pcalloc(pool, sizeof(*result));
+  SVN_ERR(svn_mutex__init(&result->mutex, thread_safe, pool));
 
-  result->root_pool = root_pool;
-  result->owning_pool = pool;
-  result->objects_hash_pool = svn_pool_create(root_pool);
-  result->objects = svn_hash__make(result->objects_hash_pool);
-  result->ready_for_cleanup = FALSE;
-  result->share_objects = share_objects;
+  result->pool = pool;
+  result->objects = svn_hash__make(result->pool);
   result->getter = getter ? getter : default_getter;
   result->setter = setter ? setter : default_setter;
-  result->min_unused = min_unused;
-  result->max_unused = max_unused;
 
   /* make sure we clean up nicely.
    * We need two cleanup functions of which exactly one will be run
@@ -526,17 +345,15 @@ svn_object_pool__create(svn_object_pool_
    */
   apr_pool_cleanup_register(pool, result, object_pool_cleanup,
                             apr_pool_cleanup_null);
-  apr_pool_cleanup_register(root_pool, result, root_object_pool_cleanup,
-                            apr_pool_cleanup_null);
   
   *object_pool = result;
   return SVN_NO_ERROR;
 }
 
 apr_pool_t *
-svn_object_pool__pool(svn_object_pool__t *object_pool)
+svn_object_pool__new_wrapper_pool(svn_object_pool__t *object_pool)
 {
-  return object_pool->root_pool;
+  return svn_pool_create(object_pool->pool);
 }
 
 svn_mutex__t *
@@ -548,7 +365,7 @@ svn_object_pool__mutex(svn_object_pool__
 unsigned
 svn_object_pool__count(svn_object_pool__t *object_pool)
 {
-  return object_pool->used_count + object_pool->unused_count;
+  return svn_atomic_read(&object_pool->object_count);
 }
 
 svn_error_t *

Modified: subversion/branches/remote-only-status/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_subr/stream.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_subr/stream.c Mon Mar 31 14:40:09 2014
@@ -953,11 +953,11 @@ data_available_handler_apr(void *baton, 
 
   pfd.desc_type = APR_POLL_FILE;
   pfd.desc.f = btn->file;
-  pfd.p = btn->pool;
+  pfd.p = btn->pool; /* If we had a scratch pool... Luckily apr doesn't
+                        store anything in this pool at this time */
   pfd.reqevents = APR_POLLIN;
 
   status = apr_poll(&pfd, 1, &n, 0);
-  svn_pool_clear(btn->pool);
 
   if (status == APR_SUCCESS)
     {

Modified: subversion/branches/remote-only-status/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/remote-only-status/subversion/libsvn_wc/conflicts.c?rev=1583338&r1=1583337&r2=1583338&view=diff
==============================================================================
--- subversion/branches/remote-only-status/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/remote-only-status/subversion/libsvn_wc/conflicts.c Mon Mar 31 14:40:09 2014
@@ -1473,7 +1473,7 @@ generate_propconflict(svn_boolean_t *con
         {
           svn_stringbuf_t *merged_stringbuf;
 
-          if (!cdesc->merged_file && !result->merged_file)
+          if (!cdesc->merged_abspath && !result->merged_file)
             return svn_error_create
                 (SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE,
                  NULL, _("Conflict callback violated API:"
@@ -1482,7 +1482,7 @@ generate_propconflict(svn_boolean_t *con
           SVN_ERR(svn_stringbuf_from_file2(&merged_stringbuf,
                                            result->merged_file ?
                                                 result->merged_file :
-                                                cdesc->merged_file,
+                                                cdesc->merged_abspath,
                                            scratch_pool));
           new_value = svn_stringbuf__morph_into_string(merged_stringbuf);
           *conflict_remains = FALSE;
@@ -1809,7 +1809,7 @@ resolve_text_conflict(svn_skel_t **work_
                                     merged-file first: */
                                 result->merged_file
                                   ? result->merged_file
-                                  : cdesc->merged_file,
+                                  : cdesc->merged_abspath,
                                 result_pool, scratch_pool));
     }
 
@@ -1825,7 +1825,7 @@ resolve_text_conflict(svn_skel_t **work_
                                              /* ### Sure this is an abspath? */
                                              result->merged_file
                                                ? result->merged_file
-                                               : cdesc->merged_file,
+                                               : cdesc->merged_abspath,
                                              cdesc->my_abspath,
                                              result_pool, scratch_pool));
       *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
@@ -1873,7 +1873,7 @@ read_text_conflict_desc(svn_wc_conflict_
                                               db, local_abspath,
                                               conflict_skel,
                                               result_pool, scratch_pool));
-  (*desc)->merged_file = apr_pstrdup(result_pool, local_abspath);
+  (*desc)->merged_abspath = apr_pstrdup(result_pool, local_abspath);
 
   return SVN_NO_ERROR;
 }