Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.c Wed 
Feb 25 08:15:39 2015
@@ -366,7 +366,7 @@ hotcopy_copy_packed_shard(svn_boolean_t
   return SVN_NO_ERROR;
 }
 
-/* Remove file PATH, if it exists - even if it is read-only. 
+/* Remove file PATH, if it exists - even if it is read-only.
  * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
 hotcopy_remove_file(const char *path,
@@ -683,7 +683,7 @@ hotcopy_revisions(svn_fs_t *src_fs,
       /* Copy the revprop file. */
       SVN_ERR(hotcopy_copy_shard_file(&skipped, src_revprops_dir,
                                       dst_revprops_dir,
-                                      rev, max_files_per_dir, 
+                                      rev, max_files_per_dir,
                                       iterpool));
 
       /* Whenever this revision did not previously exist in the destination,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.h?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/hotcopy.h Wed 
Feb 25 08:15:39 2015
@@ -40,7 +40,7 @@ svn_fs_x__hotcopy_prepare_target(svn_fs_
  * not re-copy data which already exists in DST_FS.  Indicate progress via
  * the optional NOTIFY_FUNC callback using NOTIFY_BATON.
  * Use SCRATCH_POOL for temporary allocations. */
-svn_error_t * 
+svn_error_t *
 svn_fs_x__hotcopy(svn_fs_t *src_fs,
                   svn_fs_t *dst_fs,
                   svn_boolean_t incremental,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.c Wed Feb 
25 08:15:39 2015
@@ -88,7 +88,7 @@ typedef struct l2p_page_table_entry_t
 
 /* Master run-time data structure of an log-to-phys index.  It contains
  * the page tables of every revision covered by that index - but not the
- * pages themselves. 
+ * pages themselves.
  */
 typedef struct l2p_header_t
 {
@@ -732,7 +732,7 @@ stream_write_encoded(svn_stream_t *strea
                      apr_uint64_t value)
 {
   unsigned char encoded[ENCODED_INT_LENGTH];
- 
+
   apr_size_t len = encode_uint(encoded, value);
   return svn_error_trace(svn_stream_write(stream, (char *)encoded, &len));
 }
@@ -813,7 +813,7 @@ encode_l2p_page(apr_array_header_t *entr
   int container_count = 0;
   apr_uint64_t last_offset = 0;
   int i;
-  
+
   apr_size_t data_size = count * sizeof(l2p_page_entry_t);
   svn_stringbuf_t *container_offsets
     = svn_stringbuf_create_ensure(count * 2, scratch_pool);
@@ -939,7 +939,7 @@ svn_fs_x__l2p_index_append(svn_checksum_
    * The current implementation is limited to 2G entries per page. */
   if (ffd->l2p_page_size > APR_INT32_MAX)
     return svn_error_createf(SVN_ERR_FS_INDEX_OVERFLOW , NULL,
-                            _("L2P index page size  %s" 
+                            _("L2P index page size  %s"
                               " exceeds current limit of 2G entries"),
                             apr_psprintf(local_pool, "%" APR_UINT64_T_FMT,
                                          ffd->l2p_page_size));
@@ -1496,7 +1496,7 @@ get_l2p_page(l2p_page_t **page,
       container_offsets[i] = (apr_off_t)last_value - 1;
       /* '-1' is represented as '0' in the index file */
     }
-  
+
   /* read all page entries (offsets in rev file and container sub-items) */
   for (i = 0; i < result->entry_count; ++i)
     {
@@ -1544,14 +1544,14 @@ typedef struct l2p_page_baton_t
 
   /* offset within the cached page */
   apr_uint32_t page_offset;
-  
+
   /* out data */
   /* absolute item or container offset in rev / pack file */
   apr_off_t offset;
 
   /* 0 -> container / item itself; sub-item in container otherwise */
   apr_uint32_t sub_item;
- 
+
 } l2p_page_baton_t;
 
 /* Return the rev / pack file offset of the item at BATON->PAGE_OFFSET in
@@ -1650,7 +1650,7 @@ l2p_page_table_access_func(void **out,
 
   /* set output as a courtesy to the caller */
   *out = table_baton->pages;
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -1931,7 +1931,7 @@ l2p_proto_index_lookup(apr_off_t *offset
     }
 
   SVN_ERR(svn_io_file_close(file, scratch_pool));
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -2451,7 +2451,7 @@ p2l_page_info_copy(p2l_page_info_baton_t
                    const p2l_header_t *header,
                    const apr_off_t *offsets)
 {
-  /* if the requested offset is out of bounds, return info for 
+  /* if the requested offset is out of bounds, return info for
    * a zero-sized empty page right behind the last page.
    */
   if (baton->offset / header->page_size < header->page_count)
@@ -2533,7 +2533,7 @@ get_p2l_header(p2l_header_t **header,
 
   /* allocate result data structure */
   result = apr_pcalloc(result_pool, sizeof(*result));
-  
+
   /* Read table sizes, check them for plausibility and allocate page array. */
   SVN_ERR(packed_stream_get(&value, rev_file->p2l_stream));
   result->first_revision = (svn_revnum_t)value;
@@ -2870,7 +2870,7 @@ get_p2l_keys(p2l_page_info_baton_t *page
              apr_pool_t *scratch_pool)
 {
   p2l_page_info_baton_t page_info;
-  
+
   /* request info for the index pages that describes the pack / rev file
    * contents at pack / rev file position OFFSET. */
   page_info.offset = offset;
@@ -2896,7 +2896,7 @@ get_p2l_keys(p2l_page_info_baton_t *page
       key.is_packed = svn_fs_x__is_packed_rev(fs, revision);
       key.page = page_info.page_no;
 
-      *key_p = key;  
+      *key_p = key;
     }
 
   return SVN_NO_ERROR;
@@ -3607,7 +3607,7 @@ compare_p2l_info_rev(const sub_item_orde
 {
   svn_fs_x__id_t *lhs_part;
   svn_fs_x__id_t *rhs_part;
-  
+
   assert(lhs != rhs);
   if (lhs->entry->item_count == 0)
     return rhs->entry->item_count == 0 ? 0 : -1;
@@ -3936,7 +3936,7 @@ svn_fs_x__serialize_p2l_page(void **data
                             table_size);
 
   for (i = 0; i < page->nelts; ++i)
-    svn_temp_serializer__add_leaf(context, 
+    svn_temp_serializer__add_leaf(context,
                                   (const void * const *)&entries[i].items,
                                     entries[i].item_count
                                   * sizeof(*entries[i].items));

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.h?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/index.h Wed Feb 
25 08:15:39 2015
@@ -61,7 +61,7 @@ typedef struct svn_fs_x__p2l_entry_t
 {
   /* offset of the first byte that belongs to the item */
   apr_off_t offset;
-  
+
   /* length of the item in bytes */
   apr_off_t size;
 
@@ -110,7 +110,7 @@ svn_fs_x__l2p_proto_index_add_revision(a
  * (OFFSET, SUB_ITEM) may be (-1, 0) to mark 'invalid' item indexes but
  * that is already implied for all item indexes not explicitly given a
  * mapping.
- * 
+ *
  * Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *
@@ -123,7 +123,7 @@ svn_fs_x__l2p_proto_index_add_entry(apr_
 /* Use the proto index file stored at PROTO_FILE_NAME, construct the final
  * log-to-phys index and append it to INDEX_FILE.  The first revision will
  * be REVISION, entries to the next revision will be assigned to REVISION+1
- * and so forth.  
+ * and so forth.
  *
  * Return the MD5 checksum of the on-disk index data in *CHECKSUM, allocated
  * in RESULT_POOL.  Use SCRATCH_POOL for temporary allocations.

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.c Wed Feb 
25 08:15:39 2015
@@ -370,7 +370,7 @@ set_lock(const char *fs_path,
   SVN_ERR(read_digest_file(&children, NULL, fs_path, digest_path,
                            scratch_pool));
 
-  SVN_ERR(write_digest_file(children, lock, fs_path, digest_path, 
+  SVN_ERR(write_digest_file(children, lock, fs_path, digest_path,
                             perms_reference, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -422,7 +422,7 @@ add_to_digest(const char *fs_path,
     }
 
   if (apr_hash_count(children) != original_count)
-    SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, 
+    SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path,
                               perms_reference, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -457,7 +457,7 @@ delete_from_digest(const char *fs_path,
     }
 
   if (apr_hash_count(children) || lock)
-    SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path, 
+    SVN_ERR(write_digest_file(children, lock, fs_path, index_digest_path,
                               perms_reference, scratch_pool));
   else
     SVN_ERR(svn_io_remove_file2(index_digest_path, TRUE, scratch_pool));
@@ -925,7 +925,7 @@ lock_body(void *baton, apr_pool_t *pool)
      index is inconsistent, svn_fs_x__allow_locked_operation will
      show locked on the file but unlocked on the parent. */
 
-    
+
   while (outstanding)
     {
       const char *last_path = NULL;
@@ -1009,7 +1009,7 @@ lock_body(void *baton, apr_pool_t *pool)
                                   rev_0_path, iterpool));
         }
     }
-      
+
   return SVN_NO_ERROR;
 }
 
@@ -1277,7 +1277,7 @@ svn_fs_x__lock(svn_fs_t *fs,
             info->fs_err = svn_error_createf(SVN_ERR_FS_LOCK_OPERATION_FAILED,
                                              0, _("Failed to lock '%s'"),
                                              info->path);
-                                             
+
           cb_err = lock_callback(lock_baton, info->path, info->lock,
                                  info->fs_err, scratch_pool);
         }

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.h?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/lock.h Wed Feb 
25 08:15:39 2015
@@ -60,7 +60,7 @@ svn_fs_x__unlock(svn_fs_t *fs,
                  void *lock_baton,
                  apr_pool_t *result_pool,
                  apr_pool_t *scratch_pool);
-  
+
 /* See svn_fs_get_lock(). */
 svn_error_t *
 svn_fs_x__get_lock(svn_lock_t **lock,

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c Wed 
Feb 25 08:15:39 2015
@@ -588,7 +588,7 @@ format_digest(const unsigned char *diges
   svn_checksum_t checksum;
   checksum.digest = digest;
   checksum.kind = kind;
-  
+
   if (is_null)
     return "(null)";
 
@@ -754,7 +754,7 @@ svn_fs_x__write_rep_header(svn_fs_x__rep
                            apr_pool_t *scratch_pool)
 {
   const char *text;
-  
+
   switch (header->type)
     {
       case svn_fs_x__rep_self_delta:
@@ -1004,7 +1004,7 @@ svn_fs_x__read_changes_incrementally(svn
     }
   while (change);
   svn_pool_destroy(iterpool);
-  
+
   return SVN_NO_ERROR;
 }
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.h?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.h Wed 
Feb 25 08:15:39 2015
@@ -49,7 +49,7 @@ extern "C" {
  * and return the start offsets of the index data in *L2P_OFFSET and
  * *P2L_OFFSET, respectively.  Also, return the expected checksums in
  * in *L2P_CHECKSUM and *P2L_CHECKSUM.
- * 
+ *
  * Note that REV is only used to construct nicer error objects that
  * mention this revision.  Allocate the checksums in RESULT_POOL.
  */
@@ -160,7 +160,7 @@ svn_fs_x__read_rep_header(svn_fs_x__rep_
                           apr_pool_t *result_pool,
                           apr_pool_t *scratch_pool);
 
-/* Write the representation HEADER to STREAM. 
+/* Write the representation HEADER to STREAM.
  * Use SCRATCH_POOL for allocations. */
 svn_error_t *
 svn_fs_x__write_rep_header(svn_fs_x__rep_header_t *header,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c Wed 
Feb 25 08:15:39 2015
@@ -50,7 +50,7 @@
 #define NODEREV_HAS_CPATH    0x00040
 
 /* Our internal representation of a svn_fs_x__noderev_t.
- * 
+ *
  * We will store path strings in a string container and reference them
  * from here.  Similarly, IDs and representations are being stored in
  * separate containers and then also referenced here.  This eliminates
@@ -274,7 +274,7 @@ svn_fs_x__noderevs_add(svn_fs_x__noderev
                                            0);
 
   binary_noderev.mergeinfo_count = noderev->mergeinfo_count;
-  
+
   APR_ARRAY_PUSH(container->noderevs, binary_noderev_t) = binary_noderev;
 
   return container->noderevs->nelts - 1;
@@ -574,7 +574,7 @@ svn_fs_x__write_noderevs_container(svn_s
   /* write to disk */
   SVN_ERR(svn_fs_x__write_string_table(stream, paths, scratch_pool));
   SVN_ERR(svn_packed__data_write(stream, root, scratch_pool));
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -724,7 +724,7 @@ svn_fs_x__read_noderevs_container(svn_fs
     }
 
   *container = noderevs;
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -905,7 +905,7 @@ svn_fs_x__mergeinfo_count_get_func(void
   /* Resolve all container pointers */
   resolve_apr_array_header(&noderevs, container, &container->noderevs);
   binary_noderev = &APR_ARRAY_IDX(&noderevs, idx, binary_noderev_t);
-  
+
   *(apr_int64_t *)out = binary_noderev->mergeinfo_count;
 
   return SVN_NO_ERROR;

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/pack.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/pack.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/pack.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/pack.c Wed Feb 
25 08:15:39 2015
@@ -70,7 +70,7 @@
  * each of the 4 buckets separately.  The first three will simply order
  * their items by revision, starting with the newest once.  Placing rep
  * and noderev items is a more elaborate process documented in the code.
- * 
+ *
  * In short, we store items in the following order:
  * - changed paths lists
  * - node property
@@ -269,7 +269,7 @@ initialize_pack_context(pack_context_t *
   context->start_rev = shard_rev;
   context->end_rev = shard_rev;
   context->shard_end_rev = shard_rev + ffd->max_files_per_dir;
-  
+
   /* Create the new directory and pack file. */
   context->shard_dir = shard_dir;
   context->pack_file_dir = pack_file_dir;
@@ -346,7 +346,7 @@ reset_pack_context(pack_context_t *conte
   SVN_ERR(svn_io_file_trunc(context->reps_file, 0, scratch_pool));
 
   svn_pool_clear(context->info_pool);
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -375,7 +375,7 @@ close_pack_context(pack_context_t *conte
   SVN_ERR(svn_fs_x__add_index_data(context->fs, context->pack_file,
                                     proto_l2p_index_path,
                                     proto_p2l_index_path,
-                                    context->shard_rev, 
+                                    context->shard_rev,
                                     scratch_pool));
 
   /* remove proto index files */
@@ -401,7 +401,7 @@ copy_file_data(pack_context_t *context,
   /* most non-representation items will be small.  Minimize the buffer
    * and infrastructure overhead in that case. */
   enum { STACK_BUFFER_SIZE = 1024 };
- 
+
   if (size < STACK_BUFFER_SIZE)
     {
       /* copy small data using a fixed-size buffer on stack */
@@ -484,10 +484,10 @@ copy_item_to_temp(pack_context_t *contex
   SVN_ERR(svn_fs_x__get_file_offset(&new_entry->offset, temp_file,
                                     scratch_pool));
   APR_ARRAY_PUSH(entries, svn_fs_x__p2l_entry_t *) = new_entry;
-  
+
   SVN_ERR(copy_file_data(context, temp_file, rev_file->file, entry->size,
                          scratch_pool));
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -749,7 +749,7 @@ compare_p2l_info(const svn_fs_x__p2l_ent
     return (*lhs)->item_count == 0 ? 0 : -1;
   if ((*lhs)->item_count == 0)
     return 1;
-  
+
   if ((*lhs)->items[0].change_set == (*rhs)->items[0].change_set)
     return (*lhs)->items[0].number > (*rhs)->items[0].number ? -1 : 1;
 
@@ -842,7 +842,7 @@ auto_pad_block(pack_context_t *context,
                apr_pool_t *scratch_pool)
 {
   svn_fs_x__data_t *ffd = context->fs->fsap_data;
-  
+
   /* This is the maximum number of bytes "wasted" that way per block.
    * Larger items will cross the block boundaries. */
   const apr_off_t max_padding = MAX(ffd->block_size / 50, 512);
@@ -873,7 +873,7 @@ auto_pad_block(pack_context_t *context,
   return SVN_NO_ERROR;
 }
 
-/* Return the index of the first entry in CONTEXT->REFERENCES that 
+/* Return the index of the first entry in CONTEXT->REFERENCES that
  * references ITEM->ITEMS[0] if such entries exist.  All matching items
  * will be consecutive.
  */
@@ -886,7 +886,7 @@ find_first_reference(pack_context_t *con
 
   while (lower <= upper)
     {
-      int current = lower + (upper - lower) / 2; 
+      int current = lower + (upper - lower) / 2;
       reference_t *reference
         = APR_ARRAY_IDX(context->references, current, reference_t *);
 
@@ -1005,7 +1005,7 @@ reps_fit_into_containers(apr_array_heade
   return TRUE;
 }
 
-/* Write the *CONTAINER containing the noderevs described by the 
+/* Write the *CONTAINER containing the noderevs described by the
  * svn_fs_x__p2l_entry_t * in ITEMS to the pack file on CONTEXT.
  * Append a P2L entry for the container to CONTAINER->REPS.
  * Afterwards, clear ITEMS and re-allocate *CONTAINER in CONTAINER_POOL
@@ -1072,8 +1072,8 @@ write_nodes_container(pack_context_t *co
  * from TEMP_FILE and add them to *CONTAINER and NODES_IN_CONTAINER.
  * Whenever the container grows bigger than the current block in CONTEXT,
  * write the data to disk and continue in the next block.
- * 
- * Use CONTAINER_POOL to re-allocate the *CONTAINER as necessary and 
+ *
+ * Use CONTAINER_POOL to re-allocate the *CONTAINER as necessary and
  * SCRATCH_POOL to temporary allocations.
  */
 static svn_error_t *
@@ -1430,7 +1430,7 @@ copy_reps_from_temp(pack_context_t *cont
                           nodes_in_container, container_pool, iterpool));
 
       /* actually flush the noderevs to disk if the reps container is likely
-       * to fill the block, i.e. no further noderevs will be added to the 
+       * to fill the block, i.e. no further noderevs will be added to the
        * nodes container. */
       if (should_flush_nodes_container(context, nodes_container, node_parts))
         SVN_ERR(write_nodes_container(context, &nodes_container,
@@ -1730,7 +1730,7 @@ pack_range(pack_context_t *context,
 
       /* store the indirect array index */
       APR_ARRAY_PUSH(context->rev_offsets, int) = context->reps->nelts;
-  
+
       /* read the phys-to-log index file until we covered the whole rev file.
        * That index contains enough info to build both target indexes from it. 
*/
       while (offset < rev_file->l2p_offset)
@@ -1826,7 +1826,7 @@ pack_range(pack_context_t *context,
   SVN_ERR(write_l2p_index(context, revpool));
 
   svn_pool_destroy(revpool);
-  
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/reps.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/reps.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/reps.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/reps.c Wed Feb 
25 08:15:39 2015
@@ -34,7 +34,7 @@
 /* Length of the text chunks we hash and match.  The algorithm will find
  * most matches with a length of 2 * MATCH_BLOCKSIZE and only specific
  * ones that are shorter than MATCH_BLOCKSIZE.
- * 
+ *
  * This should be a power of two and must be a multiple of 8.
  * Good choices are 32, 64 and 128.
  */
@@ -55,7 +55,7 @@
 
 /* Byte strings are described by a series of copy instructions that each
  * do one of the following
- * 
+ *
  * - copy a given number of bytes from the text corpus starting at a
  *   given offset
  * - reference other instruction and specify how many of instructions of
@@ -244,7 +244,7 @@ struct svn_fs_x__rep_extractor_t
 
   /* bases (base_t) yet to process (not used ATM) */
   apr_array_header_t *bases;
-  
+
   /* missing sections (missing_t) in result->data that need to be filled,
    * yet */
   apr_array_header_t *missing;
@@ -627,7 +627,7 @@ get_text(svn_fs_x__rep_extractor_t *extr
         missing.count = instruction->count;
         missing.offset = instruction->offset;
         svn_stringbuf_appendfill(extractor->result, 0, instruction->count);
-        
+
         if (extractor->missing == NULL)
           extractor->missing = apr_array_make(extractor->pool, 1,
                                               sizeof(missing));
@@ -723,7 +723,7 @@ svn_fs_x__write_reps_container(svn_strea
 
   svn_packed__create_int_substream(instructions_stream, TRUE, TRUE);
   svn_packed__create_int_substream(instructions_stream, FALSE, FALSE);
-  
+
   /* text */
   svn_packed__add_bytes(text_stream, builder->text->data, builder->text->len);
 
@@ -760,7 +760,7 @@ svn_fs_x__write_reps_container(svn_strea
 
   /* write to stream */
   SVN_ERR(svn_packed__data_write(stream, root, scratch_pool));
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -787,7 +787,7 @@ svn_fs_x__read_reps_container(svn_fs_x__
 
   /* read from disk */
   SVN_ERR(svn_packed__data_read(&root, stream, result_pool, scratch_pool));
-  
+
   bases_stream = svn_packed__first_int_stream(root);
   reps_stream = svn_packed__next_int_stream(bases_stream);
   instructions_stream = svn_packed__next_int_stream(reps_stream);
@@ -848,7 +848,7 @@ svn_fs_x__read_reps_container(svn_fs_x__
 
   /* return result */
   *container = reps;
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -924,7 +924,7 @@ svn_fs_x__reps_get_func(void **out,
                         apr_pool_t *pool)
 {
   svn_fs_x__reps_baton_t *reps_baton = baton;
-  
+
   /* get a usable reps structure  */
   const svn_fs_x__reps_t *cached = data;
   svn_fs_x__reps_t *reps = apr_pmemdup(pool, cached, sizeof(*reps));

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/rev_file.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/rev_file.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/rev_file.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/rev_file.c Wed 
Feb 25 08:15:39 2015
@@ -162,7 +162,7 @@ open_pack_or_rev_file(svn_fs_x__revision
 
       /* We may have to *temporarily* enable write access. */
       err = writable ? auto_make_writable(path, result_pool, scratch_pool)
-                     : SVN_NO_ERROR; 
+                     : SVN_NO_ERROR;
 
       /* open the revision file in buffered r/o or r/w mode */
       if (!err)

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c Wed 
Feb 25 08:15:39 2015
@@ -122,7 +122,7 @@ svn_fs_x__upgrade_cleanup_pack_revprops(
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   const char *revsprops_dir = svn_dirent_join(fs->path, PATH_REVPROPS_DIR,
                                               scratch_pool);
-  
+
   /* delete the non-packed revprops shards afterwards */
   for (shard = 0; shard < first_unpacked_shard; ++shard)
     {
@@ -660,7 +660,7 @@ typedef struct packed_revprops_t
  * our file system, the revprops belong to REVISION and the global revprop
  * GENERATION is used as well.
  *
- * The returned hash will be allocated in RESULT_POOL, SCRATCH_POOL is 
+ * The returned hash will be allocated in RESULT_POOL, SCRATCH_POOL is
  * being used for temporary allocations.
  */
 static svn_error_t *
@@ -942,7 +942,7 @@ parse_packed_revprops(svn_fs_t *fs,
   if (read_all)
     {
       /* Init / construct REVPROPS members. */
-      revprops->sizes = apr_array_make(result_pool, (int)count, 
+      revprops->sizes = apr_array_make(result_pool, (int)count,
                                        sizeof(offset));
       revprops->offsets = apr_array_make(result_pool, (int)count,
                                          sizeof(offset));

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h Wed 
Feb 25 08:15:39 2015
@@ -40,12 +40,12 @@ svn_fs_x__reset_revprop_generation_file(
                                         apr_pool_t *scratch_pool);
 
 /* In the filesystem FS, pack all revprop shards up to min_unpacked_rev.
- * 
+ *
  * NOTE: Keep the old non-packed shards around until after the format bump.
  * Otherwise, re-running upgrade will drop the packed revprop shard but
  * have no unpacked data anymore.  Call upgrade_cleanup_pack_revprops after
  * the bump.
- * 
+ *
  * NOTIFY_FUNC and NOTIFY_BATON as well as CANCEL_FUNC and CANCEL_BATON are
  * used in the usual way.  Temporary allocations are done in SCRATCH_POOL.
  */
@@ -59,7 +59,7 @@ svn_fs_x__upgrade_pack_revprops(svn_fs_t
 
 /* In the filesystem FS, remove all non-packed revprop shards up to
  * min_unpacked_rev.  Temporary allocations are done in SCRATCH_POOL.
- * 
+ *
  * NOTIFY_FUNC and NOTIFY_BATON as well as CANCEL_FUNC and CANCEL_BATON are
  * used in the usual way.  Cancellation is supported in the sense that we
  * will cleanly abort the operation.  However, there will be remnant shards
@@ -100,7 +100,7 @@ svn_fs_x__set_revision_proplist(svn_fs_t
 
 /* Return TRUE, if for REVISION in FS, we can find the revprop pack file.
  * Use SCRATCH_POOL for temporary allocations.
- * Set *MISSING, if the reason is a missing manifest or pack file. 
+ * Set *MISSING, if the reason is a missing manifest or pack file.
  */
 svn_boolean_t
 svn_fs_x__packed_revprop_available(svn_boolean_t *missing,

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.c 
Wed Feb 25 08:15:39 2015
@@ -128,7 +128,7 @@ svn_fs_x__string_table_builder_create(ap
   result->tables = apr_array_make(result_pool, 1, sizeof(builder_table_t *));
 
   add_table(result);
-  
+
   return result;
 }
 
@@ -146,7 +146,7 @@ balance(builder_table_t *table,
       node->left->right = node;
       *parent = node->left;
       node->left = temp;
-      
+
       --left_height;
     }
   else if (left_height + 1 < right_height)
@@ -370,7 +370,7 @@ svn_fs_x__string_table_builder_estimate_
   /* ZIP compression should give us a 50% reduction.
    * add some static overhead */
   return 200 + total / 2;
- 
+
 }
 
 static void
@@ -456,7 +456,7 @@ svn_fs_x__string_table_create(const stri
                               apr_pool_t *pool)
 {
   apr_size_t i;
-  
+
   string_table_t *result = apr_pcalloc(pool, sizeof(*result));
   result->size = (apr_size_t)builder->tables->nelts;
   result->sub_tables
@@ -610,7 +610,7 @@ svn_fs_x__write_string_table(svn_stream_
   svn_packed__add_uint(table_sizes, table->size);
 
   /* all short-string char data sizes */
-  
+
   for (i = 0; i < table->size; ++i)
     svn_packed__add_uint(table_sizes,
                          table->sub_tables[i].short_string_count);
@@ -660,7 +660,7 @@ svn_fs_x__read_string_table(string_table
   apr_size_t i, k;
 
   string_table_t *table = apr_palloc(result_pool, sizeof(*table));
- 
+
   svn_packed__data_root_t *root;
   svn_packed__int_stream_t *table_sizes;
   svn_packed__byte_stream_t *large_strings;
@@ -787,7 +787,7 @@ svn_fs_x__serialize_string_table(svn_tem
                                         (const void * const *)&string->data,
                                         string->len + 1);
         }
-        
+
       svn_temp_serializer__pop(context);
     }
 
@@ -802,7 +802,7 @@ svn_fs_x__deserialize_string_table(void
 {
   apr_size_t i, k;
   string_sub_table_t *sub_tables;
-  
+
   svn_temp_deserializer__resolve(buffer, (void **)table);
   if (*table == NULL)
     return;

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.h?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/string_table.h 
Wed Feb 25 08:15:39 2015
@@ -32,7 +32,7 @@ extern "C" {
 
 /* A string table is a very space efficient, read-only representation for
  * a set of strings with high degreed of prefix and postfix overhead.
- * 
+ *
  * Creating a string table is a two-stage process:  Use a builder class,
  * stuff all the strings in there and let it then do the heavy lifting of
  * classification and compression to create the actual string table object.
@@ -101,7 +101,7 @@ svn_error_t *
 svn_fs_x__read_string_table(string_table_t **table_p,
                             svn_stream_t *stream,
                             apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool); 
+                            apr_pool_t *scratch_pool);
 
 /* Serialize string table *ST within the serialization CONTEXT.
  */

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c 
Wed Feb 25 08:15:39 2015
@@ -474,7 +474,7 @@ svn_fs_x__with_all_locks(svn_fs_t *fs,
                          apr_pool_t *scratch_pool)
 {
   /* Be sure to use the correct lock ordering as documented in
-     fs_fs_shared_data_t.  The lock chain is being created in 
+     fs_fs_shared_data_t.  The lock chain is being created in
      innermost (last to acquire) -> outermost (first to acquire) order. */
   with_lock_baton_t *lock_baton
     = create_lock_baton(fs, write_lock, body, baton, scratch_pool);
@@ -716,7 +716,7 @@ get_writable_proto_rev(apr_file_t **file
 
   /* We don't want unused sections (such as leftovers from failed delta
      stream) in our file.  If we use log addressing, we would need an
-     index entry for the unused section and that section would need to 
+     index entry for the unused section and that section would need to
      be all NUL by convention.  So, detect and fix those cases by truncating
      the protorev file. */
   if (!err)
@@ -1368,7 +1368,7 @@ set_txn_proplist(svn_fs_t *fs,
   SVN_ERR(svn_stream_close(stream));
 
   /* Open the transaction properties file and write new contents to it. */
-  SVN_ERR(svn_io_write_atomic((final 
+  SVN_ERR(svn_io_write_atomic((final
                                ? svn_fs_x__path_txn_props_final(fs, txn_id,
                                                                 scratch_pool)
                                : svn_fs_x__path_txn_props(fs, txn_id,
@@ -1558,7 +1558,7 @@ write_next_ids(svn_fs_t *fs,
   apr_file_t *file;
   char buffer[2 * SVN_INT64_BUFFER_SIZE + 2];
   char *p = buffer;
-  
+
   p += svn__ui64tobase36(p, node_id);
   *(p++) = ' ';
   p += svn__ui64tobase36(p, copy_id);
@@ -3288,7 +3288,7 @@ svn_fs_x__add_index_data(svn_fs_t *fs,
                                      scratch_pool, scratch_pool));
 
   /* Append footer. */
-  footer = svn_fs_x__unparse_footer(l2p_offset, l2p_checksum, 
+  footer = svn_fs_x__unparse_footer(l2p_offset, l2p_checksum,
                                     p2l_offset, p2l_checksum, scratch_pool,
                                     scratch_pool);
   SVN_ERR(svn_io_file_write_full(file, footer->data, footer->len, NULL,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c Wed Feb 
25 08:15:39 2015
@@ -1701,9 +1701,9 @@ compare_dir_structure(svn_boolean_t *cha
           svn_pool_clear(iterpool);
 
           /* Modified but not copied / replaced or anything? */
-          SVN_ERR(svn_fs_x__dag_get_node(&lhs_node, fs, &lhs_entry->id, 
+          SVN_ERR(svn_fs_x__dag_get_node(&lhs_node, fs, &lhs_entry->id,
                                          iterpool, iterpool));
-          SVN_ERR(svn_fs_x__dag_get_node(&rhs_node, fs, &rhs_entry->id, 
+          SVN_ERR(svn_fs_x__dag_get_node(&rhs_node, fs, &rhs_entry->id,
                                          iterpool, iterpool));
           SVN_ERR(svn_fs_x__dag_same_line_of_history(&same_history,
                                                      lhs_node, rhs_node));
@@ -2110,7 +2110,7 @@ merge_changes(dag_node_t *ancestor_node,
   svn_fs_t *fs = txn->fs;
   svn_fs_x__txn_id_t txn_id = svn_fs_x__txn_get_id(txn);
   svn_boolean_t related;
-  
+
   SVN_ERR(svn_fs_x__dag_txn_root(&txn_root_node, fs, txn_id, scratch_pool,
                                  scratch_pool));
 
@@ -2700,7 +2700,7 @@ x_copy(svn_fs_root_t *from_root,
 
   SVN_ERR(copy_helper(from_root,
                       svn_fs__canonicalize_abspath(from_path, subpool),
-                      to_root, 
+                      to_root,
                       svn_fs__canonicalize_abspath(to_path, subpool),
                       TRUE, subpool));
 
@@ -2939,7 +2939,7 @@ window_consumer(svn_txdelta_window_t *wi
      cb->target_string. */
   SVN_ERR(tb->interpreter(window, tb->interpreter_baton));
 
-  /* Is the window NULL?  If so, we're done.  The stream has already been 
+  /* Is the window NULL?  If so, we're done.  The stream has already been
      closed by the interpreter. */
   if (! window)
     SVN_ERR(svn_fs_x__dag_finalize_edits(tb->node, tb->result_checksum,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/util.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/util.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/util.c Wed Feb 
25 08:15:39 2015
@@ -318,7 +318,7 @@ svn_fs_x__path_txn_sha1(svn_fs_t *fs,
   svn_checksum_t checksum;
   checksum.digest = sha1;
   checksum.kind = svn_checksum_sha1;
-  
+
   return svn_dirent_join(svn_fs_x__path_txn_dir(fs, txn_id, pool),
                          svn_checksum_to_cstring(&checksum, pool),
                          pool);

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c Wed 
Feb 25 08:15:39 2015
@@ -180,7 +180,7 @@ verify_index_checksum(apr_file_t *file,
       const char *file_name;
 
       SVN_ERR(svn_io_file_name_get(&file_name, file, scratch_pool));
-      SVN_ERR(svn_checksum_mismatch_err(expected, actual, scratch_pool, 
+      SVN_ERR(svn_checksum_mismatch_err(expected, actual, scratch_pool,
                                         _("%s checksum mismatch in file %s"),
                                         name, file_name));
     }
@@ -768,7 +768,7 @@ verify_metadata_consistency(svn_fs_t *fs
       /* Check for external corruption to the indexes. */
       err = verify_index_checksums(fs, pack_start, cancel_func,
                                    cancel_baton, iterpool);
- 
+
       /* two-way index check */
       if (!err)
         err = compare_l2p_to_p2l_index(fs, pack_start, pack_end - pack_start,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_ra/ra_loader.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra/ra_loader.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra/ra_loader.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra/ra_loader.c Wed 
Feb 25 08:15:39 2015
@@ -242,6 +242,11 @@ svn_ra__close(svn_ra_session_t *session)
 
 svn_error_t *svn_ra_initialize(apr_pool_t *pool)
 {
+#if defined(SVN_USE_DSO) && APR_HAS_DSO
+  /* Ensure that DSO subsystem is initialized early as possible if
+     we're going to use it. */
+  SVN_ERR(svn_dso_initialize2());
+#endif
   return SVN_NO_ERROR;
 }
 
@@ -592,61 +597,6 @@ svn_error_t *svn_ra_rev_prop(svn_ra_sess
   return session->vtable->rev_prop(session, rev, name, value, pool);
 }
 
-struct ccw_baton
-{
-  svn_commit_callback2_t original_callback;
-  void *original_baton;
-
-  svn_ra_session_t *session;
-};
-
-/* Wrapper which populates the repos_root field of the commit_info struct */
-static svn_error_t *
-commit_callback_wrapper(const svn_commit_info_t *commit_info,
-                        void *baton,
-                        apr_pool_t *pool)
-{
-  struct ccw_baton *ccwb = baton;
-  svn_commit_info_t *ci = svn_commit_info_dup(commit_info, pool);
-
-  SVN_ERR(svn_ra_get_repos_root2(ccwb->session, &ci->repos_root, pool));
-
-  return ccwb->original_callback(ci, ccwb->original_baton, pool);
-}
-
-
-/* Some RA layers do not correctly fill in REPOS_ROOT in commit_info, or
-   they are third-party layers conforming to an older commit_info structure.
-   Interpose a utility function to ensure the field is valid.  */
-static void
-remap_commit_callback(svn_commit_callback2_t *callback,
-                      void **callback_baton,
-                      svn_ra_session_t *session,
-                      svn_commit_callback2_t original_callback,
-                      void *original_baton,
-                      apr_pool_t *result_pool)
-{
-  if (original_callback == NULL)
-    {
-      *callback = NULL;
-      *callback_baton = NULL;
-    }
-  else
-    {
-      /* Allocate this in RESULT_POOL, since the callback will be called
-         long after this function has returned. */
-      struct ccw_baton *ccwb = apr_palloc(result_pool, sizeof(*ccwb));
-
-      ccwb->session = session;
-      ccwb->original_callback = original_callback;
-      ccwb->original_baton = original_baton;
-
-      *callback = commit_callback_wrapper;
-      *callback_baton = ccwb;
-    }
-}
-
-
 svn_error_t *svn_ra_get_commit_editor3(svn_ra_session_t *session,
                                        const svn_delta_editor_t **editor,
                                        void **edit_baton,
@@ -657,10 +607,6 @@ svn_error_t *svn_ra_get_commit_editor3(s
                                        svn_boolean_t keep_locks,
                                        apr_pool_t *pool)
 {
-  remap_commit_callback(&commit_callback, &commit_baton,
-                        session, commit_callback, commit_baton,
-                        pool);
-
   return session->vtable->get_commit_editor(session, editor, edit_baton,
                                             revprop_table,
                                             commit_callback, commit_baton,
@@ -1068,7 +1014,7 @@ svn_error_t *svn_ra_get_file_revs2(svn_r
   if (include_merged_revisions)
     SVN_ERR(svn_ra__assert_mergeinfo_capable_server(session, NULL, pool));
 
-  if (start > end)
+  if (start > end || !SVN_IS_VALID_REVNUM(start))
     SVN_ERR(
      svn_ra__assert_capable_server(session,
                                    SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE,
@@ -1078,7 +1024,8 @@ svn_error_t *svn_ra_get_file_revs2(svn_r
   err = session->vtable->get_file_revs(session, path, start, end,
                                        include_merged_revisions,
                                        handler, handler_baton, pool);
-  if (err && (err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED))
+  if (err && (err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED)
+      && !include_merged_revisions)
     {
       svn_error_clear(err);
 
@@ -1086,7 +1033,7 @@ svn_error_t *svn_ra_get_file_revs2(svn_r
       err = svn_ra__file_revs_from_log(session, path, start, end,
                                        handler, handler_baton, pool);
     }
-  return err;
+  return svn_error_trace(err);
 }
 
 svn_error_t *svn_ra_lock(svn_ra_session_t *session,
@@ -1400,11 +1347,6 @@ svn_ra__get_commit_ev2(svn_editor_t **ed
       /* The specific RA layer does not have an implementation. Use our
          default shim over the normal commit editor.  */
 
-      /* Remap for RA layers exposing Ev1.  */
-      remap_commit_callback(&commit_callback, &commit_baton,
-                            session, commit_callback, commit_baton,
-                            result_pool);
-
       return svn_error_trace(svn_ra__use_commit_shim(
                                editor,
                                session,

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_ra_local/ra_plugin.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_local/ra_plugin.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_local/ra_plugin.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_local/ra_plugin.c 
Wed Feb 25 08:15:39 2015
@@ -791,6 +791,62 @@ svn_ra_local__rev_prop(svn_ra_session_t
                                     NULL, NULL, pool);
 }
 
+struct ccw_baton
+{
+  svn_commit_callback2_t original_callback;
+  void *original_baton;
+
+  svn_ra_session_t *session;
+};
+
+/* Wrapper which populates the repos_root field of the commit_info struct */
+static svn_error_t *
+commit_callback_wrapper(const svn_commit_info_t *commit_info,
+                        void *baton,
+                        apr_pool_t *scratch_pool)
+{
+  struct ccw_baton *ccwb = baton;
+  svn_commit_info_t *ci = svn_commit_info_dup(commit_info, scratch_pool);
+
+  SVN_ERR(svn_ra_local__get_repos_root(ccwb->session, &ci->repos_root,
+                                       scratch_pool));
+
+  return svn_error_trace(ccwb->original_callback(ci, ccwb->original_baton,
+                                                 scratch_pool));
+}
+
+
+/* The repository layer does not correctly fill in REPOS_ROOT in
+   commit_info, as it doesn't know the url that is used to access
+   it. This hooks the callback to fill in the missing pieces. */
+static void
+remap_commit_callback(svn_commit_callback2_t *callback,
+                      void **callback_baton,
+                      svn_ra_session_t *session,
+                      svn_commit_callback2_t original_callback,
+                      void *original_baton,
+                      apr_pool_t *result_pool)
+{
+  if (original_callback == NULL)
+    {
+      *callback = NULL;
+      *callback_baton = NULL;
+    }
+  else
+    {
+      /* Allocate this in RESULT_POOL, since the callback will be called
+         long after this function has returned. */
+      struct ccw_baton *ccwb = apr_palloc(result_pool, sizeof(*ccwb));
+
+      ccwb->session = session;
+      ccwb->original_callback = original_callback;
+      ccwb->original_baton = original_baton;
+
+      *callback = commit_callback_wrapper;
+      *callback_baton = ccwb;
+    }
+}
+
 static svn_error_t *
 svn_ra_local__get_commit_editor(svn_ra_session_t *session,
                                 const svn_delta_editor_t **editor,
@@ -805,6 +861,10 @@ svn_ra_local__get_commit_editor(svn_ra_s
   svn_ra_local__session_baton_t *sess = session->priv;
   struct deltify_etc_baton *deb = apr_palloc(pool, sizeof(*deb));
 
+  /* Set repos_root_url in commit info */
+  remap_commit_callback(&callback, &callback_baton, session,
+                        callback, callback_baton, pool);
+
   /* Prepare the baton for deltify_etc()  */
   deb->fs = sess->fs;
   deb->repos = sess->repos;
@@ -1399,7 +1459,7 @@ lock_cb(void *lock_baton,
       b->cb_err = b->lock_func(b->lock_baton, path, b->is_lock, lock, fs_err,
                                pool);
     }
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -1694,6 +1754,9 @@ svn_ra_local__get_commit_ev2(svn_editor_
   svn_ra_local__session_baton_t *sess = session->priv;
   struct deltify_etc_baton *deb = apr_palloc(result_pool, sizeof(*deb));
 
+  remap_commit_callback(&commit_cb, &commit_baton, session,
+                        commit_cb, commit_baton, result_pool);
+
   /* NOTE: the RA callbacks are ignored. We pass everything directly to
      the REPOS editor.  */
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c Wed 
Feb 25 08:15:39 2015
@@ -1975,6 +1975,7 @@ close_edit(void *edit_baton,
   const char *merge_target =
     ctx->activity_url ? ctx->activity_url : ctx->txn_url;
   const svn_commit_info_t *commit_info;
+  svn_error_t *err = NULL;
 
   /* MERGE our activity */
   SVN_ERR(svn_ra_serf__run_merge(&commit_info,
@@ -1984,9 +1985,11 @@ close_edit(void *edit_baton,
                                  ctx->keep_locks,
                                  pool, pool));
 
+  ctx->txn_url = NULL; /* If HTTPv2, the txn is now done */
+
   /* Inform the WC that we did a commit.  */
   if (ctx->callback)
-    SVN_ERR(ctx->callback(commit_info, ctx->callback_baton, pool));
+    err = ctx->callback(commit_info, ctx->callback_baton, pool);
 
   /* If we're using activities, DELETE our completed activity.  */
   if (ctx->activity_url)
@@ -2003,12 +2006,16 @@ close_edit(void *edit_baton,
 
       ctx->activity_url = NULL; /* Don't try again in abort_edit() on fail */
 
-      SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
+      SVN_ERR(svn_error_compose_create(
+                  err,
+                  svn_ra_serf__context_run_one(handler, pool)));
 
       if (handler->sline.code != 204)
         return svn_error_trace(svn_ra_serf__unexpected_status(handler));
     }
 
+  SVN_ERR(err);
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/merge.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/merge.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/merge.c Wed 
Feb 25 08:15:39 2015
@@ -447,5 +447,8 @@ svn_ra_serf__run_merge(const svn_commit_
                                 "a new revision"));
     }
 
+  merge_ctx->commit_info->repos_root = apr_pstrdup(result_pool,
+                                                   session->repos_root_str);
+
   return SVN_NO_ERROR;
 }

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/ra_serf.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/ra_serf.h?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/ra_serf.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/ra_serf.h 
Wed Feb 25 08:15:39 2015
@@ -1078,7 +1078,7 @@ svn_ra_serf__v1_get_activity_collection(
 
 /* Set @a VCC_URL to the default VCC for our repository based on @a
  * ORIG_PATH for the session @a SESSION, ensuring that the VCC URL and
- * repository root URLs are cached in @a SESSION. 
+ * repository root URLs are cached in @a SESSION.
  *
  * All temporary allocations will be made in @a SCRATCH_POOL. */
 svn_error_t *

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/serf.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/serf.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/serf.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/serf.c Wed 
Feb 25 08:15:39 2015
@@ -238,7 +238,7 @@ load_config(svn_ra_serf__session_t *sess
                                SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
                                
SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS));
 
-  /* Should we use chunked transfer encoding. */ 
+  /* Should we use chunked transfer encoding. */
   SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
                                   SVN_CONFIG_SECTION_GLOBAL,
                                   SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,
@@ -305,7 +305,7 @@ load_config(svn_ra_serf__session_t *sess
                                    SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
                                    session->max_connections));
 
-      /* Should we use chunked transfer encoding. */ 
+      /* Should we use chunked transfer encoding. */
       SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
                                       server_group,
                                       SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/update.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/update.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/update.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/update.c Wed 
Feb 25 08:15:39 2015
@@ -785,7 +785,7 @@ get_best_connection(report_context_t *ct
         }
       conn = ctx->sess->conns[best_conn];
 #else
-    /* We don't know how many requests are pending per connection, so just 
+    /* We don't know how many requests are pending per connection, so just
        cycle them. */
       conn = ctx->sess->conns[ctx->sess->cur_conn];
       ctx->sess->cur_conn++;
@@ -1053,7 +1053,7 @@ close_file(file_baton_t *file,
    ### Given that we only fetch props on additions, is this really necessary?
        Or is it covering up old local copy bugs where we copied locks to other
        paths? */
-  if (!ctx->add_props_included 
+  if (!ctx->add_props_included
       && file->lock_token && !file->found_lock_prop
       && SVN_IS_VALID_REVNUM(file->base_rev) /* file_is_added */)
     {
@@ -1854,9 +1854,9 @@ update_closed(svn_ra_serf__xml_estate_t
         {
           const char *revstr = svn_hash_gets(attrs, "rev");
           apr_int64_t rev;
-        
+
           SVN_ERR(svn_cstring_atoi64(&rev, revstr));
-        
+
           SVN_ERR(ctx->editor->set_target_revision(ctx->editor_baton,
                                                    (svn_revnum_t)rev,
                                                    scratch_pool));

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/util.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/util.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/util.c Wed 
Feb 25 08:15:39 2015
@@ -1385,7 +1385,7 @@ handle_response(serf_request_t *request,
       return svn_error_trace(
                 svn_ra_serf__handle_server_error(handler->server_error,
                                                  handler,
-                                                 request, response, 
+                                                 request, response,
                                                  serf_status,
                                                  scratch_pool));
     }

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/client.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/client.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/client.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/client.c Wed 
Feb 25 08:15:39 2015
@@ -1073,6 +1073,9 @@ static svn_error_t *ra_svn_end_commit(vo
                                  &(commit_info->author),
                                  &(commit_info->post_commit_err)));
 
+  commit_info->repos_root = apr_pstrdup(ccb->pool,
+                                        ccb->sess_baton->conn->repos_root);
+
   if (ccb->callback)
     SVN_ERR(ccb->callback(commit_info, ccb->callback_baton, ccb->pool));
 
@@ -1105,11 +1108,11 @@ static svn_error_t *ra_svn_commit(svn_ra
                                  "a log message with pre-1.5 servers; "
                                  "consider passing an empty one, or upgrading "
                                  "the server"));
-    } 
+    }
   else if (log_msg == NULL)
     /* 1.5+ server.  Set LOG_MSG to something, since the 'logmsg' argument
        to the 'commit' protocol command is non-optional; on the server side,
-       only REVPROP_TABLE will be used, and LOG_MSG will be ignored.  The 
+       only REVPROP_TABLE will be used, and LOG_MSG will be ignored.  The
        "svn:log" member of REVPROP_TABLE table is NULL, therefore the commit
        will have a NULL log message (not just "", really NULL).
 
@@ -1359,7 +1362,7 @@ static svn_error_t *ra_svn_get_dir(svn_r
     SVN_ERR(svn_ra_svn__write_word(conn, pool, SVN_RA_SVN_DIRENT_TIME));
   if (dirent_fields & SVN_DIRENT_LAST_AUTHOR)
     SVN_ERR(svn_ra_svn__write_word(conn, pool, SVN_RA_SVN_DIRENT_LAST_AUTHOR));
-  
+
   /* Always send the, nominally optional, want-iprops as "false" to
      workaround a bug in svnserve 1.8.0-1.8.8 that causes the server
      to see "true" if it is omitted. */

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/marshal.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/marshal.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/marshal.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_svn/marshal.c Wed 
Feb 25 08:15:39 2015
@@ -592,7 +592,7 @@ svn_ra_svn__write_proplist(svn_ra_svn_co
   if (props)
     for (hi = apr_hash_first(pool, props); hi; hi = apr_hash_next(hi))
       {
-        apr_hash_this(hi, (const void **)&propname, 
+        apr_hash_this(hi, (const void **)&propname,
                           (apr_ssize_t *)&len,
                           (void **)&propval);
 
@@ -972,7 +972,7 @@ static svn_error_t *read_string(svn_ra_s
 
       /* Read string data directly into the string structure.
        * Do it iteratively.  */
-      do      
+      do
         {
           /* Determine length of chunk to read and re-alloc the buffer. */
           readbuf_len
@@ -990,7 +990,7 @@ static svn_error_t *read_string(svn_ra_s
           len -= readbuf_len;
         }
       while (len);
-      
+
       /* zero-terminate the string */
       stringbuf->data[stringbuf->len] = '\0';
 
@@ -1093,7 +1093,7 @@ static svn_error_t *read_item(svn_ra_svn
       item->u.list->elts = (char *)data;
       item->u.list->pool = pool;
       item->u.list->elt_size = sizeof(*data);
-      item->u.list->nelts = 0; 
+      item->u.list->nelts = 0;
       item->u.list->nalloc = 4;
 
       listitem = data;
@@ -1118,7 +1118,7 @@ static svn_error_t *read_item(svn_ra_svn
           /* read next protocol item */
           SVN_ERR(read_item(conn, pool, listitem, c, level));
 
-          listitem++; 
+          listitem++;
           item->u.list->nelts++;
         }
       SVN_ERR(readbuf_getchar(conn, pool, &c));
@@ -2483,7 +2483,7 @@ svn_ra_svn__write_data_log_entry(svn_ra_
   SVN_ERR(write_tuple_boolean(conn, pool, has_children));
   SVN_ERR(write_tuple_boolean(conn, pool, invalid_revnum));
   SVN_ERR(svn_ra_svn__write_number(conn, pool, revprop_count));
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -2504,7 +2504,7 @@ svn_ra_svn__read_string(const apr_array_
   svn_ra_svn_item_t *elt = &APR_ARRAY_IDX(items, idx, svn_ra_svn_item_t);
   CHECK_PROTOCOL_COND(elt->kind == SVN_RA_SVN_STRING);
   *result = elt->u.string;
-    
+
   return SVN_NO_ERROR;
 }
 
@@ -2518,7 +2518,7 @@ svn_ra_svn__read_cstring(const apr_array
   svn_ra_svn_item_t *elt = &APR_ARRAY_IDX(items, idx, svn_ra_svn_item_t);
   CHECK_PROTOCOL_COND(elt->kind == SVN_RA_SVN_STRING);
   *result = elt->u.string->data;
-    
+
   return SVN_NO_ERROR;
 }
 
@@ -2532,7 +2532,7 @@ svn_ra_svn__read_word(const apr_array_he
   svn_ra_svn_item_t *elt = &APR_ARRAY_IDX(items, idx, svn_ra_svn_item_t);
   CHECK_PROTOCOL_COND(elt->kind == SVN_RA_SVN_WORD);
   *result = elt->u.word;
-   
+
   return SVN_NO_ERROR;
 }
 
@@ -2546,7 +2546,7 @@ svn_ra_svn__read_revision(const apr_arra
   svn_ra_svn_item_t *elt = &APR_ARRAY_IDX(items, idx, svn_ra_svn_item_t);
   CHECK_PROTOCOL_COND(elt->kind == SVN_RA_SVN_NUMBER);
   *result = (svn_revnum_t)elt->u.number;
-    
+
   return SVN_NO_ERROR;
 }
 
@@ -2565,7 +2565,7 @@ svn_ra_svn__read_boolean(const apr_array
     *result = FALSE;
   else
     CHECK_PROTOCOL_COND(FALSE);
-    
+
   return SVN_NO_ERROR;
 }
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_repos/authz_pool.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/authz_pool.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/authz_pool.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/authz_pool.c 
Wed Feb 25 08:15:39 2015
@@ -154,7 +154,7 @@ svn_repos__authz_pool_get(svn_authz_t **
   authz_object_t *authz_ref
     = apr_pcalloc(authz_ref_pool, sizeof(*authz_ref));
   svn_boolean_t have_all_keys;
-  
+
   /* read the configurations */
   SVN_ERR(svn_repos__config_pool_get(&authz_ref->authz_cfg,
                                      &authz_ref->authz_key,
@@ -162,7 +162,7 @@ svn_repos__authz_pool_get(svn_authz_t **
                                      path, must_exist, TRUE,
                                      preferred_repos, authz_ref_pool));
   have_all_keys = authz_ref->authz_key != NULL;
-  
+
   if (groups_path)
     {
       SVN_ERR(svn_repos__config_pool_get(&authz_ref->groups_cfg,
@@ -173,12 +173,12 @@ svn_repos__authz_pool_get(svn_authz_t **
       have_all_keys &= authz_ref->groups_key != NULL;
     }
 
-  /* fall back to standard implementation in case we don't have all the 
+  /* fall back to standard implementation in case we don't have all the
    * facts (i.e. keys). */
   if (!have_all_keys)
     return svn_error_trace(svn_repos_authz_read2(authz_p, path, groups_path,
                                                  must_exist, pool));
-    
+
   /* all keys are known and lookup is unambigious. */
   authz_ref->key = construct_key(authz_ref->authz_key,
                                  authz_ref->groups_key,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_repos/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/commit.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/commit.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/commit.c Wed 
Feb 25 08:15:39 2015
@@ -201,6 +201,7 @@ invoke_commit_cb(svn_commit_callback2_t
   commit_info->date = date ? date->data : NULL;
   commit_info->author = author ? author->data : NULL;
   commit_info->post_commit_err = post_commit_errstr;
+  /* commit_info->repos_root is not set by the repos layer, only by RA layers 
*/
 
   return svn_error_trace(commit_cb(commit_info, commit_baton, scratch_pool));
 }
@@ -779,6 +780,13 @@ close_edit(void *edit_baton,
           post_commit_err = svn_repos__post_commit_error_str(err, pool);
           svn_error_clear(err);
         }
+
+      /* Make sure a future abort doesn't perform
+         any work. This may occur if the commit
+         callback returns an error! */
+
+      eb->txn = NULL;
+      eb->txn_root = NULL;
     }
   else
     {

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_repos/config_pool.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/config_pool.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/config_pool.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/config_pool.c 
Wed Feb 25 08:15:39 2015
@@ -182,7 +182,7 @@ setter(void **target,
  * CONFIG_POOL, yet, parse CONTENTS and cache the result.  CASE_SENSITIVE
  * controls option and section name matching.
  *
- * RESULT_POOL determines the lifetime of the returned reference and 
+ * RESULT_POOL determines the lifetime of the returned reference and
  * SCRATCH_POOL is being used for temporary allocations.
  */
 static svn_error_t *
@@ -283,12 +283,12 @@ add_checksum(svn_repos__config_pool_t *c
   return SVN_NO_ERROR;
 }
 
-/* Set *CFG to the configuration stored in URL@HEAD and cache it in 
+/* Set *CFG to the configuration stored in URL@HEAD and cache it in
  * CONFIG_POOL.  CASE_SENSITIVE controls
  * option and section name matching.  If PREFERRED_REPOS is given,
  * use that if it also matches URL.
- * 
- * RESULT_POOL determines the lifetime of the returned reference and 
+ *
+ * RESULT_POOL determines the lifetime of the returned reference and
  * SCRATCH_POOL is being used for temporary allocations.
  */
 static svn_error_t *
@@ -416,7 +416,7 @@ key_by_url(svn_membuf_t **key,
 
   /* found *some* reference to a configuration.
    * Verify that it is still current.  Will fail for BDB repos. */
-  err = svn_stringbuf_from_file2(&contents, 
+  err = svn_stringbuf_from_file2(&contents,
                                  svn_dirent_join(config->repo_root,
                                                  "db/current", pool),
                                  pool);

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_repos/dump.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/dump.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/dump.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/dump.c Wed Feb 
25 08:15:39 2015
@@ -445,17 +445,24 @@ write_revision_headers(svn_stream_t *str
   return SVN_NO_ERROR;
 }
 
-apr_array_header_t *
+/* A header entry: the element type of the apr_array_header_t which is
+ * the real type of svn_repos__dumpfile_headers_t.
+ */
+typedef struct svn_repos__dumpfile_header_entry_t {
+  const char *key, *val;
+} svn_repos__dumpfile_header_entry_t;
+
+svn_repos__dumpfile_headers_t *
 svn_repos__dumpfile_headers_create(apr_pool_t *pool)
 {
-  apr_array_header_t *headers
+  svn_repos__dumpfile_headers_t *headers
     = apr_array_make(pool, 5, sizeof(svn_repos__dumpfile_header_entry_t));
 
   return headers;
 }
 
 void
-svn_repos__dumpfile_header_push(apr_array_header_t *headers,
+svn_repos__dumpfile_header_push(svn_repos__dumpfile_headers_t *headers,
                                 const char *key,
                                 const char *val)
 {
@@ -467,7 +474,7 @@ svn_repos__dumpfile_header_push(apr_arra
 }
 
 void
-svn_repos__dumpfile_header_pushf(apr_array_header_t *headers,
+svn_repos__dumpfile_header_pushf(svn_repos__dumpfile_headers_t *headers,
                                  const char *key,
                                  const char *val_fmt,
                                  ...)
@@ -484,8 +491,7 @@ svn_repos__dumpfile_header_pushf(apr_arr
 
 svn_error_t *
 svn_repos__dump_headers(svn_stream_t *stream,
-                        apr_array_header_t *headers,
-                        svn_boolean_t terminate,
+                        svn_repos__dumpfile_headers_t *headers,
                         apr_pool_t *scratch_pool)
 {
   int i;
@@ -500,8 +506,7 @@ svn_repos__dump_headers(svn_stream_t *st
     }
 
   /* End of headers */
-  if (terminate)
-    SVN_ERR(svn_stream_puts(stream, "\n"));
+  SVN_ERR(svn_stream_puts(stream, "\n"));
 
   return SVN_NO_ERROR;
 }
@@ -565,7 +570,7 @@ svn_repos__dump_revision_record(svn_stre
 
 svn_error_t *
 svn_repos__dump_node_record(svn_stream_t *dump_stream,
-                            apr_array_header_t *headers,
+                            svn_repos__dumpfile_headers_t *headers,
                             svn_stringbuf_t *props_str,
                             svn_boolean_t has_text,
                             svn_filesize_t text_content_length,
@@ -597,7 +602,7 @@ svn_repos__dump_node_record(svn_stream_t
     }
 
   /* write the headers */
-  SVN_ERR(svn_repos__dump_headers(dump_stream, headers, TRUE, scratch_pool));
+  SVN_ERR(svn_repos__dump_headers(dump_stream, headers, scratch_pool));
 
   /* write the props */
   if (props_str)
@@ -1048,7 +1053,8 @@ dump_node_delete(svn_stream_t *stream,
                  const char *node_relpath,
                  apr_pool_t *pool)
 {
-  apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+  svn_repos__dumpfile_headers_t *headers
+    = svn_repos__dumpfile_headers_create(pool);
 
   /* Node-path: ... */
   svn_repos__dumpfile_header_push(
@@ -1058,7 +1064,7 @@ dump_node_delete(svn_stream_t *stream,
   svn_repos__dumpfile_header_push(
     headers, SVN_REPOS_DUMPFILE_NODE_ACTION, "delete");
 
-  SVN_ERR(svn_repos__dump_headers(stream, headers, TRUE, pool));
+  SVN_ERR(svn_repos__dump_headers(stream, headers, pool));
   return SVN_NO_ERROR;
 }
 
@@ -1091,7 +1097,8 @@ dump_node(struct edit_baton *eb,
   svn_revnum_t compare_rev = eb->current_rev - 1;
   svn_fs_root_t *compare_root = NULL;
   apr_file_t *delta_file = NULL;
-  apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+  svn_repos__dumpfile_headers_t *headers
+    = svn_repos__dumpfile_headers_create(pool);
   svn_filesize_t textlen;
 
   /* Maybe validate the path. */
@@ -1324,7 +1331,7 @@ dump_node(struct edit_baton *eb,
          then our dumpstream format demands that at a *minimum*, we
          see a lone "PROPS-END" as a divider between text and props
          content within the content-block. */
-      SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
+      SVN_ERR(svn_repos__dump_headers(eb->stream, headers, pool));
       len = 1;
       return svn_stream_write(eb->stream, "\n", &len); /* ### needed? */
     }
@@ -2316,11 +2323,11 @@ verify_one_revision(svn_fs_t *fs,
   SVN_ERR(svn_repos_replay2(to_root, "", SVN_INVALID_REVNUM, FALSE,
                             cancel_editor, cancel_edit_baton,
                             NULL, NULL, scratch_pool));
- 
+
   /* While our editor close_edit implementation is a no-op, we still
      do this for completeness. */
   SVN_ERR(cancel_editor->close_edit(cancel_edit_baton, scratch_pool));
- 
+
   SVN_ERR(svn_fs_revision_proplist(&props, fs, rev, scratch_pool));
 
   return SVN_NO_ERROR;

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_repos/fs-wrap.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/fs-wrap.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/fs-wrap.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/fs-wrap.c Wed 
Feb 25 08:15:39 2015
@@ -104,7 +104,7 @@ svn_repos_fs_commit_txn(const char **con
             svn_error_clear(svn_fs_change_txn_prop(txn, key, val, iterpool));
         }
       svn_pool_destroy(iterpool);
-      
+
       return err;
     }
 
@@ -592,7 +592,7 @@ svn_repos_fs_lock_many(svn_repos_t *repo
           if (!cb_err && lock_callback)
             cb_err = lock_callback(lock_baton, path, NULL, err, iterpool);
           svn_error_clear(err);
-          
+
           continue;
         }
 
@@ -678,7 +678,7 @@ svn_repos_fs_lock(svn_lock_t **lock,
 {
   apr_hash_t *targets = apr_hash_make(pool);
   svn_fs_lock_target_t *target = svn_fs_lock_target_create(token, current_rev,
-                                                           pool); 
+                                                           pool);
   svn_error_t *err;
   struct lock_baton_t baton = {0};
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_repos/load-fs-vtable.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/load-fs-vtable.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/libsvn_repos/load-fs-vtable.c 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/libsvn_repos/load-fs-vtable.c 
Wed Feb 25 08:15:39 2015
@@ -726,6 +726,7 @@ set_revision_property(void *baton,
   struct revision_baton *rb = baton;
   struct parse_baton *pb = rb->pb;
   svn_boolean_t is_date = strcmp(name, SVN_PROP_REVISION_DATE) == 0;
+  svn_prop_t *prop;
 
   /* If we're skipping this revision, we're done here. */
   if (rb->skipped)
@@ -735,32 +736,16 @@ set_revision_property(void *baton,
   if (is_date && pb->ignore_dates)
     return SVN_NO_ERROR;
 
-  if (rb->rev > 0)
-    {
-      svn_prop_t *prop = &APR_ARRAY_PUSH(rb->revprops, svn_prop_t);
-
-      /* Collect property changes to apply them in one FS call in
-         close_revision. */
-      prop->name = apr_pstrdup(rb->pool, name);
-      prop->value = svn_string_dup(value, rb->pool);
-
-      /* Remember any datestamp that passes through!  (See comment in
-         close_revision() below.) */
-      if (is_date)
-        rb->datestamp = svn_string_dup(value, rb->pool);
-    }
-  else if (rb->rev == 0)
-    {
-      /* Special case: set revision 0 properties when loading into an
-         'empty' filesystem. */
-      svn_revnum_t youngest_rev;
-
-      SVN_ERR(svn_fs_youngest_rev(&youngest_rev, pb->fs, rb->pool));
-
-      if (youngest_rev == 0)
-        SVN_ERR(change_rev_prop(pb->repos, 0, name, value,
-                                pb->validate_props, rb->pool));
-    }
+  /* Collect property changes to apply them in one FS call in
+     close_revision. */
+  prop = &APR_ARRAY_PUSH(rb->revprops, svn_prop_t);
+  prop->name = apr_pstrdup(rb->pool, name);
+  prop->value = svn_string_dup(value, rb->pool);
+
+  /* Remember any datestamp that passes through!  (See comment in
+     close_revision() below.) */
+  if (is_date)
+    rb->datestamp = svn_string_dup(value, rb->pool);
 
   return SVN_NO_ERROR;
 }
@@ -1018,11 +1003,41 @@ close_revision(void *baton)
   const char *txn_name = NULL;
   apr_hash_t *hooks_env;
 
-  /* If we're skipping this revision or it has an invalid revision
-     number, we're done here. */
-  if (rb->skipped || (rb->rev <= 0))
+  /* If we're skipping this revision we're done here. */
+  if (rb->skipped)
     return SVN_NO_ERROR;
 
+  if (rb->rev == 0)
+    {
+      /* Special case: set revision 0 properties when loading into an
+         'empty' filesystem. */
+      svn_revnum_t youngest_rev;
+
+      SVN_ERR(svn_fs_youngest_rev(&youngest_rev, pb->fs, rb->pool));
+
+      if (youngest_rev == 0)
+        {
+          apr_hash_t *orig_props;
+          apr_hash_t *new_props;
+          apr_array_header_t *diff;
+          int i;
+
+          SVN_ERR(svn_fs_revision_proplist(&orig_props, pb->fs, 0, rb->pool));
+          new_props = svn_prop_array_to_hash(rb->revprops, rb->pool);
+          SVN_ERR(svn_prop_diffs(&diff, new_props, orig_props, rb->pool));
+
+          for (i = 0; i < diff->nelts; i++)
+          {
+              const svn_prop_t *prop = &APR_ARRAY_IDX(diff, i, svn_prop_t);
+
+              SVN_ERR(change_rev_prop(pb->repos, 0, prop->name, prop->value,
+                                      pb->validate_props, rb->pool));
+          }
+        }
+
+      return SVN_NO_ERROR;
+    }
+
   /* If the dumpstream doesn't have an 'svn:date' property and we
      aren't ignoring the dates in the dumpstream altogether, remove
      any 'svn:date' revision property that was set by FS layer when

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c Wed Feb 
25 08:15:39 2015
@@ -2340,7 +2340,7 @@ svn_repos_get_logs4(svn_repos_t *repos,
 
       revprops = new_revprops;
     }
-  
+
   /* Setup log range. */
   SVN_ERR(svn_fs_youngest_rev(&head, fs, pool));
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_repos/rev_hunt.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/rev_hunt.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/rev_hunt.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/rev_hunt.c Wed 
Feb 25 08:15:39 2015
@@ -1559,6 +1559,18 @@ svn_repos_get_file_revs2(svn_repos_t *re
   struct send_baton sb;
   int mainline_pos, merged_pos;
 
+  if (!SVN_IS_VALID_REVNUM(start)
+      || !SVN_IS_VALID_REVNUM(end))
+    {
+      svn_revnum_t youngest_rev;
+      SVN_ERR(svn_fs_youngest_rev(&youngest_rev, repos->fs, scratch_pool));
+
+      if (!SVN_IS_VALID_REVNUM(start))
+        start = youngest_rev;
+      if (!SVN_IS_VALID_REVNUM(end))
+        end = youngest_rev;
+    }
+
   if (end < start)
     {
       if (include_merged_revisions)

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_subr/bit_array.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_subr/bit_array.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_subr/bit_array.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_subr/bit_array.c Wed 
Feb 25 08:15:39 2015
@@ -33,7 +33,7 @@
  */
 #define BLOCK_SIZE          0x10000
 
-/* Number of bits in each block. 
+/* Number of bits in each block.
  */
 #define BLOCK_SIZE_BITS     (8 * BLOCK_SIZE)
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache-membuffer.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache-membuffer.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- 
subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache-membuffer.c 
(original)
+++ 
subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache-membuffer.c 
Wed Feb 25 08:15:39 2015
@@ -333,7 +333,7 @@ static void get_prefix_tail(const char *
   apr_size_t len = strlen(prefix);
   apr_size_t to_copy = MIN(len, PREFIX_TAIL_LEN - 1);
   const char *last_colon = strrchr(prefix, ':');
-  apr_size_t last_element_pos = last_colon ? 0 : last_colon - prefix + 1; 
+  apr_size_t last_element_pos = last_colon ? 0 : last_colon - prefix + 1;
 
   to_copy = MIN(to_copy, len - last_element_pos);
   memset(prefix_tail, 0, PREFIX_TAIL_LEN);
@@ -411,7 +411,7 @@ typedef struct group_header_t
   /* number of elements in the chain from start to here.
    * >= 1 for used groups, 0 for unused spare groups */
   apr_uint32_t chain_length;
- 
+
 } group_header_t;
 
 /* The size of the group struct should be a power of two make sure it does
@@ -439,7 +439,7 @@ typedef struct entry_group_t
 {
   /* group globals */
   group_header_t header;
-  
+
   /* padding and also room for future extensions */
   char padding[GROUP_BLOCK_SIZE - sizeof(group_header_t)
                - sizeof(entry_t) * GROUP_SIZE];
@@ -971,11 +971,11 @@ unchain_entry(svn_membuffer_t *cache,
 {
   assert(idx == get_index(cache, entry));
 
-  /* update 
+  /* update
    */
   if (level->next == idx)
     level->next = entry->next;
-  
+
   /* unlink it from the chain of used entries
    */
   if (entry->previous == NO_INDEX)
@@ -1375,12 +1375,12 @@ promote_entry(svn_membuffer_t *cache, en
 }
 
 /* This function implements the cache insertion / eviction strategy for L2.
- * 
+ *
  * If necessary, enlarge the insertion window of CACHE->L2 until it is at
  * least TO_FIT_IN->SIZE bytes long. TO_FIT_IN->SIZE must not exceed the
  * data buffer size allocated to CACHE->L2.  IDX is the item index of
  * TO_FIT_IN and is given for performance reasons.
- * 
+ *
  * Return TRUE if enough room could be found or made.  A FALSE result
  * indicates that the respective item shall not be added.
  */
@@ -1507,7 +1507,7 @@ ensure_data_insertable_l2(svn_membuffer_
                * Count the "hit importance" such that we are not sacrificing
                * too much of the high-hit contents.  However, don't count
                * low-priority hits because higher prio entries will often
-               * provide the same data but in a further stage of processing. 
+               * provide the same data but in a further stage of processing.
                */
               if (entry->priority > SVN_CACHE__MEMBUFFER_LOW_PRIORITY)
                 drop_hits += entry->hit_count * (apr_uint64_t)entry->priority;
@@ -1819,6 +1819,61 @@ svn_cache__membuffer_cache_create(svn_me
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_cache__membuffer_clear(svn_membuffer_t *cache)
+{
+  apr_size_t seg;
+  apr_size_t segment_count = cache->segment_count;
+
+  /* Length of the group_initialized array in bytes.
+     See also svn_cache__membuffer_cache_create(). */
+  apr_size_t group_init_size
+    = 1 + (cache->group_count + cache->spare_group_count)
+            / (8 * GROUP_INIT_GRANULARITY);
+
+  /* Clear segment by segment.  This implies that other thread may read
+     and write to other segments after we cleared them and before the
+     last segment is done.
+
+     However, that is no different from a write request coming through
+     right after we cleared all segments because dependencies between
+     cache entries (recursive lookup / access locks) are not allowed.
+   */
+  for (seg = 0; seg < segment_count; ++seg)
+    {
+      /* Unconditionally acquire the write lock. */
+      SVN_ERR(force_write_lock_cache(&cache[seg]));
+
+      /* Mark all groups as "not initialized", which implies "empty". */
+      cache[seg].first_spare_group = NO_INDEX;
+      cache[seg].max_spare_used = 0;
+
+      memset(cache[seg].group_initialized, 0, group_init_size);
+
+      /* Unlink L1 contents. */
+      cache[seg].l1.first = NO_INDEX;
+      cache[seg].l1.last = NO_INDEX;
+      cache[seg].l1.next = NO_INDEX;
+      cache[seg].l1.current_data = cache[seg].l1.start_offset;
+
+      /* Unlink L2 contents. */
+      cache[seg].l2.first = NO_INDEX;
+      cache[seg].l2.last = NO_INDEX;
+      cache[seg].l2.next = NO_INDEX;
+      cache[seg].l2.current_data = cache[seg].l2.start_offset;
+
+      /* Reset content counters. */
+      cache[seg].data_used = 0;
+      cache[seg].used_entries = 0;
+
+      /* Segment may be used again. */
+      SVN_ERR(unlock_cache(&cache[seg], SVN_NO_ERROR));
+    }
+
+  /* done here */
+  return SVN_NO_ERROR;
+}
+
 /* Look for the cache entry in group GROUP_INDEX of CACHE, identified
  * by the hash value TO_FIND and set *FOUND accordingly.
  *
@@ -2495,7 +2550,7 @@ typedef struct svn_membuffer_cache_t
 
   /* priority class for all items written through this interface */
   apr_uint32_t priority;
-  
+
   /* Temporary buffer containing the hash key for the current access
    */
   entry_key_t combined_key;
@@ -2504,7 +2559,7 @@ typedef struct svn_membuffer_cache_t
    * Will be NULL for caches with short fix-sized keys.
    */
   last_access_key_t *last_access;
-  
+
   /* if enabled, this will serialize the access to this instance.
    */
   svn_mutex__t *mutex;

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_subr/cache.c Wed Feb 
25 08:15:39 2015
@@ -102,6 +102,11 @@ svn_cache__has_key(svn_boolean_t *found,
                    apr_pool_t *scratch_pool)
 {
   *found = FALSE;
+#ifdef SVN_DEBUG
+  if (cache->pretend_empty)
+    return SVN_NO_ERROR;
+#endif
+
   return handle_error(cache,
                       (cache->vtable->has_key)(found,
                                                cache->cache_internal,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_subr/config.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_subr/config.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_subr/config.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_subr/config.c Wed 
Feb 25 08:15:39 2015
@@ -741,7 +741,7 @@ svn_config_set(svn_config_t *cfg,
   cfg_option_t *opt;
 
   /* Ignore write attempts to r/o configurations.
-   * 
+   *
    * Since we should never try to modify r/o data, trigger an assertion
    * in debug mode.
    */

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_subr/dirent_uri.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_subr/dirent_uri.c?rev=1662177&r1=1662176&r2=1662177&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_subr/dirent_uri.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_subr/dirent_uri.c 
Wed Feb 25 08:15:39 2015
@@ -1738,8 +1738,8 @@ relpath_is_canonical(const char *relpath
   if (ptr[len-1] == '/' || (ptr[len-1] == '.' && ptr[len-2] == '/'))
     return FALSE;
 
-  /* '.' are rare. So, search for them globally. There will often be no 
-   * more than one hit.  Also note that we already checked for invalid 
+  /* '.' are rare. So, search for them globally. There will often be no
+   * more than one hit.  Also note that we already checked for invalid
    * starts and endings, i.e. we only need to check for "/./"
    */
   for (dot_pos = memchr(ptr, '.', len);


Reply via email to