You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/04/17 01:45:40 UTC

svn commit: r1326832 [2/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...

Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/cache-membuffer.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/cache-membuffer.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/cache-membuffer.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/cache-membuffer.c Mon Apr 16 23:45:38 2012
@@ -584,43 +584,25 @@ insert_entry(svn_membuffer_t *cache, ent
     }
 }
 
-/* Map a KEY of length LEN to the CACHE and group that shall contain the
- * respective item. Return the hash value in TO_FIND. Returns -1 upon error.
+/* Map a KEY of 16 bytes to the CACHE and group that shall contain the
+ * respective item.
  */
 static apr_uint32_t
 get_group_index(svn_membuffer_t **cache,
-                const void *key,
-                apr_size_t len,
-                unsigned char *to_find,
-                apr_pool_t *pool)
+                const apr_uint32_t *key)
 {
-  apr_uint32_t hash = 0;
-  int i;
-
-  /* calculate a hash value for the key */
-  svn_checksum_t *checksum;
-  svn_error_t *err;
-
-  if (key == NULL)
-    return NO_INDEX;
-
-  err = svn_checksum(&checksum, svn_checksum_md5, key, len, pool);
-  if (err != NULL)
-  {
-    svn_error_clear(err);
-    return NO_INDEX;
-  }
-
-  memcpy(to_find, checksum->digest, APR_MD5_DIGESTSIZE);
-
-  /* select the cache segment to use */
-  *cache = &(*cache)[to_find[0] & ((*cache)->segment_count -1)];
+  apr_uint32_t hash;
 
   /* Get the group that *must* contain the entry. Fold the hash value
    * just to be sure (it should not be necessary for perfect hashes).
    */
-  for (i = 0; i < sizeof(to_find) / sizeof(apr_uint32_t); ++i)
-    hash += ((apr_uint32_t*)to_find)[i] ^ ((hash >> 19) || (hash << 13));
+  hash = key[0];
+  hash = key[1] ^ ((hash >> 19) || (hash << 13));
+  hash = key[2] ^ ((hash >> 19) || (hash << 13));
+  hash = key[3] ^ ((hash >> 19) || (hash << 13));
+
+  /* select the cache segment to use */
+  *cache = &(*cache)[key[0] & ((*cache)->segment_count -1)];
 
   return hash % (*cache)->group_count;
 }
@@ -1154,22 +1136,18 @@ membuffer_cache_set_internal(svn_membuff
 static svn_error_t *
 membuffer_cache_set(svn_membuffer_t *cache,
                     const void *key,
-                    apr_size_t key_len,
                     void *item,
                     svn_cache__serialize_func_t serializer,
                     DEBUG_CACHE_MEMBUFFER_TAG_ARG
                     apr_pool_t *scratch_pool)
 {
   apr_uint32_t group_index;
-  unsigned char to_find[KEY_SIZE];
   void *buffer = NULL;
-  apr_size_t size;
+  apr_size_t size = 0;
 
   /* find the entry group that will hold the key.
    */
-  group_index = get_group_index(&cache, key, key_len, to_find, scratch_pool);
-  if (group_index == NO_INDEX)
-    return SVN_NO_ERROR;
+  group_index = get_group_index(&cache, key);
 
   /* Serialize data data.
    */
@@ -1180,7 +1158,7 @@ membuffer_cache_set(svn_membuffer_t *cac
    */
   SVN_MUTEX__WITH_LOCK(cache->mutex,
                        membuffer_cache_set_internal(cache,
-                                                    to_find,
+                                                    key,
                                                     group_index,
                                                     buffer,
                                                     size,
@@ -1262,32 +1240,22 @@ membuffer_cache_get_internal(svn_membuff
 static svn_error_t *
 membuffer_cache_get(svn_membuffer_t *cache,
                     const void *key,
-                    apr_size_t key_len,
                     void **item,
                     svn_cache__deserialize_func_t deserializer,
                     DEBUG_CACHE_MEMBUFFER_TAG_ARG
                     apr_pool_t *result_pool)
 {
   apr_uint32_t group_index;
-  unsigned char to_find[KEY_SIZE];
   char *buffer;
   apr_size_t size;
 
   /* find the entry group that will hold the key.
    */
-  group_index = get_group_index(&cache, key, key_len, to_find, result_pool);
-  if (group_index == NO_INDEX)
-    {
-      /* Some error occured, return "item not found".
-       */
-      *item = NULL;
-      return SVN_NO_ERROR;
-    }
-
+  group_index = get_group_index(&cache, key);
   SVN_MUTEX__WITH_LOCK(cache->mutex,
                        membuffer_cache_get_internal(cache,
                                                     group_index,
-                                                    to_find,
+                                                    key,
                                                     &buffer,
                                                     &size,
                                                     DEBUG_CACHE_MEMBUFFER_TAG
@@ -1369,7 +1337,7 @@ membuffer_cache_get_partial_internal(svn
     }
 }
 
-/* Look for the cache entry identified by KEY and KEY_LEN. FOUND indicates
+/* Look for the cache entry identified by KEY. FOUND indicates
  * whether that entry exists. If not found, *ITEM will be NULL. Otherwise,
  * the DESERIALIZER is called with that entry and the BATON provided
  * and will extract the desired information. The result is set in *ITEM.
@@ -1378,7 +1346,6 @@ membuffer_cache_get_partial_internal(svn
 static svn_error_t *
 membuffer_cache_get_partial(svn_membuffer_t *cache,
                             const void *key,
-                            apr_size_t key_len,
                             void **item,
                             svn_boolean_t *found,
                             svn_cache__partial_getter_func_t deserializer,
@@ -1386,17 +1353,13 @@ membuffer_cache_get_partial(svn_membuffe
                             DEBUG_CACHE_MEMBUFFER_TAG_ARG
                             apr_pool_t *result_pool)
 {
-  apr_uint32_t group_index;
-  unsigned char to_find[KEY_SIZE];
+  apr_uint32_t group_index = get_group_index(&cache, key);
 
-  group_index = get_group_index(&cache, key, key_len, to_find, result_pool);
-
-  if (group_index != NO_INDEX)
-    SVN_MUTEX__WITH_LOCK(cache->mutex,
-                         membuffer_cache_get_partial_internal
-                             (cache, group_index, to_find, item, found,
-                              deserializer, baton, DEBUG_CACHE_MEMBUFFER_TAG
-                              result_pool));
+  SVN_MUTEX__WITH_LOCK(cache->mutex,
+                       membuffer_cache_get_partial_internal
+                           (cache, group_index, key, item, found,
+                            deserializer, baton, DEBUG_CACHE_MEMBUFFER_TAG
+                            result_pool));
 
   return SVN_NO_ERROR;
 }
@@ -1507,7 +1470,7 @@ membuffer_cache_set_partial_internal(svn
   return SVN_NO_ERROR;
 }
 
-/* Look for the cache entry identified by KEY and KEY_LEN. If no entry
+/* Look for the cache entry identified by KEY. If no entry
  * has been found, the function returns without modifying the cache.
  * Otherwise, FUNC is called with that entry and the BATON provided
  * and may modify the cache entry. Allocations will be done in POOL.
@@ -1515,25 +1478,19 @@ membuffer_cache_set_partial_internal(svn
 static svn_error_t *
 membuffer_cache_set_partial(svn_membuffer_t *cache,
                             const void *key,
-                            apr_size_t key_len,
                             svn_cache__partial_setter_func_t func,
                             void *baton,
                             DEBUG_CACHE_MEMBUFFER_TAG_ARG
                             apr_pool_t *scratch_pool)
 {
-  apr_uint32_t group_index;
-  unsigned char to_find[KEY_SIZE];
-
   /* cache item lookup
    */
-  group_index = get_group_index(&cache, key, key_len, to_find, scratch_pool);
-
-  if (group_index != NO_INDEX)
-    SVN_MUTEX__WITH_LOCK(cache->mutex,
-                         membuffer_cache_set_partial_internal
-                             (cache, group_index, to_find, func, baton,
-                              DEBUG_CACHE_MEMBUFFER_TAG_ARG
-                              scratch_pool));
+  apr_uint32_t group_index = get_group_index(&cache, key);
+  SVN_MUTEX__WITH_LOCK(cache->mutex,
+                       membuffer_cache_set_partial_internal
+                           (cache, group_index, key, func, baton,
+                            DEBUG_CACHE_MEMBUFFER_TAG_ARG
+                            scratch_pool));
 
   /* done here -> unlock the cache
    */
@@ -1576,7 +1533,7 @@ typedef struct svn_membuffer_cache_t
    * This makes (very likely) our keys different from all keys used
    * by other svn_membuffer_cache_t instances.
    */
-  unsigned char prefix [APR_MD5_DIGESTSIZE];
+  apr_uint64_t prefix [APR_MD5_DIGESTSIZE / sizeof(apr_uint64_t)];
 
   /* A copy of the unmodified prefix. It is being used as a user-visible
    * ID for this cache instance.
@@ -1588,6 +1545,10 @@ typedef struct svn_membuffer_cache_t
    */
   apr_ssize_t key_len;
 
+  /* Temporary buffer containing the hash key for the current access
+   */
+  apr_uint64_t combined_key [APR_MD5_DIGESTSIZE / sizeof(apr_uint64_t)];
+
   /* a pool for temporary allocations during get() and set()
    */
   apr_pool_t *pool;
@@ -1615,34 +1576,21 @@ typedef struct svn_membuffer_cache_t
 #define ALLOCATIONS_PER_POOL_CLEAR 10
 
 
-/* Basically concatenate PREFIX and KEY and return the result in FULL_KEY.
- * Allocations will be made in POOL.
+/* Basically calculate a hash value for KEY of length KEY_LEN, combine it
+ * with the CACHE->PREFIX and write the result in CACHE->COMBINED_KEY.
  */
 static void
-combine_key(const void *prefix,
-            apr_size_t prefix_len,
+combine_key(svn_membuffer_cache_t *cache,
             const void *key,
-            apr_ssize_t key_len,
-            void **full_key,
-            apr_size_t *full_key_len,
-            apr_pool_t *pool)
+            apr_ssize_t key_len)
 {
-  if (key == NULL)
-    {
-      *full_key = NULL;
-      *full_key_len = 0;
-    }
-  else
-    {
-      if (key_len == APR_HASH_KEY_STRING)
-        key_len = strlen((const char *) key);
+  if (key_len == APR_HASH_KEY_STRING)
+    key_len = strlen((const char *) key);
 
-      *full_key_len = prefix_len + key_len;
-      *full_key = apr_palloc(pool, *full_key_len);
+  apr_md5((unsigned char*)cache->combined_key, key, key_len);
 
-      memcpy(*full_key, prefix, prefix_len);
-      memcpy((char *)*full_key + prefix_len, key, key_len);
-    }
+  cache->combined_key[0] ^= cache->prefix[0];
+  cache->combined_key[1] ^= cache->prefix[1];
 }
 
 /* Implement svn_cache__vtable_t.get (not thread-safe)
@@ -1656,26 +1604,25 @@ svn_membuffer_cache_get(void **value_p,
 {
   svn_membuffer_cache_t *cache = cache_void;
 
+  DEBUG_CACHE_MEMBUFFER_INIT_TAG
+
+  /* special case */
+  if (key == NULL)
+    {
+      *value_p = NULL;
+      *found = FALSE;
+      
+      return SVN_NO_ERROR;
+    }
+
   /* construct the full, i.e. globally unique, key by adding
    * this cache instances' prefix
    */
-  void *full_key;
-  apr_size_t full_key_len;
-
-  DEBUG_CACHE_MEMBUFFER_INIT_TAG
-
-  combine_key(cache->prefix,
-              sizeof(cache->prefix),
-              key,
-              cache->key_len,
-              &full_key,
-              &full_key_len,
-              cache->pool);
+  combine_key(cache, key, cache->key_len);
 
   /* Look the item up. */
   SVN_ERR(membuffer_cache_get(cache->membuffer,
-                              full_key,
-                              full_key_len,
+                              cache->combined_key,
                               value_p,
                               cache->deserializer,
                               DEBUG_CACHE_MEMBUFFER_TAG
@@ -1706,11 +1653,12 @@ svn_membuffer_cache_set(void *cache_void
 {
   svn_membuffer_cache_t *cache = cache_void;
 
-  void *full_key;
-  apr_size_t full_key_len;
-
   DEBUG_CACHE_MEMBUFFER_INIT_TAG
 
+  /* special case */
+  if (key == NULL)
+    return SVN_NO_ERROR;
+
   /* we do some allocations below, so increase the allocation counter
    * by a slightly larger amount. Free allocated memory every now and then.
    */
@@ -1724,20 +1672,13 @@ svn_membuffer_cache_set(void *cache_void
   /* construct the full, i.e. globally unique, key by adding
    * this cache instances' prefix
    */
-  combine_key(cache->prefix,
-              sizeof(cache->prefix),
-              key,
-              cache->key_len,
-              &full_key,
-              &full_key_len,
-              cache->pool);
+  combine_key(cache, key, cache->key_len);
 
   /* (probably) add the item to the cache. But there is no real guarantee
    * that the item will actually be cached afterwards.
    */
   return membuffer_cache_set(cache->membuffer,
-                             full_key,
-                             full_key_len,
+                             cache->combined_key,
                              value,
                              cache->serializer,
                              DEBUG_CACHE_MEMBUFFER_TAG
@@ -1770,28 +1711,25 @@ svn_membuffer_cache_get_partial(void **v
 {
   svn_membuffer_cache_t *cache = cache_void;
 
-  void *full_key;
-  apr_size_t full_key_len;
-
   DEBUG_CACHE_MEMBUFFER_INIT_TAG
 
+  if (key == NULL)
+    {
+      *value_p = NULL;
+      *found = FALSE;
+
+      return SVN_NO_ERROR;
+    }
+
   if (++cache->alloc_counter > ALLOCATIONS_PER_POOL_CLEAR)
     {
       apr_pool_clear(cache->pool);
       cache->alloc_counter = 0;
     }
 
-  combine_key(cache->prefix,
-              sizeof(cache->prefix),
-              key,
-              cache->key_len,
-              &full_key,
-              &full_key_len,
-              cache->pool);
-
+  combine_key(cache, key, cache->key_len);
   SVN_ERR(membuffer_cache_get_partial(cache->membuffer,
-                                      full_key,
-                                      full_key_len,
+                                      cache->combined_key,
                                       value_p,
                                       found,
                                       func,
@@ -1813,27 +1751,18 @@ svn_membuffer_cache_set_partial(void *ca
 {
   svn_membuffer_cache_t *cache = cache_void;
 
-  void *full_key;
-  apr_size_t full_key_len;
-
   DEBUG_CACHE_MEMBUFFER_INIT_TAG
 
-  combine_key(cache->prefix,
-              sizeof(cache->prefix),
-              key,
-              cache->key_len,
-              &full_key,
-              &full_key_len,
-              scratch_pool);
-
-  SVN_ERR(membuffer_cache_set_partial(cache->membuffer,
-                                      full_key,
-                                      full_key_len,
-                                      func,
-                                      baton,
-                                      DEBUG_CACHE_MEMBUFFER_TAG
-                                      scratch_pool));
-
+  if (key != NULL)
+    {
+      combine_key(cache, key, cache->key_len);
+      SVN_ERR(membuffer_cache_set_partial(cache->membuffer,
+                                          cache->combined_key,
+                                          func,
+                                          baton,
+                                          DEBUG_CACHE_MEMBUFFER_TAG
+                                          scratch_pool));
+    }
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/config_file.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/config_file.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/config_file.c Mon Apr 16 23:45:38 2012
@@ -123,7 +123,7 @@ parser_ungetc(parse_context_t *ctx, int 
 static APR_INLINE svn_error_t *
 skip_whitespace(parse_context_t *ctx, int *c, int *pcount)
 {
-  int ch;
+  int ch = 0;
   int count = 0;
 
   SVN_ERR(parser_getc(ctx, &ch));

Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/io.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/io.c Mon Apr 16 23:45:38 2012
@@ -1866,29 +1866,23 @@ file_clear_locks(void *arg)
 #endif
 
 svn_error_t *
-svn_io_file_lock2(const char *lock_file,
-                  svn_boolean_t exclusive,
-                  svn_boolean_t nonblocking,
-                  apr_pool_t *pool)
+svn_io_lock_open_file(apr_file_t *lockfile_handle,
+                      svn_boolean_t exclusive,
+                      svn_boolean_t nonblocking,
+                      apr_pool_t *pool)
 {
   int locktype = APR_FLOCK_SHARED;
-  apr_file_t *lockfile_handle;
-  apr_int32_t flags;
   apr_status_t apr_err;
+  const char *fname;
 
   if (exclusive)
     locktype = APR_FLOCK_EXCLUSIVE;
-
-  flags = APR_READ;
-  if (locktype == APR_FLOCK_EXCLUSIVE)
-    flags |= APR_WRITE;
-
   if (nonblocking)
     locktype |= APR_FLOCK_NONBLOCK;
 
-  SVN_ERR(svn_io_file_open(&lockfile_handle, lock_file, flags,
-                           APR_OS_DEFAULT,
-                           pool));
+  /* We need this only in case of an error but this is cheap to get -
+   * so we do it here for clarity. */
+  apr_err = apr_file_name_get(&fname, lockfile_handle);
 
   /* Get lock on the filehandle. */
   apr_err = apr_file_lock(lockfile_handle, locktype);
@@ -1915,11 +1909,11 @@ svn_io_file_lock2(const char *lock_file,
         case APR_FLOCK_SHARED:
           return svn_error_wrap_apr(apr_err,
                                     _("Can't get shared lock on file '%s'"),
-                                    svn_dirent_local_style(lock_file, pool));
+                                    svn_dirent_local_style(fname, pool));
         case APR_FLOCK_EXCLUSIVE:
           return svn_error_wrap_apr(apr_err,
                                     _("Can't get exclusive lock on file '%s'"),
-                                    svn_dirent_local_style(lock_file, pool));
+                                    svn_dirent_local_style(fname, pool));
         default:
           SVN_ERR_MALFUNCTION();
         }
@@ -1936,6 +1930,57 @@ svn_io_file_lock2(const char *lock_file,
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_io_unlock_open_file(apr_file_t *lockfile_handle,
+                        apr_pool_t *pool)
+{
+  const char *fname;
+  apr_status_t apr_err = apr_file_unlock(lockfile_handle);
+
+  /* We need this only in case of an error but this is cheap to get -
+   * so we do it here for clarity. */
+  apr_err = apr_file_name_get(&fname, lockfile_handle);
+
+/* On Windows and OS/2 file locks are automatically released when
+   the file handle closes */
+#if !defined(WIN32) && !defined(__OS2__)
+  apr_pool_cleanup_kill(pool, lockfile_handle, file_clear_locks);
+#endif
+
+  return apr_err
+    ? svn_error_wrap_apr(apr_err, _("Can't unlock file '%s'"),
+                                  svn_dirent_local_style(fname, pool))
+    : SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_io_file_lock2(const char *lock_file,
+                  svn_boolean_t exclusive,
+                  svn_boolean_t nonblocking,
+                  apr_pool_t *pool)
+{
+  int locktype = APR_FLOCK_SHARED;
+  apr_file_t *lockfile_handle;
+  apr_int32_t flags;
+
+  if (exclusive)
+    locktype = APR_FLOCK_EXCLUSIVE;
+
+  flags = APR_READ;
+  if (locktype == APR_FLOCK_EXCLUSIVE)
+    flags |= APR_WRITE;
+
+  if (nonblocking)
+    locktype |= APR_FLOCK_NONBLOCK;
+
+  SVN_ERR(svn_io_file_open(&lockfile_handle, lock_file, flags,
+                           APR_OS_DEFAULT,
+                           pool));
+
+  /* Get lock on the filehandle. */
+  return svn_io_lock_open_file(lockfile_handle, exclusive, nonblocking, pool);
+}
+
 
 
 /* Data consistency/coherency operations. */

Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/mergeinfo.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/mergeinfo.c Mon Apr 16 23:45:38 2012
@@ -615,7 +615,7 @@ static svn_error_t *
 parse_revision_line(const char **input, const char *end, svn_mergeinfo_t hash,
                     apr_pool_t *scratch_pool)
 {
-  const char *pathname;
+  const char *pathname = "";
   apr_array_header_t *existing_rangelist;
   apr_array_header_t *rangelist = apr_array_make(scratch_pool, 1,
                                                  sizeof(svn_merge_range_t *));

Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/skel.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/skel.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/skel.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/skel.c Mon Apr 16 23:45:38 2012
@@ -24,6 +24,7 @@
 #include "svn_string.h"
 #include "svn_error.h"
 #include "private/svn_skel.h"
+#include "private/svn_string_private.h"
 
 
 /* Parsing skeletons.  */
@@ -582,9 +583,10 @@ void svn_skel__prepend_int(apr_int64_t v
                            svn_skel_t *skel,
                            apr_pool_t *result_pool)
 {
-  const char *str = apr_psprintf(result_pool, "%" APR_INT64_T_FMT, value);
+  char *val_string = apr_palloc(result_pool, SVN_INT64_BUFFER_SIZE);
+  svn__i64toa(val_string, value);
 
-  svn_skel__prepend_str(str, skel, result_pool);
+  svn_skel__prepend_str(val_string, skel, result_pool);
 }
 
 

Modified: subversion/branches/inheritable-props/subversion/libsvn_subr/svn_string.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_subr/svn_string.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_subr/svn_string.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_subr/svn_string.c Mon Apr 16 23:45:38 2012
@@ -920,3 +920,108 @@ svn__strtoff(apr_off_t *offset, const ch
   return apr_strtoff(offset, buf, end, base);
 #endif
 }
+
+/* "Precalculated" itoa values for 2 places (including leading zeros).
+ * For maximum performance, make sure all table entries are word-aligned.
+ */
+static const char decimal_table[100][4]
+    = { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09"
+      , "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"
+      , "20", "21", "22", "23", "24", "25", "26", "27", "28", "29"
+      , "30", "31", "32", "33", "34", "35", "36", "37", "38", "39"
+      , "40", "41", "42", "43", "44", "45", "46", "47", "48", "49"
+      , "50", "51", "52", "53", "54", "55", "56", "57", "58", "59"
+      , "60", "61", "62", "63", "64", "65", "66", "67", "68", "69"
+      , "70", "71", "72", "73", "74", "75", "76", "77", "78", "79"
+      , "80", "81", "82", "83", "84", "85", "86", "87", "88", "89"
+      , "90", "91", "92", "93", "94", "95", "96", "97", "98", "99"};
+
+/* Copy the two bytes at SOURCE[0] and SOURCE[1] to DEST[0] and DEST[1] */
+#if SVN_UNALIGNED_ACCESS_IS_OK
+#  define COPY_TWO_BYTES(dest,source)\
+      *(apr_uint16_t*)(dest) = *(apr_uint16_t*)(source);
+#else
+#  define COPY_TWO_BYTES(dest,source) \
+      (dest)[0] = (source)[0]; \
+      (dest)[1] = (source)[1];
+#endif
+
+apr_size_t
+svn__ui64toa(char * dest, apr_uint64_t number)
+{
+  char buffer[SVN_INT64_BUFFER_SIZE];
+  apr_uint32_t reduced;   /* used for 32 bit DIV */
+  char* target;
+
+  /* Small numbers are by far the most common case.
+   * Therefore, we use special code.
+   */
+  if (number < 100)
+    {
+      if (number < 10)
+        {
+          dest[0] = (char)('0' + number);
+          dest[1] = 0;
+          return 1;
+        }
+      else
+        {
+          COPY_TWO_BYTES(dest, decimal_table[(apr_size_t)number]);
+          dest[2] = 0;
+          return 2;
+        }
+    }
+
+  /* Standard code. Write string in pairs of chars back-to-front */
+  buffer[SVN_INT64_BUFFER_SIZE - 1] = 0;
+  target = &buffer[SVN_INT64_BUFFER_SIZE - 3];
+
+  /* Loop may be executed 0 .. 2 times. */
+  while (number >= 100000000)
+    {
+      /* Number is larger than 100^4, i.e. we can write 4x2 chars.
+       * Also, use 32 bit DIVs as these are about twice as fast.
+       */
+      reduced = number % 100000000;
+      number /= 100000000;
+
+      COPY_TWO_BYTES(target - 0, decimal_table[reduced % 100]);
+      reduced /= 100;
+      COPY_TWO_BYTES(target - 2, decimal_table[reduced % 100]);
+      reduced /= 100;
+      COPY_TWO_BYTES(target - 4, decimal_table[reduced % 100]);
+      reduced /= 100;
+      COPY_TWO_BYTES(target - 6, decimal_table[reduced % 100]);
+      target -= 8;
+    }
+
+  /* Now, the number fits into 32 bits, but is larger than 1 */
+  reduced = (apr_uint32_t)(number);
+  while (reduced >= 100)
+    {
+      COPY_TWO_BYTES(target, decimal_table[reduced % 100]);
+      reduced /= 100;
+      target -= 2;
+    }
+
+  /* The number is now smaller than 100 but larger than 1 */
+  COPY_TWO_BYTES(target, decimal_table[reduced]);
+
+  /* Correction for uneven count of places. */
+  if (reduced < 10)
+    ++target;
+
+  /* Copy to target */
+  memcpy(dest, target, &buffer[SVN_INT64_BUFFER_SIZE] - target);
+  return &buffer[SVN_INT64_BUFFER_SIZE] - target - 1;
+}
+
+apr_size_t
+svn__i64toa(char * dest, apr_int64_t number)
+{
+  if (number >= 0)
+    return svn__ui64toa(dest, (apr_uint64_t)number);
+
+  *dest = '-';
+  return svn__ui64toa(dest + 1, (apr_uint64_t)(0-number)) + 1;
+}

Modified: subversion/branches/inheritable-props/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_wc/adm_crawler.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_wc/adm_crawler.c Mon Apr 16 23:45:38 2012
@@ -692,11 +692,6 @@ svn_wc_crawl_revisions5(svn_wc_context_t
       return SVN_NO_ERROR;
     }
 
-  if (! repos_relpath)
-    SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url, NULL,
-                                       db, local_abspath,
-                                       scratch_pool, scratch_pool));
-
   if (target_depth == svn_depth_unknown)
     target_depth = svn_depth_infinity;
 

Modified: subversion/branches/inheritable-props/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_wc/ambient_depth_filter_editor.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_wc/ambient_depth_filter_editor.c Mon Apr 16 23:45:38 2012
@@ -113,8 +113,12 @@ struct dir_baton
   void *wrapped_baton;
 };
 
-/* Helper to call either svn_wc__db_base_get_info or svn_wc__db_read_info for
-   obtaining information for the ambient depth editor */
+/* Fetch the STATUS, KIND and DEPTH of the base node at LOCAL_ABSPATH.
+ * If there is no such base node, report 'normal', 'unknown' and 'unknown'
+ * respectively.
+ *
+ * STATUS and/or DEPTH may be NULL if not wanted; KIND must not be NULL.
+ */
 static svn_error_t *
 ambient_read_info(svn_wc__db_status_t *status,
                   svn_kind_t *kind,

Modified: subversion/branches/inheritable-props/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_wc/entries.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_wc/entries.c Mon Apr 16 23:45:38 2012
@@ -236,15 +236,6 @@ get_info_for_deleted(svn_wc_entry_t *ent
                                        entry_abspath,
                                        result_pool,
                                        scratch_pool));
-
-      if (*repos_relpath == NULL)
-        SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath,
-                                           &entry->repos,
-                                           &entry->uuid,
-                                           db,
-                                           entry_abspath,
-                                           result_pool,
-                                           scratch_pool));
     }
   else
     {

Modified: subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_wc/wc_db.h Mon Apr 16 23:45:38 2012
@@ -687,9 +687,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
 
      UPDATE_ROOT        FALSE
 
-   If the STATUS is normal, and the REPOS_* values are NULL, then the
-   caller should use svn_wc__db_scan_base_repos() to scan up the BASE
-   tree for the repository information.
+   If the STATUS is normal, the REPOS_* values will be non-NULL.
 
    If DEPTH is requested, and the node is NOT a directory, then the
    value will be set to svn_depth_unknown. If LOCAL_ABSPATH is a link,

Modified: subversion/branches/inheritable-props/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/mod_dav_svn/dav_svn.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/inheritable-props/subversion/mod_dav_svn/dav_svn.h Mon Apr 16 23:45:38 2012
@@ -316,6 +316,9 @@ svn_boolean_t dav_svn__get_txdelta_cache
 /* for the repository referred to by this request, is fulltext caching active? */
 svn_boolean_t dav_svn__get_fulltext_cache_flag(request_rec *r);
 
+/* for the repository referred to by this request, is revprop caching active? */
+svn_boolean_t dav_svn__get_revprop_cache_flag(request_rec *r);
+
 /* for the repository referred to by this request, are subrequests bypassed?
  * A function pointer if yes, NULL if not.
  */

Modified: subversion/branches/inheritable-props/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/mod_dav_svn/mod_dav_svn.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/inheritable-props/subversion/mod_dav_svn/mod_dav_svn.c Mon Apr 16 23:45:38 2012
@@ -95,6 +95,7 @@ typedef struct dir_conf_t {
   const char *activities_db;         /* path to activities database(s) */
   enum conf_flag txdelta_cache;      /* whether to enable txdelta caching */
   enum conf_flag fulltext_cache;     /* whether to enable fulltext caching */
+  enum conf_flag revprop_cache;      /* whether to enable revprop caching */
   apr_hash_t *hooks_env;             /* environment for hook scripts */
 } dir_conf_t;
 
@@ -224,6 +225,7 @@ merge_dir_config(apr_pool_t *p, void *ba
   newconf->list_parentpath = INHERIT_VALUE(parent, child, list_parentpath);
   newconf->txdelta_cache = INHERIT_VALUE(parent, child, txdelta_cache);
   newconf->fulltext_cache = INHERIT_VALUE(parent, child, fulltext_cache);
+  newconf->revprop_cache = INHERIT_VALUE(parent, child, revprop_cache);
   newconf->root_dir = INHERIT_VALUE(parent, child, root_dir);
   newconf->hooks_env = INHERIT_VALUE(parent, child, hooks_env);
 
@@ -476,6 +478,19 @@ SVNCacheFullTexts_cmd(cmd_parms *cmd, vo
 }
 
 static const char *
+SVNCacheRevProps_cmd(cmd_parms *cmd, void *config, int arg)
+{
+  dir_conf_t *conf = config;
+
+  if (arg)
+    conf->revprop_cache = CONF_FLAG_ON;
+  else
+    conf->revprop_cache = CONF_FLAG_OFF;
+
+  return NULL;
+}
+
+static const char *
 SVNInMemoryCacheSize_cmd(cmd_parms *cmd, void *config, const char *arg1)
 {
   svn_cache_config_t settings = *svn_cache_config_get();
@@ -847,6 +862,16 @@ dav_svn__get_fulltext_cache_flag(request
 }
 
 
+svn_boolean_t
+dav_svn__get_revprop_cache_flag(request_rec *r)
+{
+  dir_conf_t *conf;
+
+  conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
+  return conf->revprop_cache == CONF_FLAG_ON;
+}
+
+
 int
 dav_svn__get_compression_level(void)
 {
@@ -1083,6 +1108,14 @@ static const command_rec cmds[] =
                "if sufficient in-memory cache is available "
                "(default is Off)."),
 
+  /* per directory/location */
+  AP_INIT_FLAG("SVNCacheRevProps", SVNCacheRevProps_cmd, NULL,
+               ACCESS_CONF|RSRC_CONF,
+               "speeds up 'svn ls -v', export and checkout operations"
+               "but should only be enabled under the conditions described"
+               "in the documentation"
+               "(default is Off)."),
+
   /* per server */
   AP_INIT_TAKE1("SVNInMemoryCacheSize", SVNInMemoryCacheSize_cmd, NULL,
                 RSRC_CONF,

Modified: subversion/branches/inheritable-props/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/mod_dav_svn/repos.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/inheritable-props/subversion/mod_dav_svn/repos.c Mon Apr 16 23:45:38 2012
@@ -2154,6 +2154,10 @@ get_resource(request_rec *r,
                    SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                    APR_HASH_KEY_STRING,
                    dav_svn__get_fulltext_cache_flag(r) ? "1" : "0");
+      apr_hash_set(fs_config,
+                   SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
+                   APR_HASH_KEY_STRING,
+                   dav_svn__get_revprop_cache_flag(r) ? "1" : "0");
 
       /* open the FS */
       serr = svn_repos_open2(&(repos->repos), fs_path, fs_config,

Modified: subversion/branches/inheritable-props/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnadmin/main.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnadmin/main.c (original)
+++ subversion/branches/inheritable-props/subversion/svnadmin/main.c Mon Apr 16 23:45:38 2012
@@ -108,12 +108,14 @@ open_repos(svn_repos_t **repos,
            const char *path,
            apr_pool_t *pool)
 {
-  /* construct FS configuration parameters: enable all available caches */
+  /* construct FS configuration parameters: enable caches for r/o data */
   apr_hash_t *fs_config = apr_hash_make(pool);
   apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
                APR_HASH_KEY_STRING, "1");
   apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                APR_HASH_KEY_STRING, "1");
+  apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
+               APR_HASH_KEY_STRING, "0");
 
   /* now, open the requested repository */
   SVN_ERR(svn_repos_open2(repos, path, fs_config, pool));

Modified: subversion/branches/inheritable-props/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnserve/main.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnserve/main.c (original)
+++ subversion/branches/inheritable-props/subversion/svnserve/main.c Mon Apr 16 23:45:38 2012
@@ -147,7 +147,8 @@ void winservice_notify_stop(void)
 #define SVNSERVE_OPT_LOG_FILE        264
 #define SVNSERVE_OPT_CACHE_TXDELTAS  265
 #define SVNSERVE_OPT_CACHE_FULLTEXTS 266
-#define SVNSERVE_OPT_SINGLE_CONN     267
+#define SVNSERVE_OPT_CACHE_REVPROPS  267
+#define SVNSERVE_OPT_SINGLE_CONN     268
 
 static const apr_getopt_option_t svnserve__options[] =
   {
@@ -222,6 +223,14 @@ static const apr_getopt_option_t svnserv
         "Default is yes.\n"
         "                             "
         "[used for FSFS repositories only]")},
+    {"cache-revprops", SVNSERVE_OPT_CACHE_REVPROPS, 1,
+     N_("enable or disable caching of revision properties.\n"
+        "                             "
+        "Consult the documentation before activating this.\n"
+        "                             "
+        "Default is no.\n"
+        "                             "
+        "[used for FSFS repositories only]")},
 #ifdef CONNECTION_HAVE_THREAD_OPTION
     /* ### Making the assumption here that WIN32 never has fork and so
      * ### this option never exists when --service exists. */
@@ -482,6 +491,7 @@ int main(int argc, const char *argv[])
   params.memory_cache_size = (apr_uint64_t)-1;
   params.cache_fulltexts = TRUE;
   params.cache_txdeltas = FALSE;
+  params.cache_revprops = FALSE;
 
   while (1)
     {
@@ -625,6 +635,11 @@ int main(int argc, const char *argv[])
              = svn_tristate__from_word(arg) == svn_tristate_true;
           break;
 
+        case SVNSERVE_OPT_CACHE_REVPROPS:
+          params.cache_revprops
+             = svn_tristate__from_word(arg) == svn_tristate_true;
+          break;
+
 #ifdef WIN32
         case SVNSERVE_OPT_SERVICE:
           if (run_mode != run_mode_service)

Modified: subversion/branches/inheritable-props/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnserve/serve.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnserve/serve.c (original)
+++ subversion/branches/inheritable-props/subversion/svnserve/serve.c Mon Apr 16 23:45:38 2012
@@ -3376,6 +3376,8 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
                APR_HASH_KEY_STRING, params->cache_txdeltas ? "1" : "0");
   apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                APR_HASH_KEY_STRING, params->cache_fulltexts ? "1" : "0");
+  apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
+               APR_HASH_KEY_STRING, params->cache_revprops ? "1" : "0");
 
   /* Send greeting.  We don't support version 1 any more, so we can
    * send an empty mechlist. */

Modified: subversion/branches/inheritable-props/subversion/svnserve/server.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/svnserve/server.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/svnserve/server.h (original)
+++ subversion/branches/inheritable-props/subversion/svnserve/server.h Mon Apr 16 23:45:38 2012
@@ -116,6 +116,9 @@ typedef struct serve_params_t {
   /* Enable full-text caching for all FSFS repositories. */
   svn_boolean_t cache_fulltexts;
 
+  /* Enable revprop caching for all FSFS repositories. */
+  svn_boolean_t cache_revprops;
+
   /* Size of the in-memory cache (used by FSFS only). */
   apr_uint64_t memory_cache_size;
 

Modified: subversion/branches/inheritable-props/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/cmdline/svntest/main.py?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/inheritable-props/subversion/tests/cmdline/svntest/main.py Mon Apr 16 23:45:38 2012
@@ -1481,9 +1481,11 @@ def _create_parser():
   """Return a parser for our test suite."""
   def set_log_level(option, opt, value, parser, level=None):
     if level:
+      # called from --verbose
       logger.setLevel(level)
     else:
-      logger.setLevel(value)
+      # called from --set-log-level
+      logger.setLevel(getattr(logging, value, None) or int(value))
 
   # set up the parser
   _default_http_library = 'serf'
@@ -1535,7 +1537,8 @@ def _create_parser():
   parser.add_option('--config-file', action='store',
                     help="Configuration file for tests.")
   parser.add_option('--set-log-level', action='callback', type='str',
-                    callback=set_log_level)
+                    callback=set_log_level,
+		    help="Set log level (numerically or symbolically)")
   parser.add_option('--keep-local-tmp', action='store_true',
                     help="Don't remove svn-test-work/local_tmp after test " +
                          "run is complete.  Useful for debugging failures.")

Modified: subversion/branches/inheritable-props/subversion/tests/libsvn_repos/repos-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/libsvn_repos/repos-test.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/libsvn_repos/repos-test.c (original)
+++ subversion/branches/inheritable-props/subversion/tests/libsvn_repos/repos-test.c Mon Apr 16 23:45:38 2012
@@ -1318,9 +1318,8 @@ authz(apr_pool_t *pool)
   contents =
     "[greek:/dir2//secret]"                                                  NL
     "* ="                                                                    NL;
-  err = authz_get_handle(&authz_cfg, contents, subpool);
-  SVN_TEST_ASSERT_ERROR(err, SVN_ERR_AUTHZ_INVALID_CONFIG);
-  svn_error_clear(err);
+  SVN_TEST_ASSERT_ERROR(authz_get_handle(&authz_cfg, contents, subpool),
+                        SVN_ERR_AUTHZ_INVALID_CONFIG);
 
   /* That's a wrap! */
   svn_pool_destroy(subpool);
@@ -1480,10 +1479,7 @@ test_path_authz(svn_repos_t *repos,
 
   /* Check for potential errors. */
   if (path_action->authz_error_expected)
-    {
-      SVN_TEST_ASSERT_ERROR(err, SVN_ERR_AUTHZ_UNWRITABLE);
-      svn_error_clear(err);
-    }
+    SVN_TEST_ASSERT_ERROR(err, SVN_ERR_AUTHZ_UNWRITABLE);
   else
     SVN_ERR(err);
 

Propchange: subversion/branches/inheritable-props/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Apr 16 23:45:38 2012
@@ -36,3 +36,5 @@ auth-test
 eol-test
 subst_translate-test
 spillbuf-test
+named_atomic-test
+named_atomic-test-proc

Modified: subversion/branches/inheritable-props/subversion/tests/libsvn_subr/crypto-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/libsvn_subr/crypto-test.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/libsvn_subr/crypto-test.c (original)
+++ subversion/branches/inheritable-props/subversion/tests/libsvn_subr/crypto-test.c Mon Apr 16 23:45:38 2012
@@ -29,7 +29,10 @@
 #include "../svn_test.h"
 #include "../../libsvn_subr/crypto.h"
 
-/* Helper function:  encrypt PASSWORD within CTX using MASTER, then
+
+/*** Helper functions ***/
+
+/* Encrypt PASSWORD within CTX using MASTER, then
    decrypt those results and ensure the original PASSWORD comes out
    the other end. */
 static svn_error_t *
@@ -73,6 +76,9 @@ encrypt_decrypt(svn_crypto__ctx_t *ctx,
 }
 
 
+
+/*** Test functions ***/
+
 static svn_error_t *
 test_encrypt_decrypt_password(apr_pool_t *pool)
 {
@@ -141,6 +147,9 @@ test_passphrase_check(apr_pool_t *pool)
                                 "Error validating secret against checktext");
     }
 
+  /* Now check that a bogus secret causes the validation to fail.  We
+     try to verify each secret against the checktext generated by the
+     previous one.  */
   for (i = 0; i < num_passwords; i++)
     {
       int test_secret_index = (i + 1) % num_passwords;
@@ -159,8 +168,6 @@ test_passphrase_check(apr_pool_t *pool)
                                 "got success");
     }
 
-  /* Now check that a bogus secret causes the validation to fail. */
-
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/inheritable-props/subversion/tests/libsvn_subr/string-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/libsvn_subr/string-test.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/libsvn_subr/string-test.c (original)
+++ subversion/branches/inheritable-props/subversion/tests/libsvn_subr/string-test.c Mon Apr 16 23:45:38 2012
@@ -39,7 +39,7 @@
 #include "svn_io.h"
 #include "svn_error.h"
 #include "svn_string.h"   /* This includes <apr_*.h> */
-
+#include "private/svn_string_private.h"
 
 /* A quick way to create error messages.  */
 static svn_error_t *
@@ -511,6 +511,35 @@ test23(apr_pool_t *pool)
   return test_stringbuf_unequal("abc", "abb", pool);
 }
 
+static svn_error_t *
+test24(apr_pool_t *pool)
+{
+  char buffer[SVN_INT64_BUFFER_SIZE];
+  apr_size_t length;
+
+  length = svn__i64toa(buffer, 0);
+  SVN_TEST_ASSERT(length == 1);
+  SVN_TEST_STRING_ASSERT(buffer, "0");
+
+  length = svn__i64toa(buffer, -0x8000000000000000ll);
+  SVN_TEST_ASSERT(length == 20);
+  SVN_TEST_STRING_ASSERT(buffer, "-9223372036854775808");
+
+  length = svn__i64toa(buffer, 0x7fffffffffffffffll);
+  SVN_TEST_ASSERT(length == 19);
+  SVN_TEST_STRING_ASSERT(buffer, "9223372036854775807");
+
+  length = svn__ui64toa(buffer, 0);
+  SVN_TEST_ASSERT(length == 1);
+  SVN_TEST_STRING_ASSERT(buffer, "0");
+
+  length = svn__ui64toa(buffer, 0xffffffffffffffffll);
+  SVN_TEST_ASSERT(length == 20);
+  SVN_TEST_STRING_ASSERT(buffer, "18446744073709551615");
+  
+  return test_stringbuf_unequal("abc", "abb", pool);
+}
+
 /*
    ====================================================================
    If you add a new test to this file, update this array.
@@ -568,5 +597,7 @@ struct svn_test_descriptor_t test_funcs[
                    "compare stringbufs; different lengths"),
     SVN_TEST_PASS2(test23,
                    "compare stringbufs; same length, different content"),
+    SVN_TEST_PASS2(test24,
+                   "verify i64toa"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/inheritable-props/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/libsvn_wc/op-depth-test.c?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/inheritable-props/subversion/tests/libsvn_wc/op-depth-test.c Mon Apr 16 23:45:38 2012
@@ -4576,6 +4576,94 @@ move_update(const svn_test_opts_t *opts,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_scan_delete(const svn_test_opts_t *opts, apr_pool_t *pool)
+{
+  svn_test__sandbox_t b;
+  const char *moved_to_abspath, *moved_to_op_root_abspath;
+
+  SVN_ERR(svn_test__sandbox_create(&b, "scan_delete", opts, pool));
+
+  SVN_ERR(wc_mkdir(&b, "A"));
+  SVN_ERR(wc_mkdir(&b, "A/B"));
+  SVN_ERR(wc_mkdir(&b, "A/B/C"));
+  SVN_ERR(wc_mkdir(&b, "A2"));
+  SVN_ERR(wc_mkdir(&b, "A2/B"));
+  SVN_ERR(wc_mkdir(&b, "C2"));
+  SVN_ERR(wc_commit(&b, ""));
+  SVN_ERR(wc_update(&b, "", 1));
+
+  SVN_ERR(wc_move(&b, "A2", "X"));
+  SVN_ERR(wc_move(&b, "X/B", "Z"));
+  SVN_ERR(wc_move(&b, "A/B", "X/B"));
+  SVN_ERR(wc_move(&b, "X/B/C", "Y"));
+  SVN_ERR(wc_move(&b, "C2", "X/B/C"));
+
+  {
+    nodes_row_t nodes[] = {
+      {0, "",         "normal",       1, ""},
+      {0, "A",        "normal",       1, "A"},
+      {0, "A/B",      "normal",       1, "A/B"},
+      {0, "A/B/C",    "normal",       1, "A/B/C"},
+      {0, "A2",       "normal",       1, "A2"},
+      {0, "A2/B",     "normal",       1, "A2/B"},
+      {0, "C2",       "normal",       1, "C2"},
+      {1, "A2",       "base-deleted", NO_COPY_FROM, "X"},
+      {1, "A2/B",     "base-deleted", NO_COPY_FROM},
+      {1, "Z",        "normal",       1, "A2/B", MOVED_HERE},
+      {1, "X",        "normal",       1, "A2", MOVED_HERE},
+      {1, "X/B",      "normal",       1, "A2/B", MOVED_HERE},
+      {2, "A/B",      "base-deleted", NO_COPY_FROM, "X/B"},
+      {2, "A/B/C",    "base-deleted", NO_COPY_FROM},
+      {2, "X/B",      "normal",       1, "A/B", FALSE, "Z", TRUE},
+      {2, "X/B/C",    "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "Y",        "normal",       1, "A/B/C", MOVED_HERE},
+      {1, "C2",       "base-deleted", NO_COPY_FROM, "X/B/C"},
+      {3, "X/B/C",    "normal",       1, "C2", FALSE, "Y", TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_rows(&b, "", nodes));
+  }
+
+  SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+                                   NULL, &moved_to_op_root_abspath,
+                                   b.wc_ctx->db, wc_path(&b, "C2"),
+                                   pool, pool));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B/C"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X/B/C"));
+
+  SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+                                   NULL, &moved_to_op_root_abspath,
+                                   b.wc_ctx->db, wc_path(&b, "A/B"),
+                                   pool, pool));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X/B"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X/B"));
+
+  /* Not clear what this should give: Y or A/B/C or ... ? */
+  SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+                                   NULL, &moved_to_op_root_abspath,
+                                   b.wc_ctx->db, wc_path(&b, "A/B/C"),
+                                   pool, pool));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "Y"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "Y"));
+
+  SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+                                   NULL, &moved_to_op_root_abspath,
+                                   b.wc_ctx->db, wc_path(&b, "A2"),
+                                   pool, pool));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "X"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "X"));
+
+  /* Not clear what this should give: Z or X/B or ... ? */
+  SVN_ERR(svn_wc__db_scan_deletion(NULL, &moved_to_abspath,
+                                   NULL, &moved_to_op_root_abspath,
+                                   b.wc_ctx->db, wc_path(&b, "A2/B"),
+                                   pool, pool));
+  SVN_TEST_STRING_ASSERT(moved_to_abspath, wc_path(&b, "Z"));
+  SVN_TEST_STRING_ASSERT(moved_to_op_root_abspath, wc_path(&b, "Z"));
+
+  return SVN_NO_ERROR;
+}
 
 
 /* ---------------------------------------------------------------------- */
@@ -4668,5 +4756,7 @@ struct svn_test_descriptor_t test_funcs[
                        "move_added"),
     SVN_TEST_OPTS_XFAIL(move_update,
                        "move_update"),
+    SVN_TEST_OPTS_XFAIL(test_scan_delete,
+                       "scan_delete"),
     SVN_TEST_NULL
   };

Modified: subversion/branches/inheritable-props/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/tests/svn_test.h?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/tests/svn_test.h (original)
+++ subversion/branches/inheritable-props/subversion/tests/svn_test.h Mon Apr 16 23:45:38 2012
@@ -54,7 +54,9 @@ extern "C" {
   } while (0)
 
 /** Handy macro for testing an expected svn_error_t return value.
- * EXPECTED must be a real error (neither SVN_NO_ERROR nor APR_SUCCESS). */
+ * EXPECTED must be a real error (neither SVN_NO_ERROR nor APR_SUCCESS).
+ * The error returned by EXPR will be cleared.
+ */
 #define SVN_TEST_ASSERT_ERROR(expr, expected)                             \
   do {                                                                    \
     svn_error_t *err__ = (expr);                                          \
@@ -68,6 +70,7 @@ extern "C" {
                                         "Expected error %d but got %s",   \
                                         (expected),                       \
                                         "SVN_NO_ERROR");                  \
+    svn_error_clear(err__);                                               \
   } while (0)
 
 /** Handy macro for testing string equality.

Modified: subversion/branches/inheritable-props/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd (original)
+++ subversion/branches/inheritable-props/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd Mon Apr 16 23:45:38 2012
@@ -56,6 +56,7 @@ taskkill /im svnserve.exe /f 2> nul:
 taskkill /im svnrdump.exe /f 2> nul:
 taskkill /im svnsync.exe /f 2> nul:
 taskkill /im httpd.exe /f 2> nul:
+taskkill /im fs-test.exe /f 2> nul:
 taskkill /im op-depth-test.exe /f 2> nul:
 IF EXIST "%TESTDIR%\tests\subversion\tests\cmdline\httpd\" (
   rmdir /s /q  "%TESTDIR%\tests\subversion\tests\cmdline\httpd"

Modified: subversion/branches/inheritable-props/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/tools/dist/release.py?rev=1326832&r1=1326831&r2=1326832&view=diff
==============================================================================
--- subversion/branches/inheritable-props/tools/dist/release.py (original)
+++ subversion/branches/inheritable-props/tools/dist/release.py Mon Apr 16 23:45:38 2012
@@ -481,7 +481,9 @@ def post_candidates(args):
     proc = subprocess.Popen(['svn', 'import', '-m',
                              'Add %s candidate release artifacts' 
                                % args.version.base,
-                            get_deploydir(args.base_dir), dist_dev_url])
+                             '--auto-props', '--config-option',
+                             'config:auto-props:*.asc=svn:eol-style=native',
+                             get_deploydir(args.base_dir), dist_dev_url])
     (stdout, stderr) = proc.communicate()
     proc.wait()