Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/merge.c Wed Feb 25 08:15:39 2015 @@ -1849,9 +1849,14 @@ merge_file_opened(void **new_file_baton, } else if (fb->tree_conflict_local_node_kind != svn_node_file) { + svn_boolean_t added; fb->shadowed = TRUE; - fb->tree_conflict_reason = svn_wc_conflict_reason_obstructed; + SVN_ERR(svn_wc__node_is_added(&added, merge_b->ctx->wc_ctx, + local_abspath, scratch_pool)); + + fb->tree_conflict_reason = added ? svn_wc_conflict_reason_added + : svn_wc_conflict_reason_obstructed; /* ### Similar to directory */ *skip = TRUE; @@ -1952,8 +1957,14 @@ merge_file_opened(void **new_file_baton, && !is_deleted) { /* Set a tree conflict */ + svn_boolean_t added; + fb->shadowed = TRUE; - fb->tree_conflict_reason = svn_wc_conflict_reason_obstructed; + SVN_ERR(svn_wc__node_is_added(&added, merge_b->ctx->wc_ctx, + local_abspath, scratch_pool)); + + fb->tree_conflict_reason = added ? svn_wc_conflict_reason_added + : svn_wc_conflict_reason_obstructed; } } @@ -2621,9 +2632,14 @@ merge_dir_opened(void **new_dir_baton, } else if (db->tree_conflict_local_node_kind != svn_node_dir) { + svn_boolean_t added; + db->shadowed = TRUE; + SVN_ERR(svn_wc__node_is_added(&added, merge_b->ctx->wc_ctx, + local_abspath, scratch_pool)); - db->tree_conflict_reason = svn_wc_conflict_reason_obstructed; + db->tree_conflict_reason = added ? svn_wc_conflict_reason_added + : svn_wc_conflict_reason_obstructed; /* ### To avoid breaking tests */ *skip = TRUE; @@ -2766,8 +2782,14 @@ merge_dir_opened(void **new_dir_baton, && !is_deleted) { /* Set a tree conflict */ + svn_boolean_t added; db->shadowed = TRUE; - db->tree_conflict_reason = svn_wc_conflict_reason_obstructed; + + SVN_ERR(svn_wc__node_is_added(&added, merge_b->ctx->wc_ctx, + local_abspath, scratch_pool)); + + db->tree_conflict_reason = added ? svn_wc_conflict_reason_added + : svn_wc_conflict_reason_obstructed; } } @@ -6109,8 +6131,9 @@ insert_parent_and_sibs_of_sw_absent_del_ } /*(parent == NULL) */ /* Add all of PARENT's non-missing children that are not already present.*/ - SVN_ERR(svn_wc__node_get_children(&children, ctx->wc_ctx, - parent_abspath, FALSE, pool, pool)); + SVN_ERR(svn_wc__node_get_children_of_working_node(&children, ctx->wc_ctx, + parent_abspath, + pool, pool)); iterpool = svn_pool_create(pool); for (i = 0; i < children->nelts; i++) { @@ -6592,7 +6615,7 @@ get_mergeinfo_paths(apr_array_header_t * SVN_ERR(svn_wc__node_get_children_of_working_node( &immediate_children, ctx->wc_ctx, - target->abspath, FALSE, scratch_pool, scratch_pool)); + target->abspath, scratch_pool, scratch_pool)); for (j = 0; j < immediate_children->nelts; j++) { @@ -6676,9 +6699,10 @@ get_mergeinfo_paths(apr_array_header_t * const apr_array_header_t *children; int j; - SVN_ERR(svn_wc__node_get_children(&children, + SVN_ERR(svn_wc__node_get_children_of_working_node( + &children, ctx->wc_ctx, - child->abspath, FALSE, + child->abspath, iterpool, iterpool)); for (j = 0; j < children->nelts; j++) { @@ -10253,7 +10277,7 @@ ensure_wc_is_suitable_merge_target(const svn_boolean_t is_modified; SVN_ERR(svn_wc__has_local_mods(&is_modified, ctx->wc_ctx, - target_abspath, + target_abspath, TRUE, ctx->cancel_func, ctx->cancel_baton, scratch_pool));
Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/patch.c Wed Feb 25 08:15:39 2015 @@ -326,7 +326,8 @@ obtain_eol_and_keywords_for_file(apr_has const char *rev_str; const char *author; const char *url; - const char *root_url; + const char *repos_root_url; + const char *repos_relpath; SVN_ERR(svn_wc__node_get_changed_info(&changed_rev, &changed_date, @@ -335,15 +336,17 @@ obtain_eol_and_keywords_for_file(apr_has scratch_pool, scratch_pool)); rev_str = apr_psprintf(scratch_pool, "%ld", changed_rev); - SVN_ERR(svn_wc__node_get_url(&url, wc_ctx, - local_abspath, - scratch_pool, scratch_pool)); - SVN_ERR(svn_wc__node_get_repos_info(NULL, NULL, &root_url, NULL, + SVN_ERR(svn_wc__node_get_repos_info(NULL, &repos_relpath, &repos_root_url, + NULL, wc_ctx, local_abspath, scratch_pool, scratch_pool)); + url = svn_path_url_add_component2(repos_root_url, repos_relpath, + scratch_pool); + SVN_ERR(svn_subst_build_keywords3(keywords, keywords_val->data, - rev_str, url, root_url, changed_date, + rev_str, url, repos_root_url, + changed_date, author, result_pool)); } @@ -1592,7 +1595,7 @@ static svn_error_t * get_hunk_info(hunk_info_t **hi, patch_target_t *target, target_content_t *content, svn_diff_hunk_t *hunk, svn_linenum_t fuzz, - apr_int64_t previous_offset, + svn_linenum_t previous_offset, svn_boolean_t ignore_whitespace, svn_boolean_t is_prop_hunk, svn_cancel_func_t cancel_func, void *cancel_baton, @@ -1795,7 +1798,7 @@ get_hunk_info(hunk_info_t **hi, patch_ta && (!matched_line || (matched_line > original_start && (matched_line - original_start - > original_start - search_start)))) + > original_start - search_start)))) { svn_linenum_t search_start2 = 1; @@ -2272,7 +2275,7 @@ apply_one_patch(patch_target_t **patch_t int i; static const svn_linenum_t MAX_FUZZ = 2; apr_hash_index_t *hash_index; - apr_int64_t previous_offset = 0; + svn_linenum_t previous_offset = 0; SVN_ERR(init_patch_target(&target, patch, abs_wc_path, wc_ctx, strip_count, remove_tempfiles, result_pool, scratch_pool)); Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/prop_commands.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/prop_commands.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/prop_commands.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/prop_commands.c Wed Feb 25 08:15:39 2015 @@ -531,40 +531,18 @@ svn_client_revprop_set2(const char *prop return SVN_NO_ERROR; } -/* Helper for the remote case of svn_client_propget. - * - * If PROPS is not null, then get the value of property PROPNAME in - * REVNUM, using RA_SESSION. Store the value ('svn_string_t *') in - * PROPS, under the path key "TARGET_PREFIX/TARGET_RELATIVE" - * ('const char *'). - * - * If INHERITED_PROPS is not null, then set *INHERITED_PROPS to a - * depth-first ordered array of svn_prop_inherited_item_t * structures - * representing the PROPNAME properties inherited by the target. If - * INHERITABLE_PROPS in not null and no inheritable properties are found, - * then set *INHERITED_PROPS to an empty array. - * - * Recurse according to DEPTH, similarly to svn_client_propget3(). - * - * KIND is the kind of the node at "TARGET_PREFIX/TARGET_RELATIVE". - * Yes, caller passes this; it makes the recursion more efficient :-). - * - * Allocate PROPS and *INHERITED_PROPS in RESULT_POOL, but do all temporary - * work in SCRATCH_POOL. The two pools can be the same; recursive - * calls may use a different SCRATCH_POOL, however. - */ -static svn_error_t * -remote_propget(apr_hash_t *props, - apr_array_header_t **inherited_props, - const char *propname, - const char *target_prefix, - const char *target_relative, - svn_node_kind_t kind, - svn_revnum_t revnum, - svn_ra_session_t *ra_session, - svn_depth_t depth, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) +svn_error_t * +svn_client__remote_propget(apr_hash_t *props, + apr_array_header_t **inherited_props, + const char *propname, + const char *target_prefix, + const char *target_relative, + svn_node_kind_t kind, + svn_revnum_t revnum, + svn_ra_session_t *ra_session, + svn_depth_t depth, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) { apr_hash_t *dirents; apr_hash_t *prop_hash = NULL; @@ -676,15 +654,15 @@ remote_propget(apr_hash_t *props, new_target_relative = svn_relpath_join(target_relative, this_name, iterpool); - SVN_ERR(remote_propget(props, NULL, - propname, - target_prefix, - new_target_relative, - this_ent->kind, - revnum, - ra_session, - depth_below_here, - result_pool, iterpool)); + SVN_ERR(svn_client__remote_propget(props, NULL, + propname, + target_prefix, + new_target_relative, + this_ent->kind, + revnum, + ra_session, + depth_below_here, + result_pool, iterpool)); } svn_pool_destroy(iterpool); @@ -974,7 +952,8 @@ svn_client_propget5(apr_hash_t **props, if (!local_explicit_props) *props = apr_hash_make(result_pool); - SVN_ERR(remote_propget(!local_explicit_props ? *props : NULL, + SVN_ERR(svn_client__remote_propget( + !local_explicit_props ? *props : NULL, !local_iprops ? inherited_props : NULL, propname, loc->url, "", kind, loc->rev, ra_session, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/ra.c Wed Feb 25 08:15:39 2015 @@ -708,7 +708,7 @@ repos_locations(const char **start_url, || (SVN_IS_VALID_REVNUM(end_revnum) && (end_revnum > youngest_rev))) return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL, _("No such revision %ld"), - (start_revnum > youngest_rev) + (start_revnum > youngest_rev) ? start_revnum : end_revnum); if (start_url) Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c Wed Feb 25 08:15:39 2015 @@ -198,7 +198,7 @@ record_conflict(svn_wc_conflict_result_t is not null. Use RA_SESSION_P to run the update if it is not NULL. If it is then - open a new ra session and place it in RA_SESSION_P. This allows + open a new ra session and place it in RA_SESSION_P. This allows repeated calls to update_internal to reuse the same session. */ static svn_error_t * Modified: subversion/branches/reuse-ra-session/subversion/libsvn_delta/svndiff.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_delta/svndiff.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_delta/svndiff.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_delta/svndiff.c Wed Feb 25 08:15:39 2015 @@ -360,7 +360,7 @@ decode_size(apr_size_t *val, const unsigned char *result = svn__decode_uint(&temp, p, end); if (temp > APR_SIZE_MAX) return NULL; - + *val = (apr_size_t)temp; return result; } @@ -494,7 +494,7 @@ zlib_decode(const unsigned char *in, apr compressed.data = (char *)in; compressed.len = inLen; compressed.blocksize = inLen + 1; - + return svn__decompress(&compressed, out, limit); } @@ -796,7 +796,7 @@ read_one_byte(unsigned char *byte, svn_s return SVN_NO_ERROR; } -/* Read and decode one integer from STREAM into *SIZE. +/* Read and decode one integer from STREAM into *SIZE. Increment *BYTE_COUNTER by the number of chars we have read. */ static svn_error_t * read_one_size(apr_size_t *size, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_diff/parse-diff.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_diff/parse-diff.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_diff/parse-diff.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_diff/parse-diff.c Wed Feb 25 08:15:39 2015 @@ -532,7 +532,7 @@ parse_mergeinfo(svn_boolean_t *found_mer } else SVN_ERR(err); - + if (mergeinfo) { if (hunk->original_length > 0) /* reverse merges */ Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs/fs-loader.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs/fs-loader.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs/fs-loader.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs/fs-loader.c Wed Feb 25 08:15:39 2015 @@ -408,6 +408,11 @@ synchronized_initialize(void *baton, apr svn_error_t * svn_fs_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 /* Protect against multiple calls. */ return svn_error_trace(svn_atomic__init_once(&common_pool_initialized, synchronized_initialize, @@ -1691,7 +1696,7 @@ svn_fs_lock(svn_lock_t **lock, svn_fs_t apr_pool_t *pool) { apr_hash_t *targets = apr_hash_make(pool); - svn_fs_lock_target_t target; + svn_fs_lock_target_t target; svn_error_t *err; struct lock_baton_t baton = {0}; @@ -1710,7 +1715,7 @@ svn_fs_lock(svn_lock_t **lock, svn_fs_t svn_error_compose(err, baton.fs_err); else if (!err) err = baton.fs_err; - + return svn_error_trace(err); } @@ -1958,7 +1963,7 @@ svn_fs_info_dup(const void *info_void, fs_library_vtable_t *vtable; SVN_ERR(get_library_vtable(&vtable, info->fs_type, scratch_pool)); - + if (vtable->info_fsap_dup) return vtable->info_fsap_dup(info_void, result_pool); else Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/fs.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/fs.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/fs.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/fs.c Wed Feb 25 08:15:39 2015 @@ -783,8 +783,8 @@ base_create(svn_fs_t *fs, return SVN_NO_ERROR;; error: - svn_error_clear(cleanup_fs(fs)); - return svn_err; + return svn_error_compose_create(svn_err, + svn_error_trace(cleanup_fs(fs))); } @@ -871,8 +871,8 @@ base_open(svn_fs_t *fs, return SVN_NO_ERROR; error: - svn_error_clear(cleanup_fs(fs)); - return svn_err; + return svn_error_compose_create(svn_err, + svn_error_trace(cleanup_fs(fs))); } Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/lock.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/lock.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/lock.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/lock.c Wed Feb 25 08:15:39 2015 @@ -261,7 +261,7 @@ svn_fs_base__lock(svn_fs_t *fs, args.expiration_date = expiration_date; args.current_rev = target->current_rev; args.result_pool = result_pool; - + err = svn_fs_base__retry_txn(fs, txn_body_lock, &args, TRUE, scratch_pool); if (!cb_err && lock_callback) Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/cached_data.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/cached_data.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/cached_data.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/cached_data.c Wed Feb 25 08:15:39 2015 @@ -631,7 +631,7 @@ typedef struct rep_state_t -1 if the offset is yet unknown. */ apr_off_t current;/* The current offset relative to START. */ apr_off_t size; /* The on-disk size of the representation. */ - int ver; /* If a delta, what svndiff version? + int ver; /* If a delta, what svndiff version? -1 for unknown delta version. */ int chunk_index; /* number of the window to read */ } rep_state_t; @@ -991,7 +991,7 @@ svn_fs_fs__rep_chain_length(int *chain_l int count = 0; int shards = 1; svn_revnum_t last_shard = rep->revision / shard_size; - + /* Check whether the length of the deltification chain is acceptable. * Otherwise, shared reps may form a non-skipping delta chain in * extreme cases. */ @@ -1104,7 +1104,7 @@ struct rep_read_baton /* The text we've been reading, if we're going to cache it. */ svn_stringbuf_t *current_fulltext; - /* If not NULL, attempt to read the data from this cache. + /* If not NULL, attempt to read the data from this cache. Once that lookup fails, reset it to NULL. */ svn_cache__t *fulltext_cache; @@ -1550,7 +1550,7 @@ read_plain_window(svn_stringbuf_t **nwin apr_pool_t *scratch_pool) { apr_off_t offset; - + /* RS->FILE may be shared between RS instances -> make sure we point * to the right data. */ SVN_ERR(auto_open_shared_file(rs->sfile)); @@ -2001,7 +2001,7 @@ rep_read_contents(void *baton, &rb->src_state, &rb->len, rb->fs, &rb->rep, rb->filehandle_pool)); - /* In case we did read from the fulltext cache before, make the + /* In case we did read from the fulltext cache before, make the * window stream catch up. Also, initialize the fulltext buffer * if we want to cache the fulltext at the end. */ SVN_ERR(skip_contents(rb, rb->fulltext_delivered)); @@ -2788,7 +2788,7 @@ init_rep_state(rep_state_t *rs, /* this function does not apply to representation containers */ SVN_ERR_ASSERT(entry->type >= SVN_FS_FS__ITEM_TYPE_FILE_REP && entry->type <= SVN_FS_FS__ITEM_TYPE_DIR_PROPS); - + shared_file->rfile = file; shared_file->fs = fs; shared_file->revision = entry->item.revision; @@ -2850,7 +2850,7 @@ get_raw_window_end(void **out, * at or beyond that offset. Use POOL for temporary allocations. * * This function requires RS->RAW_WINDOW_CACHE and RS->WINDOW_CACHE to - * be non-NULL. + * be non-NULL. */ static svn_error_t * cache_windows(svn_fs_t *fs, @@ -2965,7 +2965,7 @@ block_read_windows(svn_fs_fs__rep_header SVN_ERR(init_rep_state(&rs, rep_header, fs, rev_file, entry, result_pool)); - + /* RS->FILE may be shared between RS instances -> make sure we point * to the right data. */ offset = rs.start + rs.current; @@ -3018,7 +3018,7 @@ read_rep_header(svn_fs_fs__rep_header_t { fs_fs_data_t *ffd = fs->fsap_data; svn_boolean_t is_cached = FALSE; - + if (ffd->rep_header_cache) { SVN_ERR(svn_cache__get((void**)rep_header, &is_cached, @@ -3246,7 +3246,7 @@ block_read(void **result, /* don't try this on transaction protorev files */ SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision)); - + /* index lookup: find the OFFSET of the item we *must* read plus (in the * "do-while" block) the list of items in the same block. */ SVN_ERR(svn_fs_fs__item_offset(&wanted_offset, fs, revision_file, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/fs_fs.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/fs_fs.c Wed Feb 25 08:15:39 2015 @@ -401,7 +401,7 @@ svn_fs_fs__with_all_locks(svn_fs_t *fs, fs_fs_data_t *ffd = fs->fsap_data; /* 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, pool); @@ -1144,7 +1144,7 @@ create_file_ignore_eexist(const char *fi return svn_error_trace(err); } -/* Baton type bridging svn_fs_fs__upgrade and upgrade_body carrying +/* Baton type bridging svn_fs_fs__upgrade and upgrade_body carrying * parameters over between them. */ struct upgrade_baton_t { @@ -1287,7 +1287,7 @@ svn_fs_fs__upgrade(svn_fs_t *fs, baton.notify_baton = notify_baton; baton.cancel_func = cancel_func; baton.cancel_baton = cancel_baton; - + return svn_fs_fs__with_all_locks(fs, upgrade_body, (void *)&baton, pool); } @@ -1556,7 +1556,7 @@ svn_fs_fs__file_checksum(svn_checksum_t { svn_checksum_t temp; temp.kind = kind; - + switch(kind) { case svn_checksum_md5: Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/hotcopy.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/hotcopy.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/hotcopy.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/hotcopy.c Wed Feb 25 08:15:39 2015 @@ -369,7 +369,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 POOL for temporary allocations. */ static svn_error_t * hotcopy_remove_file(const char *path, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/id.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/id.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/id.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/id.c Wed Feb 25 08:15:39 2015 @@ -232,7 +232,7 @@ svn_fs_fs__id_txn_unparse(const svn_fs_f { char string[2 * SVN_INT64_BUFFER_SIZE + 1]; char *p = string; - + p += svn__i64toa(p, txn_id->revision); *(p++) = '-'; p += svn__ui64tobase36(p, txn_id->number); @@ -418,7 +418,7 @@ svn_fs_fs__id_txn_create_root(const svn_ fs_fs__id_t *id = apr_pcalloc(pool, sizeof(*id)); /* node ID and copy ID are "0" */ - + id->private_id.txn_id = *txn_id; id->private_id.rev_item.revision = SVN_INVALID_REVNUM; @@ -598,7 +598,7 @@ svn_fs_fs__id_serialize(svn_temp_seriali const svn_fs_id_t * const *in) { const fs_fs__id_t *id = (const fs_fs__id_t *)*in; - + /* nothing to do for NULL ids */ if (id == NULL) return; Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.c Wed Feb 25 08:15:39 2015 @@ -87,7 +87,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 { @@ -498,7 +498,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)); } @@ -806,7 +806,7 @@ svn_fs_fs__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)); @@ -869,7 +869,7 @@ svn_fs_fs__l2p_index_append(svn_checksum return svn_error_createf(SVN_ERR_FS_INDEX_OVERFLOW , NULL, _("Item index %s too large " "in l2p proto index for revision %ld"), - apr_psprintf(local_pool, "%" APR_UINT64_T_FMT, + apr_psprintf(local_pool, "%" APR_UINT64_T_FMT, proto_entry.item_index), revision + page_counts->nelts); @@ -1277,7 +1277,7 @@ l2p_page_table_access_func(void **out, /* set output as a courtesy to the caller */ *out = table_baton->pages; - + return SVN_NO_ERROR; } @@ -1669,7 +1669,7 @@ l2p_proto_index_lookup(apr_off_t *offset } SVN_ERR(svn_io_file_close(file, scratch_pool)); - + return SVN_NO_ERROR; } @@ -2188,7 +2188,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; @@ -2282,7 +2282,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) @@ -2595,7 +2595,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; @@ -2611,7 +2611,7 @@ get_p2l_keys(p2l_page_info_baton_t *page /* return results */ if (page_info_p) *page_info_p = page_info; - + /* construct cache key */ if (key_p) { @@ -2621,7 +2621,7 @@ get_p2l_keys(p2l_page_info_baton_t *page key.is_packed = rev_file->is_packed; key.page = page_info.page_no; - *key_p = key; + *key_p = key; } return SVN_NO_ERROR; Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.h?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.h (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/index.h Wed Feb 25 08:15:39 2015 @@ -71,7 +71,7 @@ svn_fs_fs__l2p_proto_index_add_revision( * Not all possible index values need to be used. OFFSET may be -1 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 * @@ -83,7 +83,7 @@ svn_fs_fs__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_fs/lock.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/lock.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/lock.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/lock.c Wed Feb 25 08:15:39 2015 @@ -355,7 +355,7 @@ set_lock(const char *fs_path, always come back empty. */ SVN_ERR(read_digest_file(&children, NULL, fs_path, digest_path, 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, pool)); return SVN_NO_ERROR; @@ -405,7 +405,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, pool)); return SVN_NO_ERROR; @@ -438,7 +438,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, pool)); else SVN_ERR(svn_io_remove_file2(index_digest_path, TRUE, pool)); @@ -451,6 +451,12 @@ unlock_single(svn_fs_t *fs, svn_lock_t *lock, apr_pool_t *pool); +/* Check if LOCK has been already expired. */ +static svn_boolean_t lock_expired(const svn_lock_t *lock) +{ + return lock->expiration_date && (apr_time_now() > lock->expiration_date); +} + /* Set *LOCK_P to the lock for PATH in FS. HAVE_WRITE_LOCK should be TRUE if the caller (or one of its callers) has taken out the repository-wide write lock, FALSE otherwise. If MUST_EXIST is @@ -480,7 +486,7 @@ get_lock(svn_lock_t **lock_p, return must_exist ? SVN_FS__ERR_NO_SUCH_LOCK(fs, path) : SVN_NO_ERROR; /* Don't return an expired lock. */ - if (lock->expiration_date && (apr_time_now() > lock->expiration_date)) + if (lock_expired(lock)) { /* Only remove the lock if we have the write lock. Read operations shouldn't change the filesystem. */ @@ -527,67 +533,17 @@ get_lock_helper(svn_fs_t *fs, } -/* Baton for locks_walker(). */ -struct walk_locks_baton { - svn_fs_get_locks_callback_t get_locks_func; - void *get_locks_baton; - svn_fs_t *fs; -}; - -/* Implements walk_digests_callback_t. */ -static svn_error_t * -locks_walker(void *baton, - const char *fs_path, - const char *digest_path, - svn_lock_t *lock, - svn_boolean_t have_write_lock, - apr_pool_t *pool) -{ - struct walk_locks_baton *wlb = baton; - - if (lock) - { - /* Don't report an expired lock. */ - if (lock->expiration_date == 0 - || (apr_time_now() <= lock->expiration_date)) - { - if (wlb->get_locks_func) - SVN_ERR(wlb->get_locks_func(wlb->get_locks_baton, lock, pool)); - } - else - { - /* Only remove the lock if we have the write lock. - Read operations shouldn't change the filesystem. */ - if (have_write_lock) - SVN_ERR(unlock_single(wlb->fs, lock, pool)); - } - } - - return SVN_NO_ERROR; -} - -/* Callback type for walk_digest_files(). - * - * LOCK come from a read_digest_file(digest_path) call. - */ -typedef svn_error_t *(*walk_digests_callback_t)(void *baton, - const char *fs_path, - const char *digest_path, - svn_lock_t *lock, - svn_boolean_t have_write_lock, - apr_pool_t *pool); - -/* A function that calls WALK_DIGESTS_FUNC/WALK_DIGESTS_BATON for - all lock digest files in and under PATH in FS. +/* A function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for + all locks in and under PATH in FS. HAVE_WRITE_LOCK should be true if the caller (directly or indirectly) has the FS write lock. */ static svn_error_t * -walk_digest_files(const char *fs_path, - const char *digest_path, - walk_digests_callback_t walk_digests_func, - void *walk_digests_baton, - svn_boolean_t have_write_lock, - apr_pool_t *pool) +walk_locks(svn_fs_t *fs, + const char *digest_path, + svn_fs_get_locks_callback_t get_locks_func, + void *get_locks_baton, + svn_boolean_t have_write_lock, + apr_pool_t *pool) { apr_hash_index_t *hi; apr_hash_t *children; @@ -595,10 +551,19 @@ walk_digest_files(const char *fs_path, svn_lock_t *lock; /* First, send up any locks in the current digest file. */ - SVN_ERR(read_digest_file(&children, &lock, fs_path, digest_path, pool)); + SVN_ERR(read_digest_file(&children, &lock, fs->path, digest_path, pool)); - SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path, lock, - have_write_lock, pool)); + if (lock && lock_expired(lock)) + { + /* Only remove the lock if we have the write lock. + Read operations shouldn't change the filesystem. */ + if (have_write_lock) + SVN_ERR(unlock_single(fs, lock, pool)); + } + else if (lock) + { + SVN_ERR(get_locks_func(get_locks_baton, lock, pool)); + } /* Now, report all the child entries (if any; bail otherwise). */ if (! apr_hash_count(children)) @@ -610,38 +575,25 @@ walk_digest_files(const char *fs_path, svn_pool_clear(subpool); SVN_ERR(read_digest_file - (NULL, &lock, fs_path, - digest_path_from_digest(fs_path, digest, subpool), subpool)); + (NULL, &lock, fs->path, + digest_path_from_digest(fs->path, digest, subpool), subpool)); - SVN_ERR(walk_digests_func(walk_digests_baton, fs_path, digest_path, lock, - have_write_lock, subpool)); + if (lock && lock_expired(lock)) + { + /* Only remove the lock if we have the write lock. + Read operations shouldn't change the filesystem. */ + if (have_write_lock) + SVN_ERR(unlock_single(fs, lock, pool)); + } + else if (lock) + { + SVN_ERR(get_locks_func(get_locks_baton, lock, pool)); + } } svn_pool_destroy(subpool); return SVN_NO_ERROR; } -/* A function that calls GET_LOCKS_FUNC/GET_LOCKS_BATON for - all locks in and under PATH in FS. - HAVE_WRITE_LOCK should be true if the caller (directly or indirectly) - has the FS write lock. */ -static svn_error_t * -walk_locks(svn_fs_t *fs, - const char *digest_path, - svn_fs_get_locks_callback_t get_locks_func, - void *get_locks_baton, - svn_boolean_t have_write_lock, - apr_pool_t *pool) -{ - struct walk_locks_baton wlb; - - wlb.get_locks_func = get_locks_func; - wlb.get_locks_baton = get_locks_baton; - wlb.fs = fs; - SVN_ERR(walk_digest_files(fs->path, digest_path, locks_walker, &wlb, - have_write_lock, pool)); - return SVN_NO_ERROR; -} - /* Utility function: verify that a lock can be used. Interesting errors returned from this function: @@ -716,6 +668,35 @@ svn_fs_fs__allow_locked_operation(const return SVN_NO_ERROR; } +/* Helper function called from the lock and unlock code. + UPDATES is a map from "const char *" parent paths to "apr_array_header_t *" + arrays of child paths. For all of the parent paths of PATH this function + adds PATH to the corresponding array of child paths. */ +static void +schedule_index_update(apr_hash_t *updates, + const char *path, + apr_pool_t *scratch_pool) +{ + apr_pool_t *hashpool = apr_hash_pool_get(updates); + const char *parent_path = path; + + while (! svn_fspath__is_root(parent_path, strlen(parent_path))) + { + apr_array_header_t *children; + + parent_path = svn_fspath__dirname(parent_path, scratch_pool); + children = svn_hash_gets(updates, parent_path); + + if (! children) + { + children = apr_array_make(hashpool, 8, sizeof(const char *)); + svn_hash_sets(updates, apr_pstrdup(hashpool, parent_path), children); + } + + APR_ARRAY_PUSH(children, const char *) = path; + } +} + /* The effective arguments for lock_body() below. */ struct lock_baton { svn_fs_t *fs; @@ -828,7 +809,6 @@ check_lock(svn_error_t **fs_err, struct lock_info_t { const char *path; - const char *component; svn_lock_t *lock; svn_error_t *fs_err; }; @@ -851,7 +831,9 @@ lock_body(void *baton, apr_pool_t *pool) svn_fs_root_t *root; svn_revnum_t youngest; const char *rev_0_path; - int i, outstanding = 0; + int i; + apr_hash_t *index_updates = apr_hash_make(pool); + apr_hash_index_t *hi; apr_pool_t *iterpool = svn_pool_create(pool); /* Until we implement directory locks someday, we only allow locks @@ -865,34 +847,28 @@ lock_body(void *baton, apr_pool_t *pool) { const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i, svn_sort__item_t); - const svn_fs_lock_target_t *target = item->value; struct lock_info_t info; svn_pool_clear(iterpool); info.path = item->key; - SVN_ERR(check_lock(&info.fs_err, info.path, target, lb, root, iterpool)); info.lock = NULL; - info.component = NULL; - APR_ARRAY_PUSH(lb->infos, struct lock_info_t) = info; + info.fs_err = SVN_NO_ERROR; + + SVN_ERR(check_lock(&info.fs_err, info.path, item->value, lb, root, + iterpool)); + + /* If no error occurred while pre-checking, schedule the index updates for + this path. */ if (!info.fs_err) - ++outstanding; + schedule_index_update(index_updates, info.path, iterpool); + + APR_ARRAY_PUSH(lb->infos, struct lock_info_t) = info; } rev_0_path = svn_fs_fs__path_rev_absolute(lb->fs, 0, pool); - /* Given the paths: - - /foo/bar/f - /foo/bar/g - /zig/x - - we loop through repeatedly. The first pass sees '/' on all paths - and writes the '/' index. The second pass sees '/foo' twice and - writes that index followed by '/zig' and that index. The third - pass sees '/foo/bar' twice and writes that index, and then writes - the lock for '/zig/x'. The fourth pass writes the locks for - '/foo/bar/f' and '/foo/bar/g'. + /* We apply the scheduled index updates before writing the actual locks. Writing indices before locks is correct: if interrupted it leaves indices without locks rather than locks without indices. An @@ -901,92 +877,50 @@ lock_body(void *baton, apr_pool_t *pool) index is inconsistent, svn_fs_fs__allow_locked_operation will show locked on the file but unlocked on the parent. */ - - while (outstanding) + for (hi = apr_hash_first(pool, index_updates); hi; hi = apr_hash_next(hi)) + { + const char *path = apr_hash_this_key(hi); + apr_array_header_t *children = apr_hash_this_val(hi); + + svn_pool_clear(iterpool); + SVN_ERR(add_to_digest(lb->fs->path, children, path, rev_0_path, + iterpool)); + } + + for (i = 0; i < lb->infos->nelts; ++i) { - const char *last_path = NULL; - apr_array_header_t *paths; + struct lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i, + struct lock_info_t); + svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i, svn_sort__item_t); + svn_fs_lock_target_t *target = item->value; svn_pool_clear(iterpool); - paths = apr_array_make(iterpool, 1, sizeof(const char *)); - for (i = 0; i < lb->infos->nelts; ++i) + if (! info->fs_err) { - struct lock_info_t *info = &APR_ARRAY_IDX(lb->infos, i, - struct lock_info_t); - const svn_sort__item_t *item = &APR_ARRAY_IDX(lb->targets, i, - svn_sort__item_t); - const svn_fs_lock_target_t *target = item->value; - - if (!info->fs_err && !info->lock) - { - if (!info->component) - { - info->component = info->path; - APR_ARRAY_PUSH(paths, const char *) = info->path; - last_path = "/"; - } - else - { - info->component = strchr(info->component + 1, '/'); - if (!info->component) - { - /* The component is a path to lock, this cannot - match a previous path that need to be indexed. */ - if (paths->nelts) - { - SVN_ERR(add_to_digest(lb->fs->path, paths, last_path, - rev_0_path, iterpool)); - apr_array_clear(paths); - last_path = NULL; - } - - info->lock = svn_lock_create(lb->result_pool); - if (target->token) - info->lock->token = target->token; - else - SVN_ERR(svn_fs_fs__generate_lock_token( - &(info->lock->token), lb->fs, - lb->result_pool)); - info->lock->path = info->path; - info->lock->owner = lb->fs->access_ctx->username; - info->lock->comment = lb->comment; - info->lock->is_dav_comment = lb->is_dav_comment; - info->lock->creation_date = apr_time_now(); - info->lock->expiration_date = lb->expiration_date; - - info->fs_err = set_lock(lb->fs->path, info->lock, - rev_0_path, iterpool); - --outstanding; - } - else - { - /* The component is a path to an index. */ - apr_size_t len = info->component - info->path; - - if (last_path - && (strncmp(last_path, info->path, len) - || strlen(last_path) != len)) - { - /* No match to the previous paths to index. */ - SVN_ERR(add_to_digest(lb->fs->path, paths, last_path, - rev_0_path, iterpool)); - apr_array_clear(paths); - last_path = NULL; - } - APR_ARRAY_PUSH(paths, const char *) = info->path; - if (!last_path) - last_path = apr_pstrndup(iterpool, info->path, len); - } - } - } - - if (last_path && i == lb->infos->nelts - 1) - SVN_ERR(add_to_digest(lb->fs->path, paths, last_path, - rev_0_path, iterpool)); + info->lock = svn_lock_create(lb->result_pool); + if (target->token) + info->lock->token = apr_pstrdup(lb->result_pool, target->token); + else + SVN_ERR(svn_fs_fs__generate_lock_token(&(info->lock->token), lb->fs, + lb->result_pool)); + + /* The INFO->PATH is already allocated in LB->RESULT_POOL as a result + of svn_fspath__canonicalize() (see svn_fs_fs__lock()). */ + info->lock->path = info->path; + info->lock->owner = apr_pstrdup(lb->result_pool, + lb->fs->access_ctx->username); + info->lock->comment = apr_pstrdup(lb->result_pool, lb->comment); + info->lock->is_dav_comment = lb->is_dav_comment; + info->lock->creation_date = apr_time_now(); + info->lock->expiration_date = lb->expiration_date; + + info->fs_err = set_lock(lb->fs->path, info->lock, rev_0_path, + iterpool); } } - + + svn_pool_destroy(iterpool); return SVN_NO_ERROR; } @@ -1027,10 +961,8 @@ check_unlock(svn_error_t **fs_err, struct unlock_info_t { const char *path; - const char *component; svn_error_t *fs_err; svn_boolean_t done; - int components; }; /* The body of svn_fs_fs__unlock(), which see. @@ -1051,7 +983,9 @@ unlock_body(void *baton, apr_pool_t *poo svn_fs_root_t *root; svn_revnum_t youngest; const char *rev_0_path; - int i, max_components = 0, outstanding = 0; + int i; + apr_hash_t *indices_updates = apr_hash_make(pool); + apr_hash_index_t *hi; apr_pool_t *iterpool = svn_pool_create(pool); SVN_ERR(ub->fs->vtable->youngest_rev(&youngest, ub->fs, pool)); @@ -1062,96 +996,56 @@ unlock_body(void *baton, apr_pool_t *poo const svn_sort__item_t *item = &APR_ARRAY_IDX(ub->targets, i, svn_sort__item_t); const char *token = item->value; - struct unlock_info_t info = { 0 }; + struct unlock_info_t info; svn_pool_clear(iterpool); info.path = item->key; + info.fs_err = SVN_NO_ERROR; + info.done = FALSE; + if (!ub->skip_check) SVN_ERR(check_unlock(&info.fs_err, info.path, token, ub, root, iterpool)); - if (!info.fs_err) - { - const char *s; - info.components = 1; - info.component = info.path; - while((s = strchr(info.component + 1, '/'))) - { - info.component = s; - ++info.components; - } - - if (info.components > max_components) - max_components = info.components; + /* If no error occurred while pre-checking, schedule the index updates for + this path. */ + if (!info.fs_err) + schedule_index_update(indices_updates, info.path, iterpool); - ++outstanding; - } APR_ARRAY_PUSH(ub->infos, struct unlock_info_t) = info; } rev_0_path = svn_fs_fs__path_rev_absolute(ub->fs, 0, pool); - for (i = max_components; i >= 0; --i) + /* Unlike the lock_body(), we need to delete locks *before* we start to + update indices. */ + + for (i = 0; i < ub->infos->nelts; ++i) { - const char *last_path = NULL; - apr_array_header_t *paths; - int j; + struct unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, i, + struct unlock_info_t); svn_pool_clear(iterpool); - paths = apr_array_make(pool, 1, sizeof(const char *)); - for (j = 0; j < ub->infos->nelts; ++j) + if (! info->fs_err) { - struct unlock_info_t *info = &APR_ARRAY_IDX(ub->infos, j, - struct unlock_info_t); + SVN_ERR(delete_lock(ub->fs->path, info->path, iterpool)); + info->done = TRUE; + } + } - if (!info->fs_err && info->path) - { + for (hi = apr_hash_first(pool, indices_updates); hi; hi = apr_hash_next(hi)) + { + const char *path = apr_hash_this_key(hi); + apr_array_header_t *children = apr_hash_this_val(hi); - if (info->components == i) - { - SVN_ERR(delete_lock(ub->fs->path, info->path, iterpool)); - info->done = TRUE; - } - else if (info->components > i) - { - apr_size_t len = info->component - info->path; - - if (last_path - && strcmp(last_path, "/") - && (strncmp(last_path, info->path, len) - || strlen(last_path) != len)) - { - SVN_ERR(delete_from_digest(ub->fs->path, paths, last_path, - rev_0_path, iterpool)); - apr_array_clear(paths); - last_path = NULL; - } - APR_ARRAY_PUSH(paths, const char *) = info->path; - if (!last_path) - { - if (info->component > info->path) - last_path = apr_pstrndup(pool, info->path, len); - else - last_path = "/"; - } - - if (info->component > info->path) - { - --info->component; - while(info->component[0] != '/') - --info->component; - } - } - } - - if (last_path && j == ub->infos->nelts - 1) - SVN_ERR(delete_from_digest(ub->fs->path, paths, last_path, - rev_0_path, iterpool)); - } + svn_pool_clear(iterpool); + SVN_ERR(delete_from_digest(ub->fs->path, children, path, rev_0_path, + iterpool)); } + svn_pool_destroy(iterpool); return SVN_NO_ERROR; } @@ -1256,7 +1150,7 @@ svn_fs_fs__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_fs/low_level.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/low_level.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/low_level.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/low_level.c Wed Feb 25 08:15:39 2015 @@ -499,7 +499,7 @@ svn_fs_fs__read_changes_incrementally(sv } while (change); svn_pool_destroy(iterpool); - + return SVN_NO_ERROR; } @@ -725,7 +725,7 @@ svn_fs_fs__parse_representation(represen /* initialize transaction info (never stored) */ svn_fs_fs__id_txn_reset(&rep->txn_id); - + /* while in transactions, it is legal to simply write "-1" */ str = svn_cstring_tokenize(" ", &string); if (str == NULL) @@ -998,7 +998,7 @@ format_digest(const unsigned char *diges svn_checksum_t checksum; checksum.digest = digest; checksum.kind = kind; - + if (is_null) return "(null)"; @@ -1174,7 +1174,7 @@ svn_fs_fs__write_rep_header(svn_fs_fs__r apr_pool_t *scratch_pool) { const char *text; - + switch (header->type) { case svn_fs_fs__rep_plain: Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/low_level.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/low_level.h?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/low_level.h (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/low_level.h Wed Feb 25 08:15:39 2015 @@ -44,7 +44,7 @@ * in *ROOT_OFFSET and the offset of the changed paths list in * *CHANGES_OFFSET. Offsets are relative to the revision's start offset. * ROOT_OFFSET and / or CHANGES_OFFSET may be NULL. - * + * * Note that REV is only used to construct nicer error objects. */ svn_error_t * @@ -66,7 +66,7 @@ svn_fs_fs__unparse_revision_trailer(apr_ * 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. */ Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/pack.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/pack.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/pack.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/pack.c Wed Feb 25 08:15:39 2015 @@ -69,7 +69,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 @@ -256,7 +256,7 @@ initialize_pack_context(pack_context_t * fs_fs_data_t *ffd = fs->fsap_data; const char *temp_dir; int max_revs = MIN(ffd->max_files_per_dir, max_items); - + SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT); SVN_ERR_ASSERT(shard_rev % ffd->max_files_per_dir == 0); @@ -272,7 +272,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; @@ -349,7 +349,7 @@ reset_pack_context(pack_context_t *conte SVN_ERR(svn_io_file_trunc(context->reps_file, 0, pool)); svn_pool_clear(context->info_pool); - + return SVN_NO_ERROR; } @@ -377,7 +377,7 @@ close_pack_context(pack_context_t *conte SVN_ERR(svn_fs_fs__add_index_data(context->fs, context->pack_file, proto_l2p_index_path, proto_p2l_index_path, - context->shard_rev, + context->shard_rev, pool)); /* remove proto index files */ @@ -402,7 +402,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 */ @@ -481,9 +481,9 @@ copy_item_to_temp(pack_context_t *contex SVN_ERR(svn_fs_fs__get_file_offset(&new_entry->offset, temp_file, pool)); APR_ARRAY_PUSH(entries, svn_fs_fs__p2l_entry_t *) = new_entry; - + SVN_ERR(copy_file_data(context, temp_file, rev_file, entry->size, pool)); - + return SVN_NO_ERROR; } @@ -1001,7 +1001,7 @@ sort_reps(pack_context_t *context) /* We now know the final ordering. */ for (i = 0; i < count; ++i) path_order[i] = temp[i]; - + svn_pool_destroy(temp_pool); } @@ -1290,7 +1290,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) @@ -1391,7 +1391,7 @@ pack_range(pack_context_t *context, SVN_ERR(write_l2p_index(context, revpool)); svn_pool_destroy(revpool); - + return SVN_NO_ERROR; } @@ -1639,7 +1639,7 @@ svn_fs_fs__get_packed_offset(apr_off_t * /* Packing logic for physical addresssing mode: * Simply concatenate all revision contents. - * + * * Pack the revision shard starting at SHARD_REV containing exactly * MAX_FILES_PER_DIR revisions from SHARD_PATH into the PACK_FILE_DIR, * using POOL for allocations. CANCEL_FUNC and CANCEL_BATON are what you @@ -1756,7 +1756,7 @@ pack_rev_shard(svn_fs_t *fs, SVN_ERR(pack_phys_addressed(pack_file_dir, shard_path, shard_rev, max_files_per_dir, cancel_func, cancel_baton, pool)); - + SVN_ERR(svn_io_copy_perms(shard_path, pack_file_dir, pool)); SVN_ERR(svn_io_set_file_read_only(pack_file_path, FALSE, pool)); Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/recovery.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/recovery.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/recovery.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/recovery.c Wed Feb 25 08:15:39 2015 @@ -193,7 +193,7 @@ recover_find_max_ids(svn_fs_t *fs, "representation")); /* Now create a stream that's allowed to read only as much data as is - stored in the representation. Note that this is a directory, i.e. + stored in the representation. Note that this is a directory, i.e. represented using the hash format on disk and can never have 0 length. */ baton.pool = pool; baton.remaining = noderev->data_rep->expanded_size Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/rev_file.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/rev_file.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/rev_file.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/rev_file.c Wed Feb 25 08:15:39 2015 @@ -146,7 +146,7 @@ open_pack_or_rev_file(svn_fs_fs__revisio /* 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_fs/revprops.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/revprops.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/revprops.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/revprops.c Wed Feb 25 08:15:39 2015 @@ -111,7 +111,7 @@ svn_fs_fs__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) { Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/revprops.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/revprops.h?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/revprops.h (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/revprops.h Wed Feb 25 08:15:39 2015 @@ -23,12 +23,12 @@ #include "svn_fs.h" /* 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. */ @@ -42,7 +42,7 @@ svn_fs_fs__upgrade_pack_revprops(svn_fs_ /* 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 @@ -79,7 +79,7 @@ svn_fs_fs__set_revision_proplist(svn_fs_ /* Return TRUE, if for REVISION in FS, we can find the revprop pack file. * Use 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_fs__packed_revprop_available(svn_boolean_t *missing, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/stats.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/stats.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/stats.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/stats.c Wed Feb 25 08:15:39 2015 @@ -300,7 +300,7 @@ add_change(svn_fs_fs__stats_t *stats, add_to_histogram(&stats->dir_prop_rep_histogram, rep_size); add_to_histogram(&stats->dir_prop_histogram, expanded_size); break; - case file_property_rep: + case file_property_rep: add_to_histogram(&stats->file_prop_rep_histogram, rep_size); add_to_histogram(&stats->file_prop_histogram, expanded_size); break; @@ -695,7 +695,7 @@ read_phys_revision(query_t *query, trailer = svn_stringbuf_ncreate(buf, len, scratch_pool); /* Parse that trailer. */ - SVN_ERR(svn_fs_fs__parse_revision_trailer(&root_node_offset, + SVN_ERR(svn_fs_fs__parse_revision_trailer(&root_node_offset, &changes_offset, trailer, info->revision)); SVN_ERR(get_phys_change_count(query, info, scratch_pool)); Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/transaction.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/transaction.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/transaction.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/transaction.c Wed Feb 25 08:15:39 2015 @@ -63,7 +63,7 @@ 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_fs__path_txn_dir(fs, txn_id, pool), svn_checksum_to_cstring(&checksum, pool), pool); @@ -465,7 +465,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) @@ -973,7 +973,7 @@ get_and_increment_txn_key_body(void *bat /* remove trailing newlines */ line_length = svn__ui64tobase36(new_id_str, cb->txn_number+1); new_id_str[line_length] = '\n'; - + /* Increment the key and add a trailing \n to the string so the txn-current file has a newline in it. */ SVN_ERR(svn_io_write_atomic(txn_current_filename, new_id_str, @@ -1164,7 +1164,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 ? path_txn_props_final(fs, txn_id, pool) : path_txn_props(fs, txn_id, pool)), buf->data, buf->len, @@ -1270,7 +1270,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); @@ -3354,7 +3354,7 @@ svn_fs_fs__add_index_data(svn_fs_t *fs, pool, pool)); /* Append footer. */ - footer = svn_fs_fs__unparse_footer(l2p_offset, l2p_checksum, + footer = svn_fs_fs__unparse_footer(l2p_offset, l2p_checksum, p2l_offset, p2l_checksum, pool, pool); SVN_ERR(svn_io_file_write_full(file, footer->data, footer->len, NULL, pool)); Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/tree.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/tree.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/tree.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/tree.c Wed Feb 25 08:15:39 2015 @@ -90,7 +90,7 @@ typedef struct fs_txn_root_data_t { /* TXN_ID value from the main struct but as a struct instead of a string */ svn_fs_fs__id_part_t txn_id; - + /* Cache of txn DAG nodes (without their nested noderevs, because * it's mutable). Same keys/values as ffd->rev_node_cache. */ svn_cache__t *txn_node_cache; @@ -574,7 +574,7 @@ root_txn_id(svn_fs_root_t *root) { fs_txn_root_data_t *frd = root->fsap_data; assert(root->is_txn_root); - + return &frd->txn_id; } @@ -2095,7 +2095,7 @@ merge_changes(dag_node_t *ancestor_node, dag_node_t *txn_root_node; svn_fs_t *fs = txn->fs; const svn_fs_fs__id_part_t *txn_id = svn_fs_fs__txn_get_id(txn); - + SVN_ERR(svn_fs_fs__dag_txn_root(&txn_root_node, fs, txn_id, pool)); if (ancestor_node == NULL) @@ -2905,7 +2905,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_fs__dag_finalize_edits(tb->node, tb->result_checksum, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/verify.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/verify.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/verify.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_fs/verify.c Wed Feb 25 08:15:39 2015 @@ -204,7 +204,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)); } @@ -476,7 +476,7 @@ expect_buffer_nul(apr_file_t *file, { const char *file_name; apr_off_t offset; - + SVN_ERR(svn_io_file_name_get(&file_name, file, pool)); SVN_ERR(svn_fs_fs__get_file_offset(&offset, file, pool)); offset -= size - i; @@ -793,7 +793,7 @@ verify_f7_metadata_consistency(svn_fs_t /* 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, Propchange: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Feb 25 08:15:39 2015 @@ -60,6 +60,7 @@ /subversion/branches/nfc-nfd-aware-client/subversion/libsvn_fs_x:870276,870376 /subversion/branches/node_pool/subversion/libsvn_fs_x:1304828-1305388 /subversion/branches/performance/subversion/libsvn_fs_x:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985673,985695,985697,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,102 9339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365 +/subversion/branches/pin-externals/subversion/libsvn_fs_x:1643757-1659392 /subversion/branches/py-tests-as-modules/subversion/libsvn_fs_x:956579-1033052 /subversion/branches/ra_serf-digest-authn/subversion/libsvn_fs_x:875693-876404 /subversion/branches/reintegrate-improvements/subversion/libsvn_fs_x:873853-874164 @@ -89,4 +90,4 @@ /subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384 /subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162 4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1653608, 1658482 -/subversion/trunk/subversion/libsvn_fs_x:1414756-1658952 +/subversion/trunk/subversion/libsvn_fs_x:1414756-1662176 Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c Wed Feb 25 08:15:39 2015 @@ -343,7 +343,7 @@ get_node_revision_body(svn_fs_x__noderev key.second = offset; SVN_ERR(svn_cache__get_partial((void **)noderev_p, &is_cached, - ffd->noderevs_container_cache, &key, + ffd->noderevs_container_cache, &key, svn_fs_x__noderevs_get_func, &sub_item, result_pool)); if (is_cached) @@ -500,7 +500,7 @@ typedef struct rep_state_t apr_uint32_t sub_item; apr_off_t current;/* The current offset relative to START. */ apr_off_t size; /* The on-disk size of the representation. */ - int ver; /* If a delta, what svndiff version? + int ver; /* If a delta, what svndiff version? -1 for unknown delta version. */ int chunk_index; /* number of the window to read */ } rep_state_t; @@ -982,7 +982,7 @@ typedef struct rep_read_baton_t /* The text we've been reading, if we're going to cache it. */ svn_stringbuf_t *current_fulltext; - /* If not NULL, attempt to read the data from this cache. + /* If not NULL, attempt to read the data from this cache. Once that lookup fails, reset it to NULL. */ svn_cache__t *fulltext_cache; @@ -1054,7 +1054,7 @@ get_cached_window_sizes_func(void **out, window_sizes_t *result = apr_palloc(pool, sizeof(*result)); result->packed_len = window->end_offset - window->start_offset; result->target_len = txdelta_window->tview_len; - + *out = result; return SVN_NO_ERROR; @@ -1741,7 +1741,7 @@ read_rep_header(svn_fs_x__rep_header_t * { svn_fs_x__data_t *ffd = fs->fsap_data; svn_boolean_t is_cached = FALSE; - + if (ffd->rep_header_cache) { SVN_ERR(svn_cache__get((void**)rep_header, &is_cached, @@ -1769,13 +1769,13 @@ svn_fs_x__get_representation_length(svn_ svn_fs_x__representation_cache_key_t key = { 0 }; rep_state_t rs = { 0 }; svn_fs_x__rep_header_t *rep_header; - + /* this function does not apply to representation containers */ SVN_ERR_ASSERT(entry->type >= SVN_FS_X__ITEM_TYPE_FILE_REP && entry->type <= SVN_FS_X__ITEM_TYPE_DIR_PROPS); SVN_ERR_ASSERT(entry->item_count == 1); - /* get / read the representation header */ + /* get / read the representation header */ key.revision = svn_fs_x__get_revnum(entry->items[0].change_set); key.is_packed = svn_fs_x__is_packed_rev(fs, key.revision); key.item_index = entry->items[0].number; @@ -1805,7 +1805,7 @@ get_contents_from_windows(rep_read_baton char *cur = buf; rep_state_t *rs; - /* Special case for when there are no delta reps, only a + /* Special case for when there are no delta reps, only a containered text. */ if (rb->rs_list->nelts == 0 && rb->buf == NULL) { @@ -2106,7 +2106,7 @@ rep_read_contents(void *baton, &rb->src_state, rb->fs, &rb->rep, rb->filehandle_pool, rb->scratch_pool)); - /* In case we did read from the fulltext cache before, make the + /* In case we did read from the fulltext cache before, make the * window stream catch up. Also, initialize the fulltext buffer * if we want to cache the fulltext at the end. */ SVN_ERR(skip_contents(rb, rb->fulltext_delivered)); Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/changes.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/changes.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/changes.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/changes.c Wed Feb 25 08:15:39 2015 @@ -187,7 +187,7 @@ svn_fs_x__changes_append_list(apr_size_t apr_array_header_t *list) { int i; - + /* CHANGES must be in 'builder' mode */ SVN_ERR_ASSERT(changes->builder); SVN_ERR_ASSERT(changes->paths == NULL); @@ -272,7 +272,7 @@ svn_fs_x__changes_get_list(apr_array_hea change->copyfrom_rev = binary_change->copyfrom_rev; change->copyfrom_known = TRUE; if (SVN_IS_VALID_REVNUM(binary_change->copyfrom_rev)) - change->copyfrom_path + change->copyfrom_path = svn_fs_x__string_table_get(changes->paths, binary_change->copyfrom_path, NULL, @@ -338,7 +338,7 @@ svn_fs_x__write_changes_container(svn_st /* 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; } @@ -394,7 +394,7 @@ svn_fs_x__read_changes_container(svn_fs_ } *changes_p = changes; - + return SVN_NO_ERROR; } @@ -520,7 +520,7 @@ svn_fs_x__changes_get_list_func(void **o change->copyfrom_rev = binary_change->copyfrom_rev; change->copyfrom_known = TRUE; if (SVN_IS_VALID_REVNUM(binary_change->copyfrom_rev)) - change->copyfrom_path + change->copyfrom_path = svn_fs_x__string_table_get_func(paths, binary_change->copyfrom_path, NULL, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h Wed Feb 25 08:15:39 2015 @@ -209,7 +209,7 @@ svn_fs_x__dag_node_kind(dag_node_t *node If properties do not exist on NODE, *PROPLIST_P will be set to NULL. - Allocate the result in RESULT_POOL and use SCRATCH_POOL for temporaries. + Allocate the result in RESULT_POOL and use SCRATCH_POOL for temporaries. */ svn_error_t * svn_fs_x__dag_get_proplist(apr_hash_t **proplist_p, Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h Wed Feb 25 08:15:39 2015 @@ -267,7 +267,7 @@ typedef struct svn_fs_x__data_t /* Rev / pack file granularity covered by phys-to-log index pages */ apr_int64_t p2l_page_size; - + /* The revision that was youngest, last time we checked. */ svn_revnum_t youngest_rev_cache; Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_id.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_id.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_id.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_id.c Wed Feb 25 08:15:39 2015 @@ -48,7 +48,7 @@ typedef struct fs_x__id_t /* The state machine behind this is as follows: - + (A) FS passed in during context construction still open and uses a different pool as the context (Usually the initial state). In that case, FS_PATH is NULL and we watch for either pool's cleanup. Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c?rev=1662177&r1=1662176&r2=1662177&view=diff ============================================================================== --- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c (original) +++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c Wed Feb 25 08:15:39 2015 @@ -591,7 +591,7 @@ svn_fs_x__open(svn_fs_t *fs, fs, scratch_pool)); } -/* Baton type bridging svn_fs_x__upgrade and upgrade_body carrying +/* Baton type bridging svn_fs_x__upgrade and upgrade_body carrying * parameters over between them. */ typedef struct upgrade_baton_t { @@ -645,7 +645,7 @@ svn_fs_x__upgrade(svn_fs_t *fs, baton.notify_baton = notify_baton; baton.cancel_func = cancel_func; baton.cancel_baton = cancel_baton; - + return svn_fs_x__with_all_locks(fs, upgrade_body, (void *)&baton, scratch_pool); } @@ -799,7 +799,7 @@ svn_fs_x__file_checksum(svn_checksum_t * { svn_checksum_t temp; temp.kind = kind; - + switch(kind) { case svn_checksum_md5:
