Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_x/transaction.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/transaction.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/transaction.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/transaction.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_fs_x/tree.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/tree.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_fs_x/util.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/util.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/util.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/util.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_fs_x/verify.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_x/verify.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_fs_x/verify.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_fs_x/verify.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra/ra_loader.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra/ra_loader.c Mon Feb 16 17:40:07 2015 @@ -235,6 +235,11 @@ check_ra_version(const svn_version_t *ra 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; } @@ -733,18 +738,19 @@ struct ccw_baton svn_branch_revision_root_t *branching_txn; }; -/* Wrapper which populates the repos_root field of the commit_info struct */ +/* Wrapper which stores the branching/move-tracking info. + */ 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)); - - SVN_ERR(ccwb->original_callback(ci, ccwb->original_baton, pool)); + if (ccwb->original_callback) + { + SVN_ERR(ccwb->original_callback(commit_info, ccwb->original_baton, pool)); + } /* if this commit used element-branching info, store the new info */ if (ccwb->branching_txn) @@ -769,25 +775,17 @@ remap_commit_callback(svn_commit_callbac 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->branching_txn = branching_txn; - ccwb->original_callback = original_callback; - ccwb->original_baton = original_baton; + /* 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->branching_txn = branching_txn; + ccwb->original_callback = original_callback; + ccwb->original_baton = original_baton; - *callback = commit_callback_wrapper; - *callback_baton = ccwb; - } + *callback = commit_callback_wrapper; + *callback_baton = ccwb; } @@ -938,11 +936,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, NULL /*branching_txn*/, - commit_callback, commit_baton, - pool); - SVN_ERR(session->vtable->get_commit_editor(session, editor, edit_baton, revprop_table, commit_callback, commit_baton, @@ -1751,11 +1744,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, NULL, commit_callback, commit_baton, - result_pool); - return svn_error_trace(svn_ra__use_commit_shim( editor, session, Modified: subversion/branches/move-tracking-2/subversion/libsvn_ra_local/ra_plugin.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_local/ra_plugin.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_local/ra_plugin.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_local/ra_plugin.c Mon Feb 16 17:40:07 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; @@ -1599,7 +1659,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; } @@ -1894,6 +1954,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/move-tracking-2/subversion/libsvn_ra_serf/commit.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/commit.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/commit.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/commit.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra_serf/merge.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/merge.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/merge.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/merge.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra_serf/ra_serf.h URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/ra_serf.h?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/ra_serf.h (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/ra_serf.h Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra_serf/serf.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/serf.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/serf.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/serf.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra_serf/update.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/update.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/update.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/update.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra_serf/util.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/util.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/util.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_serf/util.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra_svn/client.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/client.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/client.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/client.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_ra_svn/marshal.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/marshal.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/marshal.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_ra_svn/marshal.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_repos/authz_pool.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/authz_pool.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_repos/authz_pool.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_repos/authz_pool.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_repos/commit.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_repos/commit.c Mon Feb 16 17:40:07 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 = NULL; ### Fixed up in ra-local handling */ 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/move-tracking-2/subversion/libsvn_repos/config_pool.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/config_pool.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_repos/config_pool.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_repos/config_pool.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_repos/dump.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_repos/dump.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_repos/fs-wrap.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/fs-wrap.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_repos/fs-wrap.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_repos/fs-wrap.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_repos/log.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_repos/log.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_repos/log.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_repos/log.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_subr/bit_array.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/bit_array.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/bit_array.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/bit_array.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_subr/cache-membuffer.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/cache-membuffer.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/cache-membuffer.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/cache-membuffer.c Mon Feb 16 17:40:07 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; @@ -2495,7 +2495,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 +2504,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/move-tracking-2/subversion/libsvn_subr/config.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/config.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/config.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/config.c Mon Feb 16 17:40:07 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/move-tracking-2/subversion/libsvn_subr/dirent_uri.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/dirent_uri.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/dirent_uri.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/dirent_uri.c Mon Feb 16 17:40:07 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); Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/dso.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/dso.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/dso.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/dso.c Mon Feb 16 17:40:07 2015 @@ -28,6 +28,7 @@ #include "svn_private_config.h" #include "private/svn_mutex.h" +#include "private/svn_atomic.h" /* A mutex to protect our global pool and cache. */ static svn_mutex__t *dso_mutex = NULL; @@ -41,18 +42,18 @@ static apr_hash_t *dso_cache; /* Just an arbitrary location in memory... */ static int not_there_sentinel; +static volatile svn_atomic_t atomic_init_status = 0; + /* A specific value we store in the dso_cache to indicate that the library wasn't found. This keeps us from allocating extra memory from dso_pool when trying to find libraries we already know aren't there. */ #define NOT_THERE ((void *) ¬_there_sentinel) -svn_error_t * -svn_dso_initialize2(void) +static svn_error_t * +atomic_init_func(void *baton, + apr_pool_t *pool) { - if (dso_pool) - return SVN_NO_ERROR; - dso_pool = svn_pool_create(NULL); SVN_ERR(svn_mutex__init(&dso_mutex, TRUE, dso_pool)); @@ -61,6 +62,15 @@ svn_dso_initialize2(void) return SVN_NO_ERROR; } +svn_error_t * +svn_dso_initialize2(void) +{ + SVN_ERR(svn_atomic__init_once(&atomic_init_status, atomic_init_func, + NULL, NULL)); + + return SVN_NO_ERROR; +} + #if APR_HAS_DSO static svn_error_t * svn_dso_load_internal(apr_dso_handle_t **dso, const char *fname) @@ -107,8 +117,7 @@ svn_dso_load_internal(apr_dso_handle_t * svn_error_t * svn_dso_load(apr_dso_handle_t **dso, const char *fname) { - if (! dso_pool) - SVN_ERR(svn_dso_initialize2()); + SVN_ERR(svn_dso_initialize2()); SVN_MUTEX__WITH_LOCK(dso_mutex, svn_dso_load_internal(dso, fname)); Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/fnv1a.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/fnv1a.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/fnv1a.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/fnv1a.c Mon Feb 16 17:40:07 2015 @@ -34,7 +34,7 @@ */ /* FNV-1 32 bit constants taken from - * http://www.isthe.com/chongo/tech/comp/fnv/ + * http://www.isthe.com/chongo/tech/comp/fnv/ */ #define FNV1_PRIME_32 0x01000193 #define FNV1_BASE_32 2166136261U @@ -47,7 +47,7 @@ fnv1a_32(apr_uint32_t hash, const void * { const unsigned char *data = input; const unsigned char *end = data + len; - + for (; data != end; ++data) { hash ^= *data; @@ -142,7 +142,7 @@ svn_fnv1a_32__context_create(apr_pool_t { svn_fnv1a_32__context_t *context = apr_palloc(pool, sizeof(*context)); context->hash = FNV1_BASE_32; - + return context; } @@ -203,7 +203,7 @@ svn_fnv1a_32x4__update(svn_fnv1a_32x4__c memcpy(context->buffer + context->buffered, data, to_copy); data = (const char *)data + to_copy; len -= to_copy; - + fnv1a_32x4(context->hashes, context->buffer, SCALING); context->buffered = 0; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/gpg_agent.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/gpg_agent.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/gpg_agent.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/gpg_agent.c Mon Feb 16 17:40:07 2015 @@ -209,7 +209,7 @@ find_running_gpg_agent(int *new_sd, apr_ /* This implements the method of finding the socket as described in * the gpg-agent man page under the --use-standard-socket option. - * The manage page misleadingly says the standard socket is + * The manage page misleadingly says the standard socket is * "named 'S.gpg-agent' located in the home directory." The standard * socket path is actually in the .gnupg directory in the home directory, * i.e. ~/.gnupg/S.gpg-agent */ @@ -219,7 +219,7 @@ find_running_gpg_agent(int *new_sd, apr_ apr_array_header_t *socket_details; /* For reference GPG_AGENT_INFO consists of 3 : separated fields. - * The path to the socket, the pid of the gpg-agent process and + * The path to the socket, the pid of the gpg-agent process and * finally the version of the protocol the agent talks. */ socket_details = svn_cstring_split(gpg_agent_info, ":", TRUE, pool); Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/hash.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/hash.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/hash.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/hash.c Mon Feb 16 17:40:07 2015 @@ -597,14 +597,14 @@ svn_hash__get_bool(apr_hash_t *hash, con /*** Optimized hash function ***/ -/* apr_hashfunc_t optimized for the key that we use in SVN: paths and +/* apr_hashfunc_t optimized for the key that we use in SVN: paths and * property names. Its primary goal is speed for keys of known length. - * + * * Since strings tend to spawn large value spaces (usually differ in many * bits with differences spanning a larger section of the key), we can be * quite sloppy extracting a hash value. The more keys there are in a * hash container, the more bits of the value returned by this function - * will be used. For a small number of string keys, choosing bits from any + * will be used. For a small number of string keys, choosing bits from any * any fix location close to the tail of those keys would usually be good * enough to prevent high collision rates. */ Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/io.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/io.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/io.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/io.c Mon Feb 16 17:40:07 2015 @@ -2387,7 +2387,7 @@ stringbuf_from_aprfile(svn_stringbuf_t * res_initial_len, &res->len, &eof, pool)); res->data[res->len] = 0; - + *result = res; return SVN_NO_ERROR; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/object_pool.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/object_pool.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/object_pool.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/object_pool.c Mon Feb 16 17:40:07 2015 @@ -85,7 +85,7 @@ struct svn_object_pool__t /* the root pool owning this structure */ apr_pool_t *pool; - + /* extractor and updater for the user object wrappers */ svn_object_pool__getter_t getter; svn_object_pool__setter_t setter; @@ -171,7 +171,7 @@ static void add_object_ref(object_ref_t *object_ref, apr_pool_t *pool) { - /* Update ref counter. + /* Update ref counter. Note that this is racy with object_ref_cleanup; see comment there. */ if (svn_atomic_inc(&object_ref->ref_count) == 0) svn_atomic_dec(&object_ref->object_pool->unused_count); @@ -275,7 +275,7 @@ insert(void **object, svn_atomic_inc(&object_pool->object_count); /* the new entry is *not* in use yet. - * add_object_ref will update counters again. + * add_object_ref will update counters again. */ svn_atomic_inc(&object_ref->object_pool->unused_count); } @@ -345,7 +345,7 @@ svn_object_pool__create(svn_object_pool_ */ apr_pool_cleanup_register(pool, result, object_pool_cleanup, apr_pool_cleanup_null); - + *object_pool = result; return SVN_NO_ERROR; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/packed_data.c Mon Feb 16 17:40:07 2015 @@ -39,7 +39,7 @@ typedef struct packed_int_private_t { /* First sub-stream, if any. NULL otherwise. */ svn_packed__int_stream_t *first_substream; - + /* Last sub-stream, if any. NULL otherwise. */ svn_packed__int_stream_t *last_substream; @@ -66,7 +66,7 @@ typedef struct packed_int_private_t /* Deltify data before storing it in PACKED. */ svn_boolean_t diff; - + /* Numbers are likely to contain negative values with small absolutes. If TRUE, store the signed bit in LSB before encoding. */ svn_boolean_t is_signed; @@ -141,7 +141,7 @@ svn_packed__data_create_root(apr_pool_t { svn_packed__data_root_t *root = apr_pcalloc(pool, sizeof(*root)); root->pool = pool; - + return root; } @@ -160,7 +160,7 @@ svn_packed__create_int_stream(svn_packed private_data->is_signed = signed_ints; private_data->is_last = TRUE; private_data->pool = root->pool; - + stream->buffer_used = 0; stream->private_data = private_data; @@ -564,7 +564,7 @@ write_stream_data(svn_stream_t *stream, SVN_ERR(svn__compress(uncompressed, compressed, SVN_DELTA_COMPRESSION_LEVEL_DEFAULT)); - + SVN_ERR(write_stream_uint(stream, compressed->len)); SVN_ERR(svn_stream_write(stream, compressed->data, &compressed->len)); @@ -587,7 +587,7 @@ svn_packed__data_write(svn_stream_t *str = svn_stringbuf_create_ensure(1024, scratch_pool); svn_stringbuf_t *uncompressed = svn_stringbuf_create_ensure(1024, scratch_pool); - + /* write tree structure */ svn_stringbuf_t *tree_struct = svn_stringbuf_create_ensure(127, scratch_pool); @@ -613,7 +613,7 @@ svn_packed__data_write(svn_stream_t *str append_int_stream(int_stream, uncompressed); SVN_ERR(write_stream_data(stream, uncompressed, compressed)); } - + for (byte_stream = root->first_byte_stream; byte_stream; byte_stream = byte_stream->next) @@ -849,7 +849,7 @@ svn_packed__data_fill_buffer(svn_packed_ private_data->item_count -= end; } -apr_uint64_t +apr_uint64_t svn_packed__get_uint(svn_packed__int_stream_t *stream) { if (stream->buffer_used == 0) @@ -876,7 +876,7 @@ svn_packed__get_bytes(svn_packed__byte_s /* advance packed buffer */ stream->packed->data += count; - stream->packed->len -= count; + stream->packed->len -= count; stream->packed->blocksize -= count; *len = count; @@ -963,7 +963,7 @@ read_stream_data(svn_stream_t *stream, { apr_uint64_t len; apr_size_t compressed_len; - + SVN_ERR(read_stream_uint(stream, &len)); compressed_len = (apr_size_t)len; @@ -1033,11 +1033,11 @@ svn_packed__data_read(svn_packed__data_r { apr_uint64_t i; apr_uint64_t count; - + svn_packed__int_stream_t *int_stream; svn_packed__byte_stream_t *byte_stream; svn_packed__data_root_t *root = svn_packed__data_create_root(result_pool); - + svn_stringbuf_t *compressed = svn_stringbuf_create_ensure(1024, scratch_pool); svn_stringbuf_t *uncompressed @@ -1052,7 +1052,7 @@ svn_packed__data_read(svn_packed__data_r tree_struct = svn_stringbuf_create_ensure((apr_size_t)tree_struct_size, scratch_pool); tree_struct->len = (apr_size_t)tree_struct_size; - + SVN_ERR(svn_stream_read_full(stream, tree_struct->data, &tree_struct->len)); tree_struct->data[tree_struct->len] = '\0'; @@ -1066,7 +1066,7 @@ svn_packed__data_read(svn_packed__data_r count = read_packed_uint(tree_struct); for (i = 0; i < count; ++i) - read_byte_stream_structure(tree_struct, + read_byte_stream_structure(tree_struct, create_bytes_stream_body(root), root->first_int_stream); Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/prefix_string.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/prefix_string.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/prefix_string.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/prefix_string.c Mon Feb 16 17:40:07 2015 @@ -69,7 +69,7 @@ struct node_t * 0 for the root node. Only then will key.prefix be NULL. */ apr_uint32_t length; - /* Number of entries used in SUB_NODES. */ + /* Number of entries used in SUB_NODES. */ apr_uint32_t sub_node_count; /* The sub-nodes, ordered by first char. node_t and svn_prefix_string__t @@ -136,7 +136,7 @@ search_lower_bound(node_t **sub_nodes, /* Binary search for the lowest position at which to insert KEY. */ while (lower <= upper) { - int current = lower + (upper - lower) / 2; + int current = lower + (upper - lower) / 2; if ((unsigned char)sub_nodes[current]->key.data[0] < key) lower = current + 1; Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/sorts.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/sorts.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/sorts.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/sorts.c Mon Feb 16 17:40:07 2015 @@ -268,10 +268,10 @@ svn_sort__array_lookup(const apr_array_h /* Intend to insert at a position inside the array, i.e. not * at one of the boundaries. The predecessor must be smaller * and the current entry at IDX must be larger than KEY. */ - void *previous; + void *previous; *hint = idx; - previous = array->elts + (idx-1) * array->elt_size; + previous = array->elts + (idx-1) * array->elt_size; result = array->elts + idx * array->elt_size; if (compare_func(previous, key) && !compare_func(result, key)) return result; @@ -484,7 +484,7 @@ svn_priority_queue__create(apr_array_hea for (i = elements->nelts / 2; i >= 0; --i) heap_bubble_up(queue, i); - + return queue; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite.c Mon Feb 16 17:40:07 2015 @@ -879,7 +879,7 @@ internal_open(svn_sqlite__db_t *db, cons /* Open the database. Note that a handle is returned, even when an error occurs (except for out-of-memory); thus, we can safely use it to extract an error message and construct an svn_error_t. SQLite always - requires sqlite3_close() after sqlite3_open_v2() while Subversion + requires sqlite3_close() after sqlite3_open_v2() while Subversion typically does not require close() after an open() that returns an error. So we must ensure we close the handle if this function, or the caller svn_sqlite__open, returns an error to the application. */ @@ -1171,7 +1171,8 @@ svn_sqlite__open(svn_sqlite__db_t **db, affects application(read: Subversion) performance/behavior. */ "PRAGMA foreign_keys=OFF;" /* SQLITE_DEFAULT_FOREIGN_KEYS*/ "PRAGMA locking_mode = NORMAL;" /* SQLITE_DEFAULT_LOCKING_MODE */ - ), + "PRAGMA journal_mode = TRUNCATE;" + ), *db); #if defined(SVN_DEBUG) Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite3wrapper.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite3wrapper.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite3wrapper.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/sqlite3wrapper.c Mon Feb 16 17:40:07 2015 @@ -24,7 +24,7 @@ /* Include sqlite3 inline, making all symbols private. */ #ifdef SVN_SQLITE_INLINE -# define SQLITE_OMIT_DEPRECATED +# define SQLITE_OMIT_DEPRECATED 1 # define SQLITE_API static # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) # pragma GCC diagnostic ignored "-Wunreachable-code" Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/subst.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/subst.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/subst.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/subst.c Mon Feb 16 17:40:07 2015 @@ -1150,7 +1150,7 @@ translate_chunk(svn_stream_t *dst, const char *start = p + len; const char *eol = svn_eol__find_eol_start((char *)start, end - start); - + /* EOL will be NULL if we did not find a line ending */ len += (eol ? eol : end) - start; } @@ -1972,7 +1972,7 @@ svn_subst_translate_string2(svn_string_t return SVN_NO_ERROR; } - if (encoding && !strcmp(encoding, "UTF-8")) + if (encoding && !strcmp(encoding, "UTF-8")) { val_utf8 = value->data; } Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/sysinfo.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/sysinfo.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/sysinfo.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/sysinfo.c Mon Feb 16 17:40:07 2015 @@ -449,7 +449,7 @@ systemd_release(apr_pool_t *pool) if (!strncmp(line->data, "PRETTY_NAME=", 12)) { svn_stringbuf_t *release_name; - + /* The value may or may not be enclosed by double quotes. We don't * attempt to strip them. */ release_name = svn_stringbuf_create(line->data + 12, pool); @@ -1032,7 +1032,7 @@ system_version_plist(svn_boolean_t *serv write_stream = svn_stream_create(&resource, pool); svn_stream_set_write(write_stream, write_to_cfmutabledata); err = svn_stream_copy3(read_stream, write_stream, NULL, NULL, pool); - if (err) + if (err) { svn_error_clear(err); return NULL; Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/types.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/types.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/types.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/types.c Mon Feb 16 17:40:07 2015 @@ -62,14 +62,14 @@ svn_revnum_parse(svn_revnum_t *rev, return svn_error_createf (SVN_ERR_REVNUM_PARSE_FAILURE, NULL, _("Revision number longer than 10 digits '%s'"), str); - + /* we support 32 bit revision numbers only. check for overflows */ if (*str > '2' || (apr_uint32_t)result > APR_INT32_MAX) return svn_error_createf (SVN_ERR_REVNUM_PARSE_FAILURE, NULL, _("Revision number too large '%s'"), str); } - + if (endptr) *endptr = end; Modified: subversion/branches/move-tracking-2/subversion/libsvn_subr/utf.c URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_subr/utf.c?rev=1660173&r1=1660172&r2=1660173&view=diff ============================================================================== --- subversion/branches/move-tracking-2/subversion/libsvn_subr/utf.c (original) +++ subversion/branches/move-tracking-2/subversion/libsvn_subr/utf.c Mon Feb 16 17:40:07 2015 @@ -257,7 +257,7 @@ xlate_alloc_handle(xlate_handle_node_t * later. APR_STRERR will be in the local encoding, not in UTF-8, though. */ svn_strerror(apr_err, apr_strerr, sizeof(apr_strerr)); - return svn_error_createf(SVN_ERR_PLUGIN_LOAD_FAILURE, + return svn_error_createf(SVN_ERR_PLUGIN_LOAD_FAILURE, svn_error_create(apr_err, NULL, apr_strerr), "%s%s", name, errstr); }
