subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1326832 [1/2] - in /subversion/branches/inheritable-props: ./ build/ build/ac-macros/ subversion/include/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_neon/ su...
Date Mon, 16 Apr 2012 23:45:40 GMT
Author: pburba
Date: Mon Apr 16 23:45:38 2012
New Revision: 1326832

URL: http://svn.apache.org/viewvc?rev=1326832&view=rev
Log:
On the inheritable-props branch: Sync with ^/subversion/trunk through
r1326830.

Added:
    subversion/branches/inheritable-props/subversion/include/private/svn_named_atomic.h
      - copied unchanged from r1326830, subversion/trunk/subversion/include/private/svn_named_atomic.h
    subversion/branches/inheritable-props/subversion/libsvn_subr/svn_named_atomic.c
      - copied unchanged from r1326830, subversion/trunk/subversion/libsvn_subr/svn_named_atomic.c
    subversion/branches/inheritable-props/subversion/tests/libsvn_subr/named_atomic-test-common.h
      - copied unchanged from r1326830, subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-common.h
    subversion/branches/inheritable-props/subversion/tests/libsvn_subr/named_atomic-test-proc.c
      - copied unchanged from r1326830, subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-proc.c
    subversion/branches/inheritable-props/subversion/tests/libsvn_subr/named_atomic-test.c
      - copied unchanged from r1326830, subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c
Modified:
    subversion/branches/inheritable-props/   (props changed)
    subversion/branches/inheritable-props/CHANGES
    subversion/branches/inheritable-props/Makefile.in
    subversion/branches/inheritable-props/build.conf
    subversion/branches/inheritable-props/build/ac-macros/svn-macros.m4
    subversion/branches/inheritable-props/build/run_tests.py
    subversion/branches/inheritable-props/configure.ac
    subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h
    subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h
    subversion/branches/inheritable-props/subversion/include/svn_error_codes.h
    subversion/branches/inheritable-props/subversion/include/svn_fs.h
    subversion/branches/inheritable-props/subversion/include/svn_io.h
    subversion/branches/inheritable-props/subversion/libsvn_client/add.c
    subversion/branches/inheritable-props/subversion/libsvn_client/client.h
    subversion/branches/inheritable-props/subversion/libsvn_client/commit.c
    subversion/branches/inheritable-props/subversion/libsvn_client/copy.c
    subversion/branches/inheritable-props/subversion/libsvn_client/delete.c
    subversion/branches/inheritable-props/subversion/libsvn_client/merge.c
    subversion/branches/inheritable-props/subversion/libsvn_client/mergeinfo.c
    subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c
    subversion/branches/inheritable-props/subversion/libsvn_client/util.c
    subversion/branches/inheritable-props/subversion/libsvn_delta/compat.c
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/caching.c
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/dag.c
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs.h
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/id.c
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.c
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.h
    subversion/branches/inheritable-props/subversion/libsvn_fs_fs/tree.c
    subversion/branches/inheritable-props/subversion/libsvn_ra_neon/fetch.c
    subversion/branches/inheritable-props/subversion/libsvn_ra_serf/commit.c
    subversion/branches/inheritable-props/subversion/libsvn_ra_svn/marshal.c
    subversion/branches/inheritable-props/subversion/libsvn_ra_svn/ra_svn.h
    subversion/branches/inheritable-props/subversion/libsvn_subr/cache-membuffer.c
    subversion/branches/inheritable-props/subversion/libsvn_subr/config_file.c
    subversion/branches/inheritable-props/subversion/libsvn_subr/io.c
    subversion/branches/inheritable-props/subversion/libsvn_subr/mergeinfo.c
    subversion/branches/inheritable-props/subversion/libsvn_subr/skel.c
    subversion/branches/inheritable-props/subversion/libsvn_subr/svn_string.c
    subversion/branches/inheritable-props/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/inheritable-props/subversion/libsvn_wc/ambient_depth_filter_editor.c
    subversion/branches/inheritable-props/subversion/libsvn_wc/entries.c
    subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.h
    subversion/branches/inheritable-props/subversion/mod_dav_svn/dav_svn.h
    subversion/branches/inheritable-props/subversion/mod_dav_svn/mod_dav_svn.c
    subversion/branches/inheritable-props/subversion/mod_dav_svn/repos.c
    subversion/branches/inheritable-props/subversion/svnadmin/main.c
    subversion/branches/inheritable-props/subversion/svnserve/main.c
    subversion/branches/inheritable-props/subversion/svnserve/serve.c
    subversion/branches/inheritable-props/subversion/svnserve/server.h
    subversion/branches/inheritable-props/subversion/tests/cmdline/svntest/main.py
    subversion/branches/inheritable-props/subversion/tests/libsvn_repos/repos-test.c
    subversion/branches/inheritable-props/subversion/tests/libsvn_subr/   (props changed)
    subversion/branches/inheritable-props/subversion/tests/libsvn_subr/crypto-test.c
    subversion/branches/inheritable-props/subversion/tests/libsvn_subr/string-test.c
    subversion/branches/inheritable-props/subversion/tests/libsvn_wc/op-depth-test.c
    subversion/branches/inheritable-props/subversion/tests/svn_test.h
    subversion/branches/inheritable-props/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
    subversion/branches/inheritable-props/tools/dist/release.py

Propchange: subversion/branches/inheritable-props/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1325561-1326830
  Merged /subversion/branches/revprop-cache:r1298521-1326293

Modified: subversion/branches/inheritable-props/CHANGES
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/CHANGES?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/CHANGES (original)
+++ subversion/branches/inheritable-props/CHANGES Mon Apr 16 23:45:38 2012
@@ -55,6 +55,9 @@ http://svn.apache.org/repos/asf/subversi
     * mod_dav_svn: error on MERGE of non-existent resource (r1298343)
     * fix undefined behaviour during multi-segment reverse merges (issue #4144)
     * fix potential pool lifetime problem in the diff code (r1311935)
+    * libsvn_wc: reduce resources use while looking for the wc root (r1306334)
+    * cmdline: fix segfault during 'svn diff' argument processing (r1311702)
+    * fix regression with deep commit followed by depthy update (issue #4136)
 
   Developer-visible changes:
     * swig-py tests: avoid FAILs on APR hash order (r1296137, r1292248)

Modified: subversion/branches/inheritable-props/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/Makefile.in?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/Makefile.in (original)
+++ subversion/branches/inheritable-props/Makefile.in Mon Apr 16 23:45:38 2012
@@ -490,6 +490,9 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $
 	    flags="--list --milestone-filter=$(MILESTONE_FILTER)             \
 		   --mode-filter=$(MODE_FILTER) --log-to-stdout $$flags";    \
 	  fi;                                                                \
+	  if test "$(SET_LOG_LEVEL)" != ""; then                             \
+	    flags="--set-log-level $(SET_LOG_LEVEL) $$flags";                \
+	  fi;                                                                \
 	  LD_LIBRARY_PATH='$(auth_plugin_dirs):$(LD_LIBRARY_PATH)'           \
 	  $(PYTHON) $(top_srcdir)/build/run_tests.py                         \
 	            --config-file $(top_srcdir)/subversion/tests/tests.conf  \
@@ -510,7 +513,7 @@ davcheck: bin $(TEST_DEPS) @BDB_TEST_DEP
 # run make check.
 davautocheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@ apache-mod svnmucc
 	@# Takes MODULE_PATH, USE_HTTPV1 and SVN_PATH_AUTHZ in the environment.
-	@APXS=$(APXS) bash $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
+	@APXS=$(APXS) $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
 
 # First, run:
 #   subversion/svnserve/svnserve -d -r `pwd`/subversion/tests/cmdline

Modified: subversion/branches/inheritable-props/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/build.conf?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/build.conf (original)
+++ subversion/branches/inheritable-props/build.conf Mon Apr 16 23:45:38 2012
@@ -331,7 +331,7 @@ msvc-export = 
         private\svn_token.h  private\svn_adler32.h
         private\svn_temp_serializer.h private\svn_io_private.h
         private\svn_string_private.h private\svn_magic.h
-        private\svn_subr_private.h private\svn_mutex.h
+        private\svn_subr_private.h private\svn_mutex.h private\svn_named_atomic.h
 
 # Working copy management lib
 [libsvn_wc]
@@ -792,6 +792,22 @@ sources = mergeinfo-test.c
 install = test
 libs = libsvn_test libsvn_subr apr
 
+[named_atomic-test]
+description = Test named atomics
+type = exe
+path = subversion/tests/libsvn_subr
+sources = named_atomic-test.c
+install = test
+libs = libsvn_test libsvn_subr apr
+
+[named_atomic-proc-test]
+description = Sub-process for named atomics
+type = exe
+path = subversion/tests/libsvn_subr
+sources = named_atomic-test-proc.c
+install = sub-test
+libs = libsvn_subr apr
+
 [path-test]
 description = Test path library
 type = exe
@@ -1142,7 +1158,7 @@ libs = __ALL__
        checksum-test compat-test config-test hashdump-test mergeinfo-test
        opt-test path-test stream-test string-test time-test utf-test
        target-test error-test cache-test spillbuf-test crypto-test
-       revision-test
+       named_atomic-test named_atomic-proc-test revision-test
        subst_translate-test
        translate-test
        random-test window-test

Modified: subversion/branches/inheritable-props/build/ac-macros/svn-macros.m4
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/build/ac-macros/svn-macros.m4?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/build/ac-macros/svn-macros.m4 (original)
+++ subversion/branches/inheritable-props/build/ac-macros/svn-macros.m4 Mon Apr 16 23:45:38 2012
@@ -202,3 +202,44 @@ AC_DEFUN([SVN_REMOVE_STANDARD_LIB_DIRS],
     printf "%s" "${output_flags# }"
   fi
 ])
+
+AC_DEFUN([SVN_CHECK_FOR_ATOMIC_BUILTINS],
+[
+  AC_CACHE_CHECK([whether the compiler provides atomic builtins], [svn_cv_atomic_builtins],
+  [AC_TRY_RUN([
+  int main()
+  {
+      unsigned long long val = 1010, tmp, *mem = &val;
+
+      if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020)
+          return 1;
+
+      tmp = val;
+
+      if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010)
+          return 1;
+
+      if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0)
+          return 1;
+
+      tmp = 3030;
+
+      if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp)
+          return 1;
+
+      if (__sync_lock_test_and_set(&val, 4040) != 3030)
+          return 1;
+
+      mem = &tmp;
+
+      if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp)
+          return 1;
+
+      __sync_synchronize();
+
+      if (mem != &val)
+          return 1;
+
+      return 0;
+  }], [svn_cv_atomic_builtins=yes], [svn_cv_atomic_builtins=no], [svn_cv_atomic_builtins=no])])
+])

Modified: subversion/branches/inheritable-props/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/build/run_tests.py?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/build/run_tests.py (original)
+++ subversion/branches/inheritable-props/build/run_tests.py Mon Apr 16 23:45:38 2012
@@ -84,7 +84,15 @@ def _get_term_width():
       return None
     return cr
 
-  cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
+  cr = None
+  if not cr:
+    try:
+      cr = (os.environ['SVN_MAKE_CHECK_LINES'],
+            os.environ['SVN_MAKE_CHECK_COLUMNS'])
+    except:
+      cr = None
+  if not cr:
+    cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2)
   if not cr:
     try:
       fd = os.open(os.ctermid(), os.O_RDONLY)
@@ -94,7 +102,7 @@ def _get_term_width():
       pass
   if not cr:
     try:
-      cr = (env['LINES'], env['COLUMNS'])
+      cr = (os.environ['LINES'], os.environ['COLUMNS'])
     except:
       cr = None
   if not cr:
@@ -113,7 +121,7 @@ class TestHarness:
                cleanup=None, enable_sasl=None, parallel=None, config_file=None,
                fsfs_sharding=None, fsfs_packing=None,
                list_tests=None, svn_bin=None, mode_filter=None,
-               milestone_filter=None):
+               milestone_filter=None, set_log_level=None):
     '''Construct a TestHarness instance.
 
     ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
@@ -160,6 +168,7 @@ class TestHarness:
       self.config_file = os.path.abspath(config_file)
     self.list_tests = list_tests
     self.milestone_filter = milestone_filter
+    self.set_log_level = set_log_level
     self.svn_bin = svn_bin
     self.mode_filter = mode_filter
     self.log = None
@@ -440,6 +449,8 @@ class TestHarness:
       svntest.main.options.list_tests = True
     if self.milestone_filter is not None:
       svntest.main.options.milestone_filter = self.milestone_filter
+    if self.set_log_level is not None:
+      svntest.main.logger.setLevel(self.set_log_level)
     if self.svn_bin is not None:
       svntest.main.options.svn_bin = self.svn_bin
     if self.fsfs_sharding is not None:
@@ -604,7 +615,7 @@ def main():
                             'fsfs-packing', 'fsfs-sharding=',
                             'enable-sasl', 'parallel', 'config-file=',
                             'log-to-stdout', 'list', 'milestone-filter=',
-                            'mode-filter='])
+                            'mode-filter=', 'set-log-level='])
   except getopt.GetoptError:
     args = []
 
@@ -614,9 +625,10 @@ def main():
 
   base_url, fs_type, verbose, cleanup, enable_sasl, http_library, \
     server_minor_version, fsfs_sharding, fsfs_packing, parallel, \
-    config_file, log_to_stdout, list_tests, mode_filter, milestone_filter= \
+    config_file, log_to_stdout, list_tests, mode_filter, milestone_filter, \
+    set_log_level = \
             None, None, None, None, None, None, None, None, None, None, None, \
-            None, None, None, None
+            None, None, None, None, None
   for opt, val in opts:
     if opt in ['-u', '--url']:
       base_url = val
@@ -648,6 +660,8 @@ def main():
       milestone_filter = val
     elif opt in ['--mode-filter']:
       mode_filter = val
+    elif opt in ['--set-log-level']:
+      set_log_level = val
     else:
       raise getopt.GetoptError
 
@@ -662,7 +676,8 @@ def main():
                    base_url, fs_type, http_library, server_minor_version,
                    verbose, cleanup, enable_sasl, parallel, config_file,
                    fsfs_sharding, fsfs_packing, list_tests,
-                   mode_filter=mode_filter, milestone_filter=milestone_filter)
+                   mode_filter=mode_filter, milestone_filter=milestone_filter,
+                   set_log_level=set_log_level)
 
   failed = th.run(args[2:])
   if failed:

Modified: subversion/branches/inheritable-props/configure.ac
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/configure.ac?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/configure.ac (original)
+++ subversion/branches/inheritable-props/configure.ac Mon Apr 16 23:45:38 2012
@@ -184,6 +184,12 @@ if test -n "$sqlite_compat_ver" && test 
   CFLAGS="-DSVN_SQLITE_MIN_VERSION_NUMBER=$sqlite_compat_ver_num $CFLAGS"
 fi
 
+SVN_CHECK_FOR_ATOMIC_BUILTINS
+
+if test "$svn_cv_atomic_builtins" = "yes"; then
+    AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
+fi
+
 dnl Set up a number of directories ---------------------
 
 dnl Create SVN_BINDIR for proper substitution
@@ -825,7 +831,7 @@ dnl Build and install rules ------------
 INSTALL_STATIC_RULES="install-bin install-docs"
 INSTALL_RULES="install-fsmod-lib install-ramod-lib install-lib install-include install-static"
 INSTALL_RULES="$INSTALL_RULES $INSTALL_APACHE_RULE"
-BUILD_RULES="fsmod-lib ramod-lib lib bin test $BUILD_APACHE_RULE tools"
+BUILD_RULES="fsmod-lib ramod-lib lib bin test sub-test $BUILD_APACHE_RULE tools"
 
 if test "$svn_lib_berkeley_db" = "yes"; then
   BUILD_RULES="$BUILD_RULES bdb-lib bdb-test"

Modified: subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_client_private.h Mon Apr 16 23:45:38 2012
@@ -146,10 +146,7 @@ svn_client__youngest_common_ancestor(con
 
 /* Set *ORIGIN_P to the origin of the WC node at WC_ABSPATH.  If the node
  * is a local copy, give the copy-from location.  If the node is locally
- * added or deleted, set the REV and URL fields to SVN_INVALID_REVNUM and
- * NULL respectively, but still give the correct repository root URL and
- * UUID.
- */
+ * added or deleted, set *ORIGIN_P to NULL. */
 svn_error_t *
 svn_client__wc_node_get_origin(svn_client__pathrev_t **origin_p,
                                const char *wc_abspath,

Modified: subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_string_private.h Mon Apr 16 23:45:38 2012
@@ -58,6 +58,26 @@ svn_stringbuf__morph_into_string(svn_str
  *  with APR 0.9 */
 apr_status_t
 svn__strtoff(apr_off_t *offset, const char *buf, char **end, int base);
+
+/** Number of chars needed to represent signed (19 places + sign + NUL) or
+ * unsigned (20 places + NUL) integers as strings.
+ */
+#define SVN_INT64_BUFFER_SIZE 21
+
+/** Writes the @a number as string into @a dest. The latter must provide
+ * space for at least #SVN_INT64_BUFFER_SIZE characters. Returns the number
+ * chars written excluding the terminating NUL.
+ */
+apr_size_t
+svn__ui64toa(char * dest, apr_uint64_t number);
+
+/** Writes the @a number as string into @a dest. The latter must provide
+ * space for at least #SVN_INT64_BUFFER_SIZE characters. Returns the number
+ * chars written excluding the terminating NUL.
+ */
+apr_size_t
+svn__i64toa(char * dest, apr_int64_t number);
+
 /** @} */
 
 /** @} */

Modified: subversion/branches/inheritable-props/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_error_codes.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_error_codes.h Mon Apr 16 23:45:38 2012
@@ -224,6 +224,11 @@ SVN_ERROR_START
              SVN_ERR_BAD_CATEGORY_START + 14,
              "Invalid changelist name")
 
+  /** @since New in 1.8. */
+  SVN_ERRDEF(SVN_ERR_BAD_ATOMIC,
+             SVN_ERR_BAD_CATEGORY_START + 15,
+             "Invalid atomic")
+
   /* xml errors */
 
   SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,

Modified: subversion/branches/inheritable-props/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_fs.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_fs.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_fs.h Mon Apr 16 23:45:38 2012
@@ -85,6 +85,12 @@ typedef struct svn_fs_t svn_fs_t;
  */
 #define SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS      "fsfs-cache-fulltexts"
 
+/** Enable / disable revprop caching for a FSFS repository.
+ *
+ * @since New in 1.8.
+ */
+#define SVN_FS_CONFIG_FSFS_CACHE_REVPROPS       "fsfs-cache-revprops"
+
 /* See also svn_fs_type(). */
 /** @since New in 1.1. */
 #define SVN_FS_CONFIG_FS_TYPE                   "fs-type"

Modified: subversion/branches/inheritable-props/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/svn_io.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/svn_io.h (original)
+++ subversion/branches/inheritable-props/subversion/include/svn_io.h Mon Apr 16 23:45:38 2012
@@ -682,6 +682,39 @@ svn_io_file_lock2(const char *lock_file,
                   svn_boolean_t exclusive,
                   svn_boolean_t nonblocking,
                   apr_pool_t *pool);
+
+/**
+ * Lock the file @a lockfile_handle. If @a exclusive is TRUE,
+ * obtain exclusive lock, otherwise obtain shared lock.
+ *
+ * If @a nonblocking is TRUE, do not wait for the lock if it
+ * is not available: throw an error instead.
+ *
+ * Lock will be automatically released when @a pool is cleared or destroyed.
+ * You may also explicitly call @ref svn_io_unlock_open_file.
+ * Use @a pool for memory allocations. @a pool must be the pool that
+ * @a lockfile_handle has been created in or one of its sub-pools.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_io_lock_open_file(apr_file_t *lockfile_handle,
+                      svn_boolean_t exclusive,
+                      svn_boolean_t nonblocking,
+                      apr_pool_t *pool);
+
+/**
+ * Unlock the file @a lockfile_handle.
+ *
+ * Use @a pool for memory allocations. @a pool must be the pool that
+ * @a lockfile_handle has been created in or one of its sub-pools.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_io_unlock_open_file(apr_file_t *lockfile_handle,
+                        apr_pool_t *pool);
+
 /**
  * Flush any unwritten data from @a file to disk.  Use @a pool for
  * memory allocations.

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/add.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/add.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/add.c Mon Apr 16 23:45:38 2012
@@ -898,7 +898,7 @@ mkdir_urls(const apr_array_header_t *url
 
   /* Fetch RA commit editor */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
-                        svn_client__get_shim_callbacks(ctx->wc_ctx,
+                        svn_client__get_shim_callbacks(ctx->wc_ctx, ra_session,
                                                        NULL, pool)));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/client.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/client.h (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/client.h Mon Apr 16 23:45:38 2012
@@ -1082,6 +1082,7 @@ svn_client__get_normalized_stream(svn_st
 /* Return a set of callbacks to use with the Ev2 shims. */
 svn_delta_shim_callbacks_t *
 svn_client__get_shim_callbacks(svn_wc_context_t *wc_ctx,
+                               svn_ra_session_t *ra_session,
                                const char *anchor_abspath,
                                apr_pool_t *result_pool);
 

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/commit.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/commit.c Mon Apr 16 23:45:38 2012
@@ -718,6 +718,7 @@ get_ra_editor(svn_ra_session_t **ra_sess
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(*ra_session,
                         svn_client__get_shim_callbacks(ctx->wc_ctx,
+                                                       *ra_session,
                                                        anchor_abspath, pool)));
   SVN_ERR(svn_ra_get_commit_editor3(*ra_session, editor, edit_baton,
                                     commit_revprops, commit_callback,

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/copy.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/copy.c Mon Apr 16 23:45:38 2012
@@ -70,56 +70,6 @@
 
 /*** Code. ***/
 
-/* Obtain the implied mergeinfo and the existing mergeinfo of the
-   source path, combine them and return the result in
-   *TARGET_MERGEINFO.  One of LOCAL_ABSPATH and SRC_URL must be valid,
-   the other must be NULL. */
-static svn_error_t *
-calculate_target_mergeinfo(svn_ra_session_t *ra_session,
-                           apr_hash_t **target_mergeinfo,
-                           const char *local_abspath,
-                           const char *src_url,
-                           svn_revnum_t src_revnum,
-                           svn_client_ctx_t *ctx,
-                           apr_pool_t *pool)
-{
-  svn_boolean_t locally_added = FALSE;
-  apr_hash_t *src_mergeinfo = NULL;
-
-  SVN_ERR_ASSERT((local_abspath && !src_url) || (!local_abspath && src_url));
-
-  /* If we have a schedule-add WC path (which was not copied from
-     elsewhere), it doesn't have any repository mergeinfo, so don't
-     bother checking. */
-  if (local_abspath)
-    {
-      svn_client__pathrev_t *origin;
-
-      SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-      SVN_ERR(svn_client__wc_node_get_origin(&origin,
-                                             local_abspath, ctx,
-                                             pool, pool));
-      src_revnum = origin->rev;
-      src_url = origin->url;
-
-      if (! src_url)
-        locally_added = TRUE;
-    }
-
-  if (! locally_added)
-    {
-      /* Fetch any existing (explicit) mergeinfo. */
-      SVN_ERR(svn_client__get_repos_mergeinfo(&src_mergeinfo, ra_session,
-                                              src_url, src_revnum,
-                                              svn_mergeinfo_inherited,
-                                              TRUE, pool));
-    }
-
-  *target_mergeinfo = src_mergeinfo;
-  return SVN_NO_ERROR;
-}
-
 /* Extend the mergeinfo for the single WC path TARGET_WCPATH, adding
    MERGEINFO to any mergeinfo pre-existing in the WC. */
 static svn_error_t *
@@ -747,7 +697,6 @@ repos_to_repos_copy(const apr_array_head
   apr_array_header_t *path_infos;
   const char *top_url, *top_url_all, *top_url_dst;
   const char *message, *repos_root;
-  svn_revnum_t youngest = SVN_INVALID_REVNUM;
   svn_ra_session_t *ra_session = NULL;
   const svn_delta_editor_t *editor;
   void *edit_baton;
@@ -803,9 +752,10 @@ repos_to_repos_copy(const apr_array_head
 
       /* Go ahead and grab mergeinfo from the source, too. */
       SVN_ERR(svn_ra_reparent(ra_session, pair->src_abspath_or_url, pool));
-      SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo, NULL,
-                                         pair->src_abspath_or_url,
-                                         pair->src_revnum, ctx, pool));
+      SVN_ERR(svn_client__get_repos_mergeinfo(
+                &mergeinfo, ra_session,
+                pair->src_abspath_or_url, pair->src_revnum,
+                svn_mergeinfo_inherited, TRUE /*squelch_incapable*/, pool));
       if (mergeinfo)
         SVN_ERR(svn_mergeinfo_to_string(&info->mergeinfo, mergeinfo, pool));
 
@@ -1000,7 +950,7 @@ repos_to_repos_copy(const apr_array_head
       /* Figure out the basename that will result from this operation,
          and ensure that we aren't trying to overwrite existing paths.  */
       dst_rel = svn_uri_skip_ancestor(top_url, pair->dst_abspath_or_url, pool);
-      SVN_ERR(svn_ra_check_path(ra_session, dst_rel, youngest,
+      SVN_ERR(svn_ra_check_path(ra_session, dst_rel, SVN_INVALID_REVNUM,
                                 &dst_kind, pool));
       if (dst_kind != svn_node_none)
         return svn_error_createf(SVN_ERR_FS_ALREADY_EXISTS, NULL,
@@ -1101,6 +1051,7 @@ repos_to_repos_copy(const apr_array_head
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
                         svn_client__get_shim_callbacks(ctx->wc_ctx,
+                                                       ra_session,
                                                        NULL, pool)));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,
@@ -1116,7 +1067,7 @@ repos_to_repos_copy(const apr_array_head
   cb_baton.is_move = is_move;
 
   /* Call the path-based editor driver. */
-  err = svn_delta_path_driver(editor, edit_baton, youngest, paths,
+  err = svn_delta_path_driver(editor, edit_baton, SVN_INVALID_REVNUM, paths,
                               path_driver_cb_func, &cb_baton, pool);
   if (err)
     {
@@ -1369,17 +1320,26 @@ wc_to_repos_copy(const apr_array_header_
                                                     svn_client__copy_pair_t *);
       svn_client_commit_item3_t *item =
         APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
+      svn_client__pathrev_t *src_origin;
 
       svn_pool_clear(iterpool);
 
+      SVN_ERR(svn_client__wc_node_get_origin(&src_origin,
+                                             pair->src_abspath_or_url,
+                                             ctx, iterpool, iterpool));
+
       /* Set the mergeinfo for the destination to the combined merge
          info known to the WC and the repository. */
       item->outgoing_prop_changes = apr_array_make(pool, 1,
                                                    sizeof(svn_prop_t *));
-      SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo,
-                                         pair->src_abspath_or_url,
-                                         NULL, SVN_INVALID_REVNUM,
-                                         ctx, iterpool));
+      /* Repository mergeinfo (or NULL if it's locally added)... */
+      if (src_origin)
+        SVN_ERR(svn_client__get_repos_mergeinfo(
+                  &mergeinfo, ra_session, src_origin->url, src_origin->rev,
+                  svn_mergeinfo_inherited, TRUE /*sqelch_inc.*/, iterpool));
+      else
+        mergeinfo = NULL;
+      /* ... and WC mergeinfo. */
       SVN_ERR(svn_client__parse_mergeinfo(&wc_mergeinfo, ctx->wc_ctx,
                                           pair->src_abspath_or_url,
                                           iterpool, iterpool));
@@ -1440,6 +1400,7 @@ wc_to_repos_copy(const apr_array_header_
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
                         svn_client__get_shim_callbacks(ctx->wc_ctx,
+                                                       ra_session,
                                                        common_wc_abspath,
                                                        pool)));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
@@ -1622,9 +1583,10 @@ repos_to_wc_copy_single(svn_client__copy
 
   /* Record the implied mergeinfo (before the notification callback
      is invoked for the root node). */
-  SVN_ERR(calculate_target_mergeinfo(ra_session, &src_mergeinfo, NULL,
-                                     pair->src_abspath_or_url,
-                                     pair->src_revnum, ctx, pool));
+  SVN_ERR(svn_client__get_repos_mergeinfo(
+            &src_mergeinfo, ra_session,
+            pair->src_abspath_or_url, pair->src_revnum,
+            svn_mergeinfo_inherited, TRUE /*squelch_incapable*/, pool));
   SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool));
 
   /* Do our own notification for the root node, even if we could possibly

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/delete.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/delete.c Mon Apr 16 23:45:38 2012
@@ -190,6 +190,7 @@ single_repos_delete(svn_ra_session_t *ra
   /* Fetch RA commit editor */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
                         svn_client__get_shim_callbacks(ctx->wc_ctx,
+                                                       ra_session,
                                                        NULL, pool)));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/merge.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/merge.c Mon Apr 16 23:45:38 2012
@@ -3529,7 +3529,7 @@ get_full_mergeinfo(svn_mergeinfo_t *reco
       SVN_ERR(svn_client__wc_node_get_origin(&target, target_abspath, ctx,
                                              scratch_pool, scratch_pool));
 
-      if (! target->url)
+      if (! target)
         {
           /* We've been asked to operate on a locally added target, so its
            * implicit mergeinfo is empty. */
@@ -9292,7 +9292,25 @@ open_target_wc(merge_target_t **target_p
                            scratch_pool));
   SVN_ERR(svn_client__wc_node_get_origin(&origin, wc_abspath, ctx,
                                          result_pool, scratch_pool));
-  target->loc = *origin;
+  if (origin)
+    {
+      target->loc = *origin;
+    }
+  else
+    {
+      /* The node has no location in the repository. It's unversioned or
+       * locally added or locally deleted.
+       *
+       * If it's locally added or deleted, find the repository root
+       * URL and UUID anyway, and leave the node URL and revision as NULL
+       * and INVALID.  If it's unversioned, this will throw an error. */
+      SVN_ERR(svn_wc__node_get_repos_info(&target->loc.repos_root_url,
+                                          &target->loc.repos_uuid,
+                                          ctx->wc_ctx, wc_abspath,
+                                          result_pool, scratch_pool));
+      target->loc.rev = SVN_INVALID_REVNUM;
+      target->loc.url = NULL;
+    }
 
   SVN_ERR(ensure_wc_is_suitable_merge_target(
             wc_abspath, ctx,

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/mergeinfo.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/mergeinfo.c Mon Apr 16 23:45:38 2012
@@ -1070,8 +1070,8 @@ get_mergeinfo(svn_mergeinfo_catalog_t *m
 
       SVN_ERR(svn_client__wc_node_get_origin(&origin, local_abspath, ctx,
                                              scratch_pool, scratch_pool));
-      rev = origin->rev;
-      if (!origin->url
+      rev = origin ? origin->rev : SVN_INVALID_REVNUM;
+      if (!origin
           || strcmp(origin->url, url) != 0
           || peg_rev != rev)
       {

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c Mon Apr 16 23:45:38 2012
@@ -245,6 +245,7 @@ propset_on_url(const char *propname,
   /* Fetch RA commit editor. */
   SVN_ERR(svn_ra__register_editor_shim_callbacks(ra_session,
                         svn_client__get_shim_callbacks(ctx->wc_ctx,
+                                                       ra_session,
                                                        NULL, pool)));
   SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
                                     commit_revprops,

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/util.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/util.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/util.c Mon Apr 16 23:45:38 2012
@@ -257,22 +257,8 @@ svn_client__wc_node_get_origin(svn_clien
     }
   else
     {
-      /* The node has no location in the repository. It's unversioned or
-       * locally added or locally deleted.
-       *
-       * If it's locally added or deleted, find the repository root
-       * URL and UUID anyway, and leave the node URL and revision as NULL
-       * and INVALID.  If it's unversioned, this will throw an error. */
-      SVN_ERR(svn_wc__node_get_repos_info(&(*origin_p)->repos_root_url,
-                                          &(*origin_p)->repos_uuid,
-                                          ctx->wc_ctx, wc_abspath,
-                                          result_pool, scratch_pool));
-      (*origin_p)->rev = SVN_INVALID_REVNUM;
-      (*origin_p)->url = NULL;
+      *origin_p = NULL;
     }
-
-  SVN_ERR_ASSERT((*origin_p)->repos_root_url);
-  SVN_ERR_ASSERT((*origin_p)->repos_uuid);
   return SVN_NO_ERROR;
 }
 
@@ -379,33 +365,34 @@ svn_client__assert_homogeneous_target_ty
 struct shim_callbacks_baton
 {
   svn_wc_context_t *wc_ctx;
+  const char *repos_root_url;
   const char *anchor_abspath;
 };
 
 static svn_error_t *
 rationalize_shim_path(const char **local_abspath,
                       struct shim_callbacks_baton *scb,
-                      const char *path,
+                      const char *repos_relpath,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool)
 {
-  if (svn_path_is_url(path))
-    {
-      /* This is a copyfrom URL */
-      const char *wcroot_abspath;
-      const char *wcroot_url;
-      const char *relpath;
-
-      SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, scb->wc_ctx,
-                                  scb->anchor_abspath,
-                                  scratch_pool, scratch_pool));
-      SVN_ERR(svn_wc__node_get_url(&wcroot_url, scb->wc_ctx, wcroot_abspath,
-                                   scratch_pool, scratch_pool));
-      relpath = svn_uri_skip_ancestor(wcroot_url, path, scratch_pool);
-      *local_abspath = svn_dirent_join(wcroot_abspath, relpath, result_pool);
-    }
-  else
-    *local_abspath = svn_dirent_join(scb->anchor_abspath, path, result_pool);
+  const char *wcroot_abspath;
+  const char *wcroot_url;
+  const char *relpath;
+  const char *node_url = svn_path_url_add_component2(scb->repos_root_url,
+                                                     repos_relpath,
+                                                     scratch_pool);
+
+  /* ### We could probably calculate some of this once, and then cache it for
+         use in this function. */
+  SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, scb->wc_ctx,
+                              scb->anchor_abspath,
+                              scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__node_get_url(&wcroot_url, scb->wc_ctx, wcroot_abspath,
+                               scratch_pool, scratch_pool));
+
+  relpath = svn_uri_skip_ancestor(wcroot_url, node_url, scratch_pool);
+  *local_abspath = svn_dirent_join(wcroot_abspath, relpath, result_pool);
 
   return SVN_NO_ERROR;
 }
@@ -518,6 +505,7 @@ fetch_base_func(const char **filename,
 
 svn_delta_shim_callbacks_t *
 svn_client__get_shim_callbacks(svn_wc_context_t *wc_ctx,
+                               svn_ra_session_t *ra_session,
                                const char *anchor_abspath,
                                apr_pool_t *result_pool)
 {
@@ -527,6 +515,8 @@ svn_client__get_shim_callbacks(svn_wc_co
 
   scb->wc_ctx = wc_ctx;
   scb->anchor_abspath = apr_pstrdup(result_pool, anchor_abspath);
+  svn_error_clear(svn_ra_get_repos_root2(ra_session, &scb->repos_root_url,
+                                         result_pool));
 
   callbacks->fetch_props_func = fetch_props_func;
   callbacks->fetch_kind_func = fetch_kind_func;

Modified: subversion/branches/inheritable-props/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_delta/compat.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_delta/compat.c Mon Apr 16 23:45:38 2012
@@ -1660,7 +1660,25 @@ move_cb(void *baton,
         svn_revnum_t replaces_rev,
         apr_pool_t *scratch_pool)
 {
-  SVN__NOT_IMPLEMENTED();
+  struct editor_baton *eb = baton;
+
+  /* Delete the move source. */
+  SVN_ERR(build(eb, ACTION_DELETE, src_relpath, svn_kind_unknown,
+                NULL, src_revision, NULL, NULL, NULL, SVN_INVALID_REVNUM,
+                scratch_pool));
+
+  if (SVN_IS_VALID_REVNUM(replaces_rev))
+    {
+      /* We need to add the delete action for the replaced target. */
+      SVN_ERR(build(eb, ACTION_DELETE, dst_relpath, svn_kind_unknown,
+                    NULL, SVN_INVALID_REVNUM,
+                    NULL, NULL, NULL, SVN_INVALID_REVNUM, scratch_pool));
+    }
+
+  SVN_ERR(build(eb, ACTION_COPY, dst_relpath, svn_kind_unknown,
+                src_relpath, src_revision, NULL, NULL, NULL,
+                SVN_INVALID_REVNUM, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/caching.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/caching.c Mon Apr 16 23:45:38 2012
@@ -44,6 +44,7 @@ read_config(svn_memcache_t **memcache_p,
             svn_boolean_t *fail_stop,
             svn_boolean_t *cache_txdeltas,
             svn_boolean_t *cache_fulltexts,
+            svn_boolean_t *cache_revprops,
             svn_fs_t *fs,
             apr_pool_t *pool)
 {
@@ -74,6 +75,16 @@ read_config(svn_memcache_t **memcache_p,
                          SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                          TRUE);
 
+  /* don't cache revprops by default.
+   * Revprop caching significantly speeds up operations like
+   * svn ls -v. However, it requires synchronization that may
+   * not be available or efficient in the current server setup.
+   */
+  *cache_revprops
+    = svn_hash__get_bool(fs->config,
+                         SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
+                         FALSE);
+
   return svn_config_get_bool(ffd->config, fail_stop,
                              CONFIG_SECTION_CACHES, CONFIG_OPTION_FAIL_STOP,
                              FALSE);
@@ -249,12 +260,14 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   svn_boolean_t no_handler;
   svn_boolean_t cache_txdeltas;
   svn_boolean_t cache_fulltexts;
+  svn_boolean_t cache_revprops;
 
   /* Evaluating the cache configuration. */
   SVN_ERR(read_config(&memcache,
                       &no_handler,
                       &cache_txdeltas,
                       &cache_fulltexts,
+                      &cache_revprops,
                       fs,
                       pool));
 
@@ -330,7 +343,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                            memcache,
                            membuffer,
                            0, 0, /* Do not use inprocess cache */
-                           /* Values are svn_string_t */
+                           /* Values are svn_stringbuf_t */
                            NULL, NULL,
                            APR_HASH_KEY_STRING,
                            apr_pstrcat(pool, prefix, "TEXT", (char *)NULL),
@@ -339,6 +352,27 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
 
   SVN_ERR(init_callbacks(ffd->fulltext_cache, fs, no_handler, pool));
 
+  /* initialize revprop cache, if full-text caching has been enabled */
+  if (cache_revprops)
+    {
+      SVN_ERR(create_cache(&(ffd->revprop_cache),
+                           NULL,
+                           membuffer,
+                           0, 0, /* Do not use inprocess cache */
+                           svn_fs_fs__serialize_properties,
+                           svn_fs_fs__deserialize_properties,
+                           APR_HASH_KEY_STRING,
+                           apr_pstrcat(pool, prefix, "REVPROP",
+                                       (char *)NULL),
+                           fs->pool));
+    }
+  else
+    {
+      ffd->revprop_cache = NULL;
+    }
+
+  SVN_ERR(init_callbacks(ffd->revprop_cache, fs, no_handler, pool));
+
   /* initialize txdelta window cache, if that has been enabled */
   if (cache_txdeltas)
     {

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/dag.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/dag.c Mon Apr 16 23:45:38 2012
@@ -155,11 +155,11 @@ static svn_error_t *
 get_node_revision(node_revision_t **noderev_p,
                   dag_node_t *node)
 {
-  node_revision_t *noderev;
-
   /* If we've already got a copy, there's no need to read it in.  */
   if (! node->node_revision)
     {
+      node_revision_t *noderev;
+
       SVN_ERR(svn_fs_fs__get_node_revision(&noderev, node->fs,
                                            node->id, node->node_pool));
       node->node_revision = noderev;

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs.h Mon Apr 16 23:45:38 2012
@@ -34,6 +34,7 @@
 #include "private/svn_fs_private.h"
 #include "private/svn_sqlite.h"
 #include "private/svn_mutex.h"
+#include "private/svn_named_atomic.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -207,7 +208,8 @@ typedef struct fs_fs_shared_data_t
   apr_pool_t *common_pool;
 } fs_fs_shared_data_t;
 
-/* Private (non-shared) FSFS-specific data for each svn_fs_t object. */
+/* Private (non-shared) FSFS-specific data for each svn_fs_t object.
+   Any caches in here may be NULL. */
 typedef struct fs_fs_data_t
 {
   /* The format number of this FS. */
@@ -246,6 +248,21 @@ typedef struct fs_fs_data_t
      rep key (revision/offset) to svn_string_t. */
   svn_cache__t *fulltext_cache;
 
+  /* Access object to the atomics namespace used by revprop caching.
+     Will be NULL until the first access. */
+  svn_atomic_namespace__t *revprop_namespace;
+
+  /* Access object to the revprop "generation". Will be NULL until
+     the first access. */
+  svn_named_atomic__t *revprop_generation;
+  
+  /* Access object to the revprop update timeout. Will be NULL until
+     the first access. */
+  svn_named_atomic__t *revprop_timeout;
+  
+  /* Revision property cache.  Maps from (rev,generation) to apr_hash_t. */
+  svn_cache__t *revprop_cache;
+
   /* Pack manifest cache; a cache mapping (svn_revnum_t) shard number to
      a manifest; and a manifest is a mapping from (svn_revnum_t) revision
      number offset within a shard to (apr_off_t) byte-offset in the

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs_fs.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/fs_fs.c Mon Apr 16 23:45:38 2012
@@ -92,6 +92,17 @@
    Values < 1 disable deltification. */
 #define SVN_FS_FS_MAX_DELTIFICATION_WALK 1023
 
+/* Give writing processes 10 seconds to replace an existing revprop
+   file with a new one. After that time, we assume that the writing
+   process got aborted and that we have re-read revprops. */
+#define REVPROP_CHANGE_TIMEOUT 10 * 1000000
+
+/* The following are names of atomics that will be used to communicate
+ * revprop updates across all processes on this machine. */
+#define ATOMIC_REVPROP_GENERATION "RevPropGeneration"
+#define ATOMIC_REVPROP_TIMEOUT    "RevPropTimeout"
+#define ATOMIC_REVPROP_NAMESPACE  "RevPropAtomics"
+
 /* Following are defines that specify the textual elements of the
    native filesystem directories and revision files. */
 
@@ -870,25 +881,39 @@ get_file_offset(apr_off_t *offset_p, apr
 }
 
 
-/* Check that BUF, a nul-terminated buffer of text from format file PATH,
+/* Check that BUF, a nul-terminated buffer of text from file PATH,
    contains only digits at OFFSET and beyond, raising an error if not.
+   TITLE contains a user-visible description of the file, usually the
+   short file name.
 
    Uses POOL for temporary allocation. */
 static svn_error_t *
-check_format_file_buffer_numeric(const char *buf, apr_off_t offset,
-                                 const char *path, apr_pool_t *pool)
+check_file_buffer_numeric(const char *buf, apr_off_t offset,
+                          const char *path, const char *title,
+                          apr_pool_t *pool)
 {
   const char *p;
 
   for (p = buf + offset; *p; p++)
     if (!svn_ctype_isdigit(*p))
       return svn_error_createf(SVN_ERR_BAD_VERSION_FILE_FORMAT, NULL,
-        _("Format file '%s' contains unexpected non-digit '%c' within '%s'"),
-        svn_dirent_local_style(path, pool), *p, buf);
+        _("%s file '%s' contains unexpected non-digit '%c' within '%s'"),
+        title, svn_dirent_local_style(path, pool), *p, buf);
 
   return SVN_NO_ERROR;
 }
 
+/* Check that BUF, a nul-terminated buffer of text from format file PATH,
+   contains only digits at OFFSET and beyond, raising an error if not.
+
+   Uses POOL for temporary allocation. */
+static svn_error_t *
+check_format_file_buffer_numeric(const char *buf, apr_off_t offset,
+                                 const char *path, apr_pool_t *pool)
+{
+  return check_file_buffer_numeric(buf, offset, path, "Format", pool);
+}
+
 /* Read the format number and maximum number of files per directory
    from PATH and return them in *PFORMAT and *MAX_FILES_PER_DIR
    respectively.
@@ -2775,6 +2800,188 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
   return SVN_NO_ERROR;
 }
 
+/* Make sure the revprop_namespace member in FS is set. */
+static svn_error_t *
+ensure_revprop_namespace(svn_fs_t *fs)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+
+  return ffd->revprop_namespace == NULL
+    ? svn_atomic_namespace__create(&ffd->revprop_namespace,
+                                   apr_pstrcat(fs->pool,
+                                               fs->path,
+                                               ATOMIC_REVPROP_NAMESPACE,
+                                               (char *)NULL),
+                                   fs->pool)
+    : SVN_NO_ERROR;
+}
+
+/* Make sure the revprop_generation member in FS is set. */
+static svn_error_t *
+ensure_revprop_generation(svn_fs_t *fs)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+
+  SVN_ERR(ensure_revprop_namespace(fs));
+  return ffd->revprop_generation == NULL
+    ? svn_named_atomic__get(&ffd->revprop_generation,
+                            ffd->revprop_namespace,
+                            ATOMIC_REVPROP_GENERATION,
+                            TRUE)
+    : SVN_NO_ERROR;
+}
+
+/* Make sure the revprop_timeout member in FS is set. */
+static svn_error_t *
+ensure_revprop_timeout(svn_fs_t *fs)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  
+  SVN_ERR(ensure_revprop_namespace(fs));
+  return ffd->revprop_timeout == NULL
+    ? svn_named_atomic__get(&ffd->revprop_timeout,
+                            ffd->revprop_namespace,
+                            ATOMIC_REVPROP_TIMEOUT,
+                            TRUE)
+    : SVN_NO_ERROR;
+}
+
+/* Test whether revprop cache and necessary infrastructure are
+   available in FS. */
+static svn_boolean_t
+has_revprop_cache(svn_fs_t *fs)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  svn_error_t *error;
+
+  /* is the cache (still) enabled? */
+  if (ffd->revprop_cache == NULL)
+    return FALSE;
+
+  /* is it efficient? */
+  if (!svn_named_atomic__is_efficient())
+    {
+      /* access to it would be quite slow
+       * -> disable the revprop cache for good
+       */
+      ffd->revprop_cache = NULL;
+      return FALSE;
+    }
+
+  /* try to access our SHM-backed infrastructure */
+  error = ensure_revprop_generation(fs);
+  if (error)
+    {
+      /* failure -> disable revprop cache for good */
+
+      svn_error_clear(error);
+      ffd->revprop_cache = NULL;
+
+      return FALSE;
+    }
+
+  return TRUE;
+}
+
+/* Read the current revprop generation and return it in *GENERATION.
+   Also, detect aborted / crashed writers and recover from that.
+   Use the access object in FS to set the shared mem values. */
+static svn_error_t *
+read_revprop_generation(apr_int64_t *generation,
+                        svn_fs_t *fs)
+{
+  apr_int64_t current = 0;
+  fs_fs_data_t *ffd = fs->fsap_data;
+  
+  /* read the current revprop generation number */
+  SVN_ERR(ensure_revprop_generation(fs));
+  SVN_ERR(svn_named_atomic__read(&current, ffd->revprop_generation));
+
+  /* is an unfinished revprop write under the way? */
+  if (current % 2)
+    {
+      apr_int64_t timeout = 0;
+
+      /* read timeout for the write operation */
+      SVN_ERR(ensure_revprop_timeout(fs));
+      SVN_ERR(svn_named_atomic__read(&timeout, ffd->revprop_timeout));
+
+      /* has the writer process been aborted,
+       * i.e. has the timeout been reached?
+       */
+      if (apr_time_now() > timeout)
+        {
+          /* Cause everyone to re-read revprops upon their next access.
+           * Keep in mind that we may not be the only one trying to do it.
+           */
+          while (current % 2)
+            SVN_ERR(svn_named_atomic__add(&current,
+                                          1,
+                                          ffd->revprop_generation));
+        }
+    }
+
+  /* return the value we just got */
+  *generation = current;
+  return SVN_NO_ERROR;
+}
+
+/* Set the revprop generation to the next odd number to indicate that
+   there is a revprop write process under way. If that times out,
+   readers shall recover from that state & re-read revprops.
+   Use the access object in FS to set the shared mem value. */
+static svn_error_t *
+begin_revprop_change(svn_fs_t *fs)
+{
+  apr_int64_t current;
+  fs_fs_data_t *ffd = fs->fsap_data;
+  
+  /* set the timeout for the write operation */
+  SVN_ERR(ensure_revprop_timeout(fs));
+  SVN_ERR(svn_named_atomic__write(NULL,
+                                  apr_time_now() + REVPROP_CHANGE_TIMEOUT,
+                                  ffd->revprop_timeout));
+
+  /* set the revprop generation to an odd value to indicate
+   * that a write is in progress
+   */
+  SVN_ERR(ensure_revprop_generation(fs));
+  do
+    {
+      SVN_ERR(svn_named_atomic__add(&current,
+                                    1,
+                                    ffd->revprop_generation));
+    }
+  while (current % 2 == 0);
+
+  return SVN_NO_ERROR;
+}
+
+/* Set the revprop generation to the next even number to indicate that
+   a) readers shall re-read revprops, and
+   b) the write process has been completed (no recovery required)
+   Use the access object in FS to set the shared mem value. */
+static svn_error_t *
+end_revprop_change(svn_fs_t *fs)
+{
+  apr_int64_t current = 1;
+  fs_fs_data_t *ffd = fs->fsap_data;
+  
+  /* set the revprop generation to an even value to indicate
+   * that a write has been completed
+   */
+  SVN_ERR(ensure_revprop_generation(fs));
+  do
+    {
+      SVN_ERR(svn_named_atomic__add(&current,
+                                    1,
+                                    ffd->revprop_generation));
+    }
+  while (current % 2);
+
+  return SVN_NO_ERROR;
+}
+
 /* Set the revision property list of revision REV in filesystem FS to
    PROPLIST.  Use POOL for temporary allocations. */
 static svn_error_t *
@@ -2791,6 +2998,11 @@ set_revision_proplist(svn_fs_t *fs,
       const char *tmp_path;
       const char *perms_reference;
       svn_stream_t *stream;
+      svn_node_kind_t kind = svn_node_none;
+
+      /* test whether revprops already exist for this revision */
+      if (has_revprop_cache(fs))
+        SVN_ERR(svn_io_check_path(final_path, &kind, pool));
 
       /* ### do we have a directory sitting around already? we really shouldn't
          ### have to get the dirname here. */
@@ -2805,7 +3017,17 @@ set_revision_proplist(svn_fs_t *fs,
          file won't exist and therefore can't serve as its own reference.
          (Whereas the rev file should already exist at this point.) */
       SVN_ERR(svn_fs_fs__path_rev_absolute(&perms_reference, fs, rev, pool));
+
+      /* Now, we may actually be replacing revprops. Make sure that all other
+         threads and processes will know about this. */
+      if (kind != svn_node_none)
+        SVN_ERR(begin_revprop_change(fs));
+
       SVN_ERR(move_into_place(tmp_path, final_path, perms_reference, pool));
+
+      /* Indicate that the update (if relevant) has been completed. */
+      if (kind != svn_node_none)
+        SVN_ERR(end_revprop_change(fs));
     }
 
   return SVN_NO_ERROR;
@@ -2818,9 +3040,26 @@ revision_proplist(apr_hash_t **proplist_
                   apr_pool_t *pool)
 {
   apr_hash_t *proplist;
+  fs_fs_data_t *ffd = fs->fsap_data;
+  const char *key;
 
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
 
+  /* Try cache lookup first. */
+  if (has_revprop_cache(fs))
+    {
+      apr_int64_t generation;
+      svn_boolean_t is_cached;
+
+      SVN_ERR(read_revprop_generation(&generation, fs));
+
+      key = svn_fs_fs__combine_two_numbers(rev, generation, pool);
+      SVN_ERR(svn_cache__get((void **) proplist_p, &is_cached,
+                             ffd->revprop_cache, key, pool));
+      if (is_cached)
+        return SVN_NO_ERROR;
+    }
+
   /* if (1); null condition for easier merging to revprop-packing */
     {
       apr_file_t *revprop_file = NULL;
@@ -2875,6 +3114,10 @@ revision_proplist(apr_hash_t **proplist_
       svn_pool_destroy(iterpool);
     }
 
+  /* Cache the result, if caching has been activated. */
+  if (has_revprop_cache(fs))
+    SVN_ERR(svn_cache__set(ffd->revprop_cache, key, proplist, pool));
+
   *proplist_p = proplist;
 
   return SVN_NO_ERROR;

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/id.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/id.c Mon Apr 16 23:45:38 2012
@@ -26,6 +26,7 @@
 #include "id.h"
 #include "../libsvn_fs/fs-loader.h"
 #include "private/svn_temp_serializer.h"
+#include "private/svn_string_private.h"
 
 
 typedef struct id_private_t {
@@ -88,22 +89,25 @@ svn_string_t *
 svn_fs_fs__id_unparse(const svn_fs_id_t *id,
                       apr_pool_t *pool)
 {
-  const char *txn_rev_id;
   id_private_t *pvt = id->fsap_data;
 
   if ((! pvt->txn_id))
     {
-      txn_rev_id = apr_psprintf(pool, "%ld/%"
-                                APR_OFF_T_FMT, pvt->rev, pvt->offset);
+      char rev_string[SVN_INT64_BUFFER_SIZE];
+      char offset_string[SVN_INT64_BUFFER_SIZE];
+
+      svn__i64toa(rev_string, pvt->rev);
+      svn__i64toa(offset_string, pvt->offset);
+      return svn_string_createf(pool, "%s.%s.r%s/%s",
+                                pvt->node_id, pvt->copy_id,
+                                rev_string, offset_string);
     }
   else
     {
-      txn_rev_id = pvt->txn_id;
+      return svn_string_createf(pool, "%s.%s.t%s",
+                                pvt->node_id, pvt->copy_id,
+                                pvt->txn_id);
     }
-  return svn_string_createf(pool, "%s.%s.%c%s",
-                            pvt->node_id, pvt->copy_id,
-                            (pvt->txn_id ? 't' : 'r'),
-                            txn_rev_id);
 }
 
 

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.c Mon Apr 16 23:45:38 2012
@@ -64,10 +64,6 @@ encode_number(apr_int64_t number, char *
   return key_buffer;
 }
 
-/* Prepend the NUMBER to the STRING in a space efficient way that no other
- * (number,string) combination can produce the same result.
- * Allocate temporaries as well as the result from POOL.
- */
 const char*
 svn_fs_fs__combine_number_and_string(apr_int64_t number,
                                      const char *string,
@@ -91,10 +87,6 @@ svn_fs_fs__combine_number_and_string(apr
   return key;
 }
 
-/* Combine the numbers A and B a space efficient way that no other
- * combination of numbers can produce the same result.
- * Allocate temporaries as well as the result from POOL.
- */
 const char*
 svn_fs_fs__combine_two_numbers(apr_int64_t a,
                                apr_int64_t b,
@@ -698,10 +690,10 @@ svn_fs_fs__deserialize_properties(void *
   for (i = 0; i < properties->count; ++i)
     {
       apr_size_t len = properties->keys[i+1] - properties->keys[i] - 1;
-      svn_temp_deserializer__resolve(properties->keys, 
+      svn_temp_deserializer__resolve((void*)properties->keys, 
                                      (void**)&properties->keys[i]);
       
-      deserialize_svn_string(properties->values, 
+      deserialize_svn_string((void*)properties->values, 
                              (svn_string_t **)&properties->values[i]);
       
       apr_hash_set(hash, 

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.h (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/temp_serializer.h Mon Apr 16 23:45:38 2012
@@ -26,7 +26,7 @@
 #include "fs.h"
 
 /**
- * Prepend the @a number to the @a string in a space efficient way that
+ * Prepend the @a number to the @a string in a space efficient way such that
  * no other (number,string) combination can produce the same result.
  * Allocate temporaries as well as the result from @a pool.
  */
@@ -36,8 +36,8 @@ svn_fs_fs__combine_number_and_string(apr
                                      apr_pool_t *pool);
 
 /**
- * Combine the numbers @a a and @a b a space efficient way that no other
- * combination of numbers can produce the same result.
+ * Combine the numbers @a a and @a b in a space efficient way such that no
+ * other combination of numbers can produce the same result.
  * Allocate temporaries as well as the result from @a pool.
  */
 const char*

Modified: subversion/branches/inheritable-props/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_fs_fs/tree.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_fs_fs/tree.c Mon Apr 16 23:45:38 2012
@@ -1241,6 +1241,7 @@ merge(svn_stringbuf_t *conflict_p,
   svn_fs_t *fs;
   apr_pool_t *iterpool;
   apr_int64_t mergeinfo_increment = 0;
+  svn_boolean_t fs_supports_mergeinfo;
 
   /* Make sure everyone comes from the same filesystem. */
   fs = svn_fs_fs__dag_get_fs(ancestor);
@@ -1388,6 +1389,8 @@ merge(svn_stringbuf_t *conflict_p,
   SVN_ERR(svn_fs_fs__dag_dir_entries(&t_entries, target, pool));
   SVN_ERR(svn_fs_fs__dag_dir_entries(&a_entries, ancestor, pool));
 
+  fs_supports_mergeinfo = svn_fs_fs__fs_supports_mergeinfo(fs);
+
   /* for each entry E in a_entries... */
   iterpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, a_entries);
@@ -1419,7 +1422,7 @@ merge(svn_stringbuf_t *conflict_p,
           dag_node_t *t_ent_node;
           SVN_ERR(svn_fs_fs__dag_get_node(&t_ent_node, fs,
                                           t_entry->id, iterpool));
-          if (svn_fs_fs__fs_supports_mergeinfo(fs))
+          if (fs_supports_mergeinfo)
             {
               apr_int64_t mergeinfo_start;
               SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&mergeinfo_start,
@@ -1433,7 +1436,7 @@ merge(svn_stringbuf_t *conflict_p,
               SVN_ERR(svn_fs_fs__dag_get_node(&s_ent_node, fs,
                                               s_entry->id, iterpool));
 
-              if (svn_fs_fs__fs_supports_mergeinfo(fs))
+              if (fs_supports_mergeinfo)
                 {
                   apr_int64_t mergeinfo_end;
                   SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&mergeinfo_end,
@@ -1510,7 +1513,7 @@ merge(svn_stringbuf_t *conflict_p,
                         txn_id,
                         &sub_mergeinfo_increment,
                         iterpool));
-          if (svn_fs_fs__fs_supports_mergeinfo(fs))
+          if (fs_supports_mergeinfo)
             mergeinfo_increment += sub_mergeinfo_increment;
         }
 
@@ -1546,7 +1549,7 @@ merge(svn_stringbuf_t *conflict_p,
 
       SVN_ERR(svn_fs_fs__dag_get_node(&s_ent_node, fs,
                                       s_entry->id, iterpool));
-      if (svn_fs_fs__fs_supports_mergeinfo(fs))
+      if (fs_supports_mergeinfo)
         {
           apr_int64_t mergeinfo_s;
           SVN_ERR(svn_fs_fs__dag_get_mergeinfo_count(&mergeinfo_s,
@@ -1562,7 +1565,7 @@ merge(svn_stringbuf_t *conflict_p,
 
   SVN_ERR(svn_fs_fs__dag_update_ancestry(target, source, pool));
 
-  if (svn_fs_fs__fs_supports_mergeinfo(fs))
+  if (fs_supports_mergeinfo)
     SVN_ERR(svn_fs_fs__dag_increment_mergeinfo_count(target,
                                                      mergeinfo_increment,
                                                      pool));

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_neon/fetch.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_neon/fetch.c Mon Apr 16 23:45:38 2012
@@ -934,8 +934,19 @@ svn_error_t *svn_ra_neon__get_dir(svn_ra
                                      final_url, SVN_RA_NEON__DEPTH_ONE,
                                      NULL, which_props, pool));
 
-      /* Count the number of path components in final_url. */
-      final_url_n_components = svn_path_component_count(final_url);
+      /* In the loop below we will want to skip the effective '.' entry that
+         comes back from SVN_RA_NEON__DEPTH_ONE. To perform this skip we use
+         the component count of the FINAL_URL and compare it to the component
+         count of the keys in RESOURCES.  But this only works if REVISION
+         was a valid revnum and FINAL_URL is a baseline collection (i.e. no
+         scheme://host prefix).  If REVISION was SVN_INVALID_REVNUM then
+         FINAL_URL is a fully qualified URL, so we need to ignore the scheme
+         and host portions. */
+      if (SVN_IS_VALID_REVNUM(revision))
+        final_url_n_components = svn_path_component_count(final_url);
+      else
+        final_url_n_components = svn_path_component_count(
+          svn_path_url_add_component2(ras->root.path, path, pool));
 
       /* Now we have a hash that maps a bunch of url children to resource
          objects.  Each resource object contains the properties of the

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/commit.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_serf/commit.c Mon Apr 16 23:45:38 2012
@@ -2323,6 +2323,7 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   commit_context_t *ctx;
   apr_hash_index_t *hi;
   const char *repos_root;
+  const char *base_relpath;
 
   ctx = apr_pcalloc(pool, sizeof(*ctx));
 
@@ -2370,9 +2371,11 @@ svn_ra_serf__get_commit_editor(svn_ra_se
   *edit_baton = ctx;
 
   SVN_ERR(svn_ra_serf__get_repos_root(ra_session, &repos_root, pool));
+  base_relpath = svn_uri_skip_ancestor(repos_root, session->session_url_str,
+                                       pool);
 
   SVN_ERR(svn_editor__insert_shims(ret_editor, edit_baton, *ret_editor,
-                                   *edit_baton, repos_root, NULL,
+                                   *edit_baton, repos_root, base_relpath,
                                    session->shim_callbacks, pool, pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_svn/marshal.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_svn/marshal.c Mon Apr 16 23:45:38 2012
@@ -231,7 +231,7 @@ static svn_error_t *writebuf_output(svn_
 /* Write data from the write buffer out to the socket. */
 static svn_error_t *writebuf_flush(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
 {
-  int write_pos = conn->write_pos;
+  apr_size_t write_pos = conn->write_pos;
 
   /* Clear conn->write_pos first in case the block handler does a read. */
   conn->write_pos = 0;
@@ -258,19 +258,36 @@ static svn_error_t *writebuf_write(svn_r
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *writebuf_printf(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                    const char *fmt, ...)
-  __attribute__ ((format(printf, 3, 4)));
-static svn_error_t *writebuf_printf(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
-                                    const char *fmt, ...)
+static svn_error_t *
+writebuf_write_short_string(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
+                            const char *data, apr_size_t len)
+{
+  apr_size_t left = sizeof(conn->write_buf) - conn->write_pos;
+  if (len <= left)
+  {
+    memcpy(conn->write_buf + conn->write_pos, data, len);
+    conn->write_pos += len;
+    return SVN_NO_ERROR;
+  }
+  else
+    return writebuf_write(conn, pool, data, len);
+}
+
+static APR_INLINE svn_error_t *
+writebuf_writechar(svn_ra_svn_conn_t *conn, apr_pool_t *pool, char data)
 {
-  va_list ap;
-  char *str;
+  if (conn->write_pos < sizeof(conn->write_buf))
+  {
+    conn->write_buf[conn->write_pos] = data;
+    conn->write_pos++;
 
-  va_start(ap, fmt);
-  str = apr_pvsprintf(pool, fmt, ap);
-  va_end(ap);
-  return writebuf_write(conn, pool, str, strlen(str));
+    return SVN_NO_ERROR;
+  }
+  else
+  {
+    char temp = data;
+    return writebuf_write(conn, pool, &temp, 1);
+  }
 }
 
 /* --- READ BUFFER MANAGEMENT --- */
@@ -417,31 +434,69 @@ static svn_error_t *readbuf_skip_leading
 
 /* --- WRITING DATA ITEMS --- */
 
+static svn_error_t *write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
+                                 apr_uint64_t number, char follow)
+{
+  apr_size_t written;
+
+  if (conn->write_pos + SVN_INT64_BUFFER_SIZE >= sizeof(conn->write_buf))
+    SVN_ERR(writebuf_flush(conn, pool));
+
+  written = svn__ui64toa(conn->write_buf + conn->write_pos, number);
+  conn->write_buf[conn->write_pos + written] = follow;
+  conn->write_pos += written + 1;
+
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *svn_ra_svn_write_number(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
                                      apr_uint64_t number)
 {
-  return writebuf_printf(conn, pool, "%" APR_UINT64_T_FMT " ", number);
+  return write_number(conn, pool, number, ' ');
 }
 
 svn_error_t *svn_ra_svn_write_string(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
                                      const svn_string_t *str)
 {
-  SVN_ERR(writebuf_printf(conn, pool, "%" APR_SIZE_T_FMT ":", str->len));
+  if (str->len < 10)
+    {
+      SVN_ERR(writebuf_writechar(conn, pool, (char)str->len + '0'));
+      SVN_ERR(writebuf_writechar(conn, pool, ':'));
+    }
+  else
+    write_number(conn, pool, str->len, ':');
+
   SVN_ERR(writebuf_write(conn, pool, str->data, str->len));
-  SVN_ERR(writebuf_write(conn, pool, " ", 1));
+  SVN_ERR(writebuf_writechar(conn, pool, ' '));
   return SVN_NO_ERROR;
 }
 
 svn_error_t *svn_ra_svn_write_cstring(svn_ra_svn_conn_t *conn,
                                       apr_pool_t *pool, const char *s)
 {
-  return writebuf_printf(conn, pool, "%" APR_SIZE_T_FMT ":%s ", strlen(s), s);
+  apr_size_t len = strlen(s);
+
+  if (len < 10)
+    {
+      SVN_ERR(writebuf_writechar(conn, pool, (char)len + '0'));
+      SVN_ERR(writebuf_writechar(conn, pool, ':'));
+    }
+  else
+    write_number(conn, pool, len, ':');
+
+  SVN_ERR(writebuf_write(conn, pool, s, len));
+  SVN_ERR(writebuf_writechar(conn, pool, ' '));
+
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *svn_ra_svn_write_word(svn_ra_svn_conn_t *conn, apr_pool_t *pool,
                                    const char *word)
 {
-  return writebuf_printf(conn, pool, "%s ", word);
+  SVN_ERR(writebuf_write_short_string(conn, pool, word, strlen(word)));
+  SVN_ERR(writebuf_writechar(conn, pool, ' '));
+
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *svn_ra_svn_write_proplist(svn_ra_svn_conn_t *conn,
@@ -474,11 +529,27 @@ svn_error_t *svn_ra_svn_write_proplist(s
 
 svn_error_t *svn_ra_svn_start_list(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
 {
+  if (conn->write_pos + 2 <= sizeof(conn->write_buf))
+    {
+      conn->write_buf[conn->write_pos] = '(';
+      conn->write_buf[conn->write_pos+1] = ' ';
+      conn->write_pos += 2;
+      return SVN_NO_ERROR;
+    }
+
   return writebuf_write(conn, pool, "( ", 2);
 }
 
 svn_error_t *svn_ra_svn_end_list(svn_ra_svn_conn_t *conn, apr_pool_t *pool)
 {
+  if (conn->write_pos + 2 <= sizeof(conn->write_buf))
+  {
+    conn->write_buf[conn->write_pos] = ')';
+    conn->write_buf[conn->write_pos+1] = ' ';
+    conn->write_pos += 2;
+    return SVN_NO_ERROR;
+  }
+
   return writebuf_write(conn, pool, ") ", 2);
 }
 
@@ -503,50 +574,54 @@ static svn_error_t *vwrite_tuple(svn_ra_
     SVN_ERR(svn_ra_svn_start_list(conn, pool));
   for (; *fmt; fmt++)
     {
-      if (*fmt == 'n' && !opt)
-        SVN_ERR(svn_ra_svn_write_number(conn, pool, va_arg(ap, apr_uint64_t)));
-      else if (*fmt == 'r')
+      if (*fmt == 'c')
         {
-          rev = va_arg(ap, svn_revnum_t);
-          SVN_ERR_ASSERT(opt || SVN_IS_VALID_REVNUM(rev));
-          if (SVN_IS_VALID_REVNUM(rev))
-            SVN_ERR(svn_ra_svn_write_number(conn, pool, rev));
+          cstr = va_arg(ap, const char *);
+          if (cstr)
+            SVN_ERR(svn_ra_svn_write_cstring(conn, pool, cstr));
+          else
+            SVN_ERR_ASSERT(opt);
         }
       else if (*fmt == 's')
         {
           str = va_arg(ap, const svn_string_t *);
-          SVN_ERR_ASSERT(opt || str);
           if (str)
             SVN_ERR(svn_ra_svn_write_string(conn, pool, str));
+          else
+            SVN_ERR_ASSERT(opt);
         }
-      else if (*fmt == 'c')
+      else if (*fmt == '(' && !opt)
+        SVN_ERR(svn_ra_svn_start_list(conn, pool));
+      else if (*fmt == ')')
         {
-          cstr = va_arg(ap, const char *);
-          SVN_ERR_ASSERT(opt || cstr);
-          if (cstr)
-            SVN_ERR(svn_ra_svn_write_cstring(conn, pool, cstr));
+          SVN_ERR(svn_ra_svn_end_list(conn, pool));
+          opt = FALSE;
         }
+      else if (*fmt == '?')
+        opt = TRUE;
       else if (*fmt == 'w')
         {
           cstr = va_arg(ap, const char *);
-          SVN_ERR_ASSERT(opt || cstr);
           if (cstr)
             SVN_ERR(svn_ra_svn_write_word(conn, pool, cstr));
+          else
+            SVN_ERR_ASSERT(opt);
         }
+      else if (*fmt == 'r')
+        {
+          rev = va_arg(ap, svn_revnum_t);
+          if (SVN_IS_VALID_REVNUM(rev))
+            SVN_ERR(svn_ra_svn_write_number(conn, pool, rev));
+          else
+            SVN_ERR_ASSERT(opt);
+        }
+      else if (*fmt == 'n' && !opt)
+        SVN_ERR(svn_ra_svn_write_number(conn, pool, va_arg(ap, apr_uint64_t)));
       else if (*fmt == 'b' && !opt)
         {
           cstr = va_arg(ap, svn_boolean_t) ? "true" : "false";
           SVN_ERR(svn_ra_svn_write_word(conn, pool, cstr));
         }
-      else if (*fmt == '?')
-        opt = TRUE;
-      else if (*fmt == '(' && !opt)
-        SVN_ERR(svn_ra_svn_start_list(conn, pool));
-      else if (*fmt == ')')
-        {
-          SVN_ERR(svn_ra_svn_end_list(conn, pool));
-          opt = FALSE;
-        }
       else if (*fmt == '!' && !*(fmt + 1))
         return SVN_NO_ERROR;
       else
@@ -668,7 +743,8 @@ static svn_error_t *read_item(svn_ra_svn
           if (!svn_ctype_isdigit(c))
             break;
           val = val * 10 + (c - '0');
-          if ((val / 10) != prev_val) /* val wrapped past maximum value */
+          /* val wrapped past maximum value? */
+          if (prev_val >= (APR_UINT64_MAX / 10) && (val / 10) != prev_val)
             return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
                                     _("Number is larger than maximum"));
         }

Modified: subversion/branches/inheritable-props/subversion/libsvn_ra_svn/ra_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_ra_svn/ra_svn.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_ra_svn/ra_svn.h (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_ra_svn/ra_svn.h Mon Apr 16 23:45:38 2012
@@ -57,8 +57,8 @@ typedef svn_error_t *(*ra_svn_block_hand
                                                void *baton);
 
 /* The size of our per-connection read and write buffers. */
-#define SVN_RA_SVN__READBUF_SIZE 4096
-#define SVN_RA_SVN__WRITEBUF_SIZE 4096
+#define SVN_RA_SVN__READBUF_SIZE 4*4096
+#define SVN_RA_SVN__WRITEBUF_SIZE 4*4096
 
 /* Create forward reference */
 typedef struct svn_ra_svn__session_baton_t svn_ra_svn__session_baton_t;
@@ -79,7 +79,7 @@ struct svn_ra_svn_conn_st {
   char *read_ptr;
   char *read_end;
   char write_buf[SVN_RA_SVN__WRITEBUF_SIZE];
-  int write_pos;
+  apr_size_t write_pos;
   const char *uuid;
   const char *repos_root;
   ra_svn_block_handler_t block_handler;



Mime
View raw message