Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 12A53D98C for ; Wed, 24 Oct 2012 01:28:19 +0000 (UTC) Received: (qmail 85185 invoked by uid 500); 24 Oct 2012 01:28:18 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 85162 invoked by uid 500); 24 Oct 2012 01:28:18 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 85153 invoked by uid 99); 24 Oct 2012 01:28:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2012 01:28:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_FRT_CONTACT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Oct 2012 01:28:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 004EF2388A9B; Wed, 24 Oct 2012 01:27:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1401527 [4/6] - in /subversion/branches/auto-props-sdc: ./ build/hudson/ contrib/server-side/fsfsfixer/ notes/ notes/api-errata/1.8/ notes/directory-index/ notes/obliterate/ notes/tree-conflicts/ subversion/bindings/javahl/native/ subversi... Date: Wed, 24 Oct 2012 01:27:21 -0000 To: commits@subversion.apache.org From: pburba@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121024012732.004EF2388A9B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: subversion/branches/auto-props-sdc/subversion/libsvn_subr/version.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_subr/version.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_subr/version.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_subr/version.c Wed Oct 24 01:27:14 2012 @@ -28,6 +28,7 @@ #include "sysinfo.h" #include "svn_private_config.h" +#include "private/svn_subr_private.h" const svn_version_t * svn_subr_version(void) @@ -193,3 +194,85 @@ svn_version_ext_loaded_libs(const svn_ve { return ext_info->loaded_libs; } + +svn_error_t * +svn_version__parse_version_string(svn_version_t **version_p, + const char *version_string, + apr_pool_t *result_pool) +{ + svn_error_t *err; + svn_version_t *version; + apr_array_header_t *pieces = + svn_cstring_split(version_string, ".", FALSE, result_pool); + + if ((pieces->nelts < 2) || (pieces->nelts > 3)) + return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, NULL, NULL); + + version = apr_pcalloc(result_pool, sizeof(*version)); + version->tag = ""; + + /* Parse the major and minor integers strictly. */ + err = svn_cstring_atoi(&(version->major), + APR_ARRAY_IDX(pieces, 0, const char *)); + if (err) + return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, err, NULL); + err = svn_cstring_atoi(&(version->minor), + APR_ARRAY_IDX(pieces, 1, const char *)); + if (err) + return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, err, NULL); + + /* If there's a third component, we'll parse it, too. But we don't + require that it be present. */ + if (pieces->nelts == 3) + { + const char *piece = APR_ARRAY_IDX(pieces, 2, const char *); + char *hyphen = strchr(piece, '-'); + if (hyphen) + { + version->tag = apr_pstrdup(result_pool, hyphen + 1); + *hyphen = '\0'; + } + err = svn_cstring_atoi(&(version->patch), piece); + if (err) + return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, + err, NULL); + } + + *version_p = version; + return SVN_NO_ERROR; +} + + +svn_boolean_t +svn_version__at_least(svn_version_t *version, + int major, + int minor, + int patch) +{ + /* Compare major versions. */ + if (version->major < major) + return FALSE; + if (version->major > major) + return TRUE; + + /* Major versions are the same. Compare minor versions. */ + if (version->minor < minor) + return FALSE; + if (version->minor > minor) + return TRUE; + + /* Major and minor versions are the same. Compare patch + versions. */ + if (version->patch < patch) + return FALSE; + if (version->patch > patch) + return TRUE; + + /* Major, minor, and patch versions are identical matches. But tags + in our schema are always used for versions not yet quite at the + given patch level. */ + if (version->tag && version->tag[0]) + return FALSE; + + return TRUE; +} Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.c Wed Oct 24 01:27:14 2012 @@ -1162,7 +1162,7 @@ svn_wc__conflict_create_markers(svn_skel { const char *propname = svn__apr_hash_index_key(hi); - prop_conflict_skel_add( + SVN_ERR(prop_conflict_skel_add( prop_data, propname, old_props ? apr_hash_get(old_props, propname, @@ -1180,7 +1180,7 @@ svn_wc__conflict_create_markers(svn_skel ? apr_hash_get(their_original_props, propname, APR_HASH_KEY_STRING) : NULL, - result_pool, scratch_pool); + result_pool, scratch_pool)); } SVN_ERR(svn_wc__wq_build_prej_install(work_items, @@ -2000,9 +2000,9 @@ read_prop_conflicts(apr_array_header_t * if (my_value == NULL) desc->reason = svn_wc_conflict_reason_deleted; else if (their_value == NULL) - desc->action = svn_wc_conflict_reason_added; + desc->reason = svn_wc_conflict_reason_added; else - desc->action = svn_wc_conflict_reason_edited; + desc->reason = svn_wc_conflict_reason_edited; /* ### This should be changed. The prej file should be stored * ### separately from the other files. We need to rev the @@ -2243,6 +2243,7 @@ resolve_conflict_on_node(svn_boolean_t * svn_boolean_t resolve_props, svn_boolean_t resolve_tree, svn_wc_conflict_choice_t conflict_choice, + svn_skel_t *work_items, svn_cancel_func_t cancel_func_t, void *cancel_baton, apr_pool_t *scratch_pool) @@ -2252,7 +2253,6 @@ resolve_conflict_on_node(svn_boolean_t * svn_boolean_t text_conflicted; svn_boolean_t prop_conflicted; svn_boolean_t tree_conflicted; - svn_skel_t *work_items = NULL; svn_skel_t *work_item; apr_pool_t *pool = scratch_pool; @@ -2542,6 +2542,7 @@ svn_wc__resolve_text_conflict(svn_wc__db FALSE /* resolve_props */, FALSE /* resolve_tree */, svn_wc_conflict_choose_merged, + NULL, NULL, NULL, /* cancel_func */ scratch_pool)); } @@ -2591,6 +2592,8 @@ conflict_status_walker(void *baton, const svn_wc_conflict_description2_t *cd; svn_boolean_t did_resolve; svn_wc_conflict_choice_t my_choice = cswb->conflict_choice; + svn_skel_t *work_items = NULL; + cd = APR_ARRAY_IDX(conflicts, i, const svn_wc_conflict_description2_t *); @@ -2621,15 +2624,32 @@ conflict_status_walker(void *baton, if (!cswb->resolve_tree) break; - /* For now, we only clear tree conflict information and resolve - * to the working state. There is no way to pick theirs-full - * or mine-full, etc. Throw an error if the user expects us - * to be smarter than we really are. */ - if (my_choice != svn_wc_conflict_choose_merged) + /* After updates, we can resolve local moved-away vs. any incoming + * change, either by updating the moved-away node (mine-conflict) + * or by breaking the move (theirs-conflict). */ + if ((cd->operation == svn_wc_operation_update || + cd->operation == svn_wc_operation_switch) && + cd->reason == svn_wc_conflict_reason_moved_away) + { + if (my_choice == svn_wc_conflict_choose_mine_conflict) + SVN_ERR(svn_wc__update_moved_away_conflict_victim( + &work_items, local_abspath, cswb->db, + cswb->notify_func, cswb->notify_baton, + cswb->cancel_func, cswb->cancel_baton, + scratch_pool, scratch_pool)); + else if (my_choice == svn_wc_conflict_choose_theirs_conflict) + { + /* ### TODO break move */ + } + } + else if (my_choice != svn_wc_conflict_choose_merged) { + /* For other tree conflicts, there is no way to pick + * theirs-full or mine-full, etc. Throw an error if the + * user expects us to be smarter than we really are. */ return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Tree conflicts can only be " + _("Tree conflict can only be " "resolved to 'working' state; " "'%s' not resolved"), svn_dirent_local_style(local_abspath, @@ -2643,6 +2663,7 @@ conflict_status_walker(void *baton, FALSE /* resolve_props */, TRUE /* resolve_tree */, my_choice, + work_items, cswb->cancel_func, cswb->cancel_baton, iterpool)); @@ -2661,6 +2682,7 @@ conflict_status_walker(void *baton, FALSE /* resolve_props */, FALSE /* resolve_tree */, my_choice, + NULL, cswb->cancel_func, cswb->cancel_baton, iterpool)); @@ -2690,6 +2712,7 @@ conflict_status_walker(void *baton, TRUE /* resolve_props */, FALSE /* resolve_tree */, my_choice, + NULL, cswb->cancel_func, cswb->cancel_baton, iterpool)); Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.h URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.h?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.h (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/conflicts.h Wed Oct 24 01:27:14 2012 @@ -394,6 +394,20 @@ svn_wc__resolve_text_conflict(svn_wc__db const char *local_abspath, apr_pool_t *scratch_pool); +/* Update a moved-away tree conflict victim at VICTIM_ABSPATH with changes + * brought in by the update operation which flagged the tree conflict. + * Set *WORK_ITEMS to a list of work items, allocated in RESULT_POOL, that + * need to run as part of marking the conflict resolved. */ +svn_error_t * +svn_wc__update_moved_away_conflict_victim(svn_skel_t **work_items, + const char *victim_abspath, + svn_wc__db_t *db, + svn_wc_notify_func2_t notify_func, + void *notify_baton, + svn_cancel_func_t cancel_func, + void *cancel_baton, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); #ifdef __cplusplus } Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/node.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/node.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/node.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/node.c Wed Oct 24 01:27:14 2012 @@ -782,30 +782,12 @@ svn_wc__node_get_deleted_ancestor(const } svn_error_t * -svn_wc__node_is_status_server_excluded(svn_boolean_t *is_server_excluded, - svn_wc_context_t *wc_ctx, - const char *local_abspath, - apr_pool_t *scratch_pool) -{ - svn_wc__db_status_t status; - - SVN_ERR(svn_wc__db_read_info(&status, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, - wc_ctx->db, local_abspath, - scratch_pool, scratch_pool)); - *is_server_excluded = (status == svn_wc__db_status_server_excluded); - - return SVN_NO_ERROR; -} - -svn_error_t * -svn_wc__node_is_status_not_present(svn_boolean_t *is_not_present, - svn_wc_context_t *wc_ctx, - const char *local_abspath, - apr_pool_t *scratch_pool) +svn_wc__node_is_not_present(svn_boolean_t *is_not_present, + svn_boolean_t *is_excluded, + svn_boolean_t *is_server_excluded, + svn_wc_context_t *wc_ctx, + const char *local_abspath, + apr_pool_t *scratch_pool) { svn_wc__db_status_t status; @@ -816,27 +798,15 @@ svn_wc__node_is_status_not_present(svn_b NULL, NULL, NULL, NULL, NULL, wc_ctx->db, local_abspath, scratch_pool, scratch_pool)); - *is_not_present = (status == svn_wc__db_status_not_present); - return SVN_NO_ERROR; -} + if (is_not_present) + *is_not_present = (status == svn_wc__db_status_not_present); -svn_error_t * -svn_wc__node_is_status_excluded(svn_boolean_t *is_excluded, - svn_wc_context_t *wc_ctx, - const char *local_abspath, - apr_pool_t *scratch_pool) -{ - svn_wc__db_status_t status; + if (is_excluded) + *is_excluded = (status == svn_wc__db_status_excluded); - SVN_ERR(svn_wc__db_read_info(&status, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, - wc_ctx->db, local_abspath, - scratch_pool, scratch_pool)); - *is_excluded = (status == svn_wc__db_status_excluded); + if (is_server_excluded) + *is_server_excluded = (status == svn_wc__db_status_server_excluded); return SVN_NO_ERROR; } Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/tree_conflicts.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/tree_conflicts.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/tree_conflicts.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/tree_conflicts.c Wed Oct 24 01:27:14 2012 @@ -182,11 +182,12 @@ read_node_version_info(const svn_wc_conf skel->children->next->next->next->next)); kind = (svn_node_kind_t)n; - *version_info = svn_wc_conflict_version_create(repos_root, - repos_relpath, - peg_rev, - kind, - result_pool); + *version_info = svn_wc_conflict_version_create2(repos_root, + NULL, + repos_relpath, + peg_rev, + kind, + result_pool); return SVN_NO_ERROR; } Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/update_editor.c Wed Oct 24 01:27:14 2012 @@ -1629,7 +1629,7 @@ delete_entry(const char *path, if (is_root) { /* Just skip this node; a future update will handle it */ - remember_skipped_tree(eb, local_abspath, pool); + SVN_ERR(remember_skipped_tree(eb, local_abspath, pool)); do_notification(eb, local_abspath, svn_node_unknown, svn_wc_notify_update_skip_obstruction, scratch_pool); @@ -1918,7 +1918,7 @@ add_directory(const char *path, NULL, NULL, pool)); - remember_skipped_tree(eb, db->local_abspath, pool); + SVN_ERR(remember_skipped_tree(eb, db->local_abspath, pool)); db->skip_this = TRUE; db->already_notified = TRUE; @@ -1942,7 +1942,7 @@ add_directory(const char *path, file externals. */ - remember_skipped_tree(eb, db->local_abspath, pool); + SVN_ERR(remember_skipped_tree(eb, db->local_abspath, pool)); db->skip_this = TRUE; db->already_notified = TRUE; @@ -2200,7 +2200,7 @@ open_directory(const char *path, if (is_root) { /* Just skip this node; a future update will handle it */ - remember_skipped_tree(eb, db->local_abspath, pool); + SVN_ERR(remember_skipped_tree(eb, db->local_abspath, pool)); db->skip_this = TRUE; db->already_notified = TRUE; @@ -2993,7 +2993,7 @@ add_file(const char *path, apr_hash_set(pb->not_present_files, apr_pstrdup(pb->pool, fb->name), APR_HASH_KEY_STRING, (void*)1); - remember_skipped_tree(eb, fb->local_abspath, pool); + SVN_ERR(remember_skipped_tree(eb, fb->local_abspath, pool)); fb->skip_this = TRUE; fb->already_notified = TRUE; @@ -3018,7 +3018,7 @@ add_file(const char *path, The reason we get here is that the adm crawler doesn't report file externals. */ - remember_skipped_tree(eb, fb->local_abspath, pool); + SVN_ERR(remember_skipped_tree(eb, fb->local_abspath, pool)); fb->skip_this = TRUE; fb->already_notified = TRUE; @@ -3263,7 +3263,7 @@ open_file(const char *path, if (is_root) { /* Just skip this node; a future update will handle it */ - remember_skipped_tree(eb, fb->local_abspath, pool); + SVN_ERR(remember_skipped_tree(eb, fb->local_abspath, pool)); fb->skip_this = TRUE; fb->already_notified = TRUE; Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc-queries.sql URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc-queries.sql?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc-queries.sql (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc-queries.sql Wed Oct 24 01:27:14 2012 @@ -1040,6 +1040,9 @@ FROM nodes_current n WHERE (wc_id = ?1 AND local_relpath = ?2) OR (wc_id = ?1 AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)) +-- STMT_PRAGMA_LOCKING_MODE +PRAGMA locking_mode = exclusive + /* ------------------------------------------------------------------------- */ /* these are used in entries.c */ Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.c Wed Oct 24 01:27:14 2012 @@ -1508,13 +1508,14 @@ create_db(svn_sqlite__db_t **sdb, const char *root_node_repos_relpath, svn_revnum_t root_node_revision, svn_depth_t root_node_depth, + svn_boolean_t exclusive, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { struct init_db_baton idb; SVN_ERR(svn_wc__db_util_open_db(sdb, dir_abspath, sdb_fname, - svn_sqlite__mode_rwcreate, + svn_sqlite__mode_rwcreate, exclusive, NULL /* my_statements */, result_pool, scratch_pool)); @@ -1547,6 +1548,7 @@ svn_wc__db_init(svn_wc__db_t *db, apr_int64_t repos_id; apr_int64_t wc_id; svn_wc__db_wcroot_t *wcroot; + svn_boolean_t sqlite_exclusive = FALSE; SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath)); SVN_ERR_ASSERT(repos_relpath != NULL); @@ -1557,10 +1559,15 @@ svn_wc__db_init(svn_wc__db_t *db, /* ### REPOS_ROOT_URL and REPOS_UUID may be NULL. ... more doc: tbd */ + SVN_ERR(svn_config_get_bool((svn_config_t *)db->config, &sqlite_exclusive, + SVN_CONFIG_SECTION_WORKING_COPY, + SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE, + FALSE)); + /* Create the SDB and insert the basic rows. */ SVN_ERR(create_db(&sdb, &repos_id, &wc_id, local_abspath, repos_root_url, repos_uuid, SDB_FILE, - repos_relpath, initial_rev, depth, + repos_relpath, initial_rev, depth, sqlite_exclusive, db->state_pool, scratch_pool)); /* Create the WCROOT for this directory. */ @@ -11498,10 +11505,13 @@ svn_wc__db_upgrade_begin(svn_sqlite__db_ apr_pool_t *scratch_pool) { svn_wc__db_wcroot_t *wcroot; + + /* Upgrade is inherently exclusive so specify exclusive locking. */ SVN_ERR(create_db(sdb, repos_id, wc_id, dir_abspath, repos_root_url, repos_uuid, SDB_FILE, NULL, SVN_INVALID_REVNUM, svn_depth_unknown, + TRUE /* exclusive */, wc_db->state_pool, scratch_pool)); SVN_ERR(svn_wc__db_pdh_create_wcroot(&wcroot, Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.h URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.h?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.h (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db.h Wed Oct 24 01:27:14 2012 @@ -255,7 +255,7 @@ typedef struct svn_wc__db_lock_t { */ svn_error_t * svn_wc__db_open(svn_wc__db_t **db, - const svn_config_t *config, + svn_config_t *config, svn_boolean_t auto_upgrade, svn_boolean_t enforce_empty_wq, apr_pool_t *result_pool, @@ -1929,7 +1929,7 @@ struct svn_wc__db_info_t { svn_boolean_t incomplete; /* TRUE if a working node is incomplete */ const char *moved_to_abspath; /* Only on op-roots. See svn_wc_status3_t. */ - svn_boolean_t moved_here; /* On both op-roots and children. */ + svn_boolean_t moved_here; /* Only on op-roots. */ svn_boolean_t file_external; }; Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_private.h URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_private.h?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_private.h (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_private.h Wed Oct 24 01:27:14 2012 @@ -36,7 +36,7 @@ struct svn_wc__db_t { /* We need the config whenever we run into a new WC directory, in order to figure out where we should look for the corresponding datastore. */ - const svn_config_t *config; + svn_config_t *config; /* Should we attempt to automatically upgrade the database when it is opened, and found to be not-current? */ @@ -170,6 +170,7 @@ svn_wc__db_util_open_db(svn_sqlite__db_t const char *dir_abspath, const char *sdb_fname, svn_sqlite__mode_t smode, + svn_boolean_t exclusive, const char *const *my_statements, apr_pool_t *result_pool, apr_pool_t *scratch_pool); Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_util.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_util.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_util.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_util.c Wed Oct 24 01:27:14 2012 @@ -114,6 +114,7 @@ svn_wc__db_util_open_db(svn_sqlite__db_t const char *dir_abspath, const char *sdb_fname, svn_sqlite__mode_t smode, + svn_boolean_t exclusive, const char *const *my_statements, apr_pool_t *result_pool, apr_pool_t *scratch_pool) @@ -140,6 +141,9 @@ svn_wc__db_util_open_db(svn_sqlite__db_t my_statements ? my_statements : statements, 0, NULL, result_pool, scratch_pool)); + if (exclusive) + SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_PRAGMA_LOCKING_MODE)); + SVN_ERR(svn_sqlite__create_scalar_function(*sdb, "relpath_depth", 1, relpath_depth, NULL)); Modified: subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c (original) +++ subversion/branches/auto-props-sdc/subversion/libsvn_wc/wc_db_wcroot.c Wed Oct 24 01:27:14 2012 @@ -186,7 +186,7 @@ close_wcroot(void *data) svn_error_t * svn_wc__db_open(svn_wc__db_t **db, - const svn_config_t *config, + svn_config_t *config, svn_boolean_t auto_upgrade, svn_boolean_t enforce_empty_wq, apr_pool_t *result_pool, @@ -508,6 +508,18 @@ svn_wc__db_wcroot_parse_local_abspath(sv if (adm_subdir_kind == svn_node_dir) { + svn_boolean_t sqlite_exclusive = FALSE; + + err = svn_config_get_bool(db->config, &sqlite_exclusive, + SVN_CONFIG_SECTION_WORKING_COPY, + SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE, + FALSE); + if (err) + { + svn_error_clear(err); + sqlite_exclusive = FALSE; + } + /* We always open the database in read/write mode. If the database isn't writable in the filesystem, SQLite will internally open it as read-only, and we'll get an error if we try to do a write @@ -517,7 +529,8 @@ svn_wc__db_wcroot_parse_local_abspath(sv we're caching database handles, it make sense to be as permissive as the filesystem allows. */ err = svn_wc__db_util_open_db(&sdb, local_abspath, SDB_FILE, - svn_sqlite__mode_readwrite, NULL, + svn_sqlite__mode_readwrite, + sqlite_exclusive, NULL, db->state_pool, scratch_pool); if (err == NULL) { @@ -731,6 +744,9 @@ try_symlink_as_dir: { SVN_ERR(read_link_target(&local_abspath, original_abspath, scratch_pool)); + /* This handle was opened in this function but is not going + to be used further so close it. */ + SVN_ERR(svn_sqlite__close(sdb)); goto try_symlink_as_dir; } } Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/dav_svn.h Wed Oct 24 01:27:14 2012 @@ -304,13 +304,6 @@ svn_boolean_t dav_svn__get_autoversionin /* for the repository referred to by this request, are bulk updates allowed? */ svn_boolean_t dav_svn__get_bulk_updates_flag(request_rec *r); -/* for the repository referred to by this request, should httpv2 be advertised? */ -svn_boolean_t dav_svn__get_v2_protocol_flag(request_rec *r); - -/* for the repository referred to by this request, should ephemeral - txnprop support be advertised? */ -svn_boolean_t dav_svn__get_ephemeral_txnprops_flag(request_rec *r); - /* for the repository referred to by this request, are subrequests active? */ svn_boolean_t dav_svn__get_pathauthz_flag(request_rec *r); @@ -332,6 +325,17 @@ authz_svn__subreq_bypass_func_t dav_svn_ SVNParentPath allowed? */ svn_boolean_t dav_svn__get_list_parentpath_flag(request_rec *r); +/* For the repository referred to by this request, should HTTPv2 + protocol support be advertised? Note that this also takes into + account the support level expected of based on the specified + master server version (if provided via SVNMasterVersion). */ +svn_boolean_t dav_svn__check_httpv2_support(request_rec *r); + +/* For the repository referred to by this request, should ephemeral + txnprop support be advertised? */ +svn_boolean_t dav_svn__check_ephemeral_txnprops_support(request_rec *r); + + /* SPECIAL URI @@ -380,6 +384,11 @@ const char *dav_svn__get_xslt_uri(reques /* ### Is this assumed to be URI-encoded? */ const char *dav_svn__get_master_uri(request_rec *r); +/* Return the version of the master server (used for mirroring) iff a + master URI is in place for this location; otherwise, return NULL. + Comes from the directive. */ +svn_version_t *dav_svn__get_master_version(request_rec *r); + /* Return the disk path to the activities db. Comes from the directive. */ const char *dav_svn__get_activities_db(request_rec *r); @@ -390,7 +399,7 @@ const char *dav_svn__get_activities_db(r const char *dav_svn__get_root_dir(request_rec *r); /* Return the data compression level to be used over the wire. */ -int dav_svn__get_compression_level(void); +int dav_svn__get_compression_level(request_rec *r); /* Return the hook script environment parsed from the configuration. */ const char *dav_svn__get_hooks_env(request_rec *r); Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/deadprops.c Wed Oct 24 01:27:14 2012 @@ -514,10 +514,6 @@ db_store(dav_db *db, /* ### namespace check? */ if (elem->first_child && !strcmp(elem->first_child->name, SVN_DAV__OLD_VALUE)) { - const char *propname; - - get_repos_propname(db, name, &propname); - /* Parse OLD_PROPVAL. */ old_propval = svn_string_create(dav_xml_get_cdata(elem->first_child, pool, 0 /* strip_white */), Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/mod_dav_svn.c Wed Oct 24 01:27:14 2012 @@ -42,6 +42,7 @@ #include "mod_dav_svn.h" #include "private/svn_fspath.h" +#include "private/svn_subr_private.h" #include "dav_svn.h" #include "mod_authz_svn.h" @@ -59,6 +60,12 @@ typedef struct server_conf_t { const char *special_uri; svn_boolean_t use_utf8; + + /* The compression level we will pass to svn_txdelta_to_svndiff3() + * for wire-compression. Negative value used to specify default + compression level. */ + int compression_level; + } server_conf_t; @@ -88,11 +95,11 @@ typedef struct dir_conf_t { enum conf_flag autoversioning; /* whether autoversioning is active */ enum conf_flag bulk_updates; /* whether bulk updates are allowed */ enum conf_flag v2_protocol; /* whether HTTP v2 is advertised */ - enum conf_flag ephemeral_txnprops; /* advertise ephemeral txnprop support? */ enum path_authz_conf path_authz_method; /* how GET subrequests are handled */ enum conf_flag list_parentpath; /* whether to allow GET of parentpath */ const char *root_dir; /* our top-level directory */ const char *master_uri; /* URI to the master SVN repos */ + svn_version_t *master_version; /* version of master server */ const char *activities_db; /* path to activities database(s) */ enum conf_flag txdelta_cache; /* whether to enable txdelta caching */ enum conf_flag fulltext_cache; /* whether to enable fulltext caching */ @@ -110,10 +117,6 @@ extern module AP_MODULE_DECLARE_DATA dav /* The authz_svn provider for bypassing path authz. */ static authz_svn__subreq_bypass_func_t pathauthz_bypass_func = NULL; -/* The compression level we will pass to svn_txdelta_to_svndiff3() - * for wire-compression */ -static int svn__compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT; - static int init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { @@ -164,7 +167,11 @@ init_dso(apr_pool_t *pconf, apr_pool_t * static void * create_server_config(apr_pool_t *p, server_rec *s) { - return apr_pcalloc(p, sizeof(server_conf_t)); + server_conf_t *conf = apr_pcalloc(p, sizeof(server_conf_t)); + + conf->compression_level = -1; + + return conf; } @@ -180,6 +187,17 @@ merge_server_config(apr_pool_t *p, void newconf->special_uri = INHERIT_VALUE(parent, child, special_uri); + if (child->compression_level < 0) + { + /* Inherit compression level from parent if not configured for this + VirtualHost. */ + newconf->compression_level = parent->compression_level; + } + else + { + newconf->compression_level = child->compression_level; + } + return newconf; } @@ -197,7 +215,6 @@ create_dir_config(apr_pool_t *p, char *d conf->root_dir = svn_urlpath__canonicalize(dir, p); conf->bulk_updates = CONF_FLAG_ON; conf->v2_protocol = CONF_FLAG_ON; - conf->ephemeral_txnprops = CONF_FLAG_ON; conf->hooks_env = NULL; return conf; @@ -216,6 +233,7 @@ merge_dir_config(apr_pool_t *p, void *ba newconf->fs_path = INHERIT_VALUE(parent, child, fs_path); newconf->master_uri = INHERIT_VALUE(parent, child, master_uri); + newconf->master_version = INHERIT_VALUE(parent, child, master_version); newconf->activities_db = INHERIT_VALUE(parent, child, activities_db); newconf->repo_name = INHERIT_VALUE(parent, child, repo_name); newconf->xslt_uri = INHERIT_VALUE(parent, child, xslt_uri); @@ -223,8 +241,6 @@ merge_dir_config(apr_pool_t *p, void *ba newconf->autoversioning = INHERIT_VALUE(parent, child, autoversioning); newconf->bulk_updates = INHERIT_VALUE(parent, child, bulk_updates); newconf->v2_protocol = INHERIT_VALUE(parent, child, v2_protocol); - newconf->ephemeral_txnprops = INHERIT_VALUE(parent, child, - ephemeral_txnprops); newconf->path_authz_method = INHERIT_VALUE(parent, child, path_authz_method); newconf->list_parentpath = INHERIT_VALUE(parent, child, list_parentpath); newconf->txdelta_cache = INHERIT_VALUE(parent, child, txdelta_cache); @@ -286,6 +302,25 @@ SVNMasterURI_cmd(cmd_parms *cmd, void *c static const char * +SVNMasterVersion_cmd(cmd_parms *cmd, void *config, const char *arg1) +{ + dir_conf_t *conf = config; + svn_error_t *err; + svn_version_t *version; + + err = svn_version__parse_version_string(&version, arg1, cmd->pool); + if (err) + { + svn_error_clear(err); + return "Malformed master server version string."; + } + + conf->master_version = version; + return NULL; +} + + +static const char * SVNActivitiesDB_cmd(cmd_parms *cmd, void *config, const char *arg1) { dir_conf_t *conf = config; @@ -350,20 +385,6 @@ SVNAdvertiseV2Protocol_cmd(cmd_parms *cm static const char * -SVNAdvertiseEphemeralTXNProps_cmd(cmd_parms *cmd, void *config, int arg) -{ - dir_conf_t *conf = config; - - if (arg) - conf->ephemeral_txnprops = CONF_FLAG_ON; - else - conf->ephemeral_txnprops = CONF_FLAG_OFF; - - return NULL; -} - - -static const char * SVNPathAuthz_cmd(cmd_parms *cmd, void *config, const char *arg1) { dir_conf_t *conf = config; @@ -531,6 +552,7 @@ SVNInMemoryCacheSize_cmd(cmd_parms *cmd, static const char * SVNCompressionLevel_cmd(cmd_parms *cmd, void *config, const char *arg1) { + server_conf_t *conf; int value = 0; svn_error_t *err = svn_cstring_atoi(&value, arg1); if (err) @@ -548,7 +570,9 @@ SVNCompressionLevel_cmd(cmd_parms *cmd, (int)SVN_DELTA_COMPRESSION_LEVEL_NONE, (int)SVN_DELTA_COMPRESSION_LEVEL_MAX); - svn__compression_level = value; + conf = ap_get_module_config(cmd->server->module_config, + &dav_svn_module); + conf->compression_level = value; return NULL; } @@ -673,6 +697,16 @@ dav_svn__get_master_uri(request_rec *r) } +svn_version_t * +dav_svn__get_master_version(request_rec *r) +{ + dir_conf_t *conf; + + conf = ap_get_module_config(r->per_dir_config, &dav_svn_module); + return conf->master_uri ? conf->master_version : NULL; +} + + const char * dav_svn__get_xslt_uri(request_rec *r) { @@ -770,22 +804,39 @@ dav_svn__get_bulk_updates_flag(request_r svn_boolean_t -dav_svn__get_v2_protocol_flag(request_rec *r) +dav_svn__check_httpv2_support(request_rec *r) { dir_conf_t *conf; + svn_boolean_t available; conf = ap_get_module_config(r->per_dir_config, &dav_svn_module); - return conf->v2_protocol == CONF_FLAG_ON; + available = conf->v2_protocol == CONF_FLAG_ON; + + /* If our configuration says that HTTPv2 is available, but we are + proxying requests to a master Subversion server which lacks + support for HTTPv2, we dumb ourselves down. */ + if (available) + { + svn_version_t *version = dav_svn__get_master_version(r); + if (version && (! svn_version__at_least(version, 1, 7, 0))) + available = FALSE; + } + return available; } svn_boolean_t -dav_svn__get_ephemeral_txnprops_flag(request_rec *r) +dav_svn__check_ephemeral_txnprops_support(request_rec *r) { - dir_conf_t *conf; + svn_version_t *version = dav_svn__get_master_version(r); - conf = ap_get_module_config(r->per_dir_config, &dav_svn_module); - return conf->ephemeral_txnprops == CONF_FLAG_ON; + /* We know this server supports ephemeral txnprops. But if we're + proxying requests to a master server, we need to see if it + supports them, too. */ + if (version && (! svn_version__at_least(version, 1, 8, 0))) + return FALSE; + + return TRUE; } @@ -867,9 +918,21 @@ dav_svn__get_revprop_cache_flag(request_ int -dav_svn__get_compression_level(void) +dav_svn__get_compression_level(request_rec *r) { - return svn__compression_level; + server_conf_t *conf; + + conf = ap_get_module_config(r->server->module_config, + &dav_svn_module); + + if (conf->compression_level < 0) + { + return SVN_DELTA_COMPRESSION_LEVEL_DEFAULT; + } + else + { + return conf->compression_level; + } } const char * @@ -1071,6 +1134,11 @@ static const command_rec cmds[] = "specifies a URI to access a master Subversion repository"), /* per directory/location */ + AP_INIT_TAKE1("SVNMasterVersion", SVNMasterVersion_cmd, NULL, ACCESS_CONF, + "specifies the Subversion release version of a master " + "Subversion server "), + + /* per directory/location */ AP_INIT_TAKE1("SVNActivitiesDB", SVNActivitiesDB_cmd, NULL, ACCESS_CONF, "specifies the location in the filesystem in which the " "activities database(s) should be stored"), @@ -1089,12 +1157,6 @@ static const command_rec cmds[] = "Subversion's HTTP protocol (default values is On)."), /* per directory/location */ - AP_INIT_FLAG("SVNAdvertiseEphemeralTXNProps", - SVNAdvertiseEphemeralTXNProps_cmd, NULL, ACCESS_CONF|RSRC_CONF, - "enables server advertising of support for ephemeral " - "commit transaction properties (default value is On)."), - - /* per directory/location */ AP_INIT_FLAG("SVNCacheTextDeltas", SVNCacheTextDeltas_cmd, NULL, ACCESS_CONF|RSRC_CONF, "speeds up data access to older revisions by caching " Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/file-revs.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/file-revs.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/file-revs.c (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/file-revs.c Wed Oct 24 01:27:14 2012 @@ -52,6 +52,9 @@ struct file_rev_baton { /* SVNDIFF version to use when sending to client. */ int svndiff_version; + /* Compression level to use for SVNDIFF. */ + int compression_level; + /* Used by the delta iwndow handler. */ svn_txdelta_window_handler_t window_handler; void *window_baton; @@ -208,7 +211,7 @@ file_rev_handler(void *baton, pool); svn_txdelta_to_svndiff3(&frb->window_handler, &frb->window_baton, base64_stream, frb->svndiff_version, - dav_svn__get_compression_level(), pool); + frb->compression_level, pool); *window_handler = delta_window_handler; *window_baton = frb; /* Start the txdelta element wich will be terminated by the window @@ -306,6 +309,7 @@ dav_svn__file_revs_report(const dav_reso frb.output = output; frb.needs_header = TRUE; frb.svndiff_version = resource->info->svndiff_version; + frb.compression_level = dav_svn__get_compression_level(resource->info->r); /* file_rev_handler will send header first time it is called. */ Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/replay.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/replay.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/replay.c (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/replay.c Wed Oct 24 01:27:14 2012 @@ -47,6 +47,7 @@ typedef struct edit_baton_t { ap_filter_t *output; svn_boolean_t started; svn_boolean_t sending_textdelta; + int compression_level; } edit_baton_t; @@ -326,7 +327,7 @@ apply_textdelta(void *file_baton, eb->output, pool), 0, - dav_svn__get_compression_level(), + eb->compression_level, pool); eb->sending_textdelta = TRUE; @@ -367,6 +368,7 @@ make_editor(const svn_delta_editor_t **e void **edit_baton, apr_bucket_brigade *bb, ap_filter_t *output, + int compression_level, apr_pool_t *pool) { edit_baton_t *eb = apr_pcalloc(pool, sizeof(*eb)); @@ -376,6 +378,7 @@ make_editor(const svn_delta_editor_t **e eb->output = output; eb->started = FALSE; eb->sending_textdelta = FALSE; + eb->compression_level = compression_level; e->set_target_revision = set_target_revision; e->open_root = open_root; @@ -506,7 +509,9 @@ dav_svn__replay_report(const dav_resourc goto cleanup; } - make_editor(&editor, &edit_baton, bb, output, resource->pool); + make_editor(&editor, &edit_baton, bb, output, + dav_svn__get_compression_level(resource->info->r), + resource->pool); if ((err = svn_repos_replay2(root, base_dir, low_water_mark, send_deltas, editor, edit_baton, Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/reports/update.c Wed Oct 24 01:27:14 2012 @@ -88,6 +88,9 @@ typedef struct update_ctx_t { /* SVNDIFF version to send to client. */ int svndiff_version; + /* Compression level of SVNDIFF deltas. */ + int compression_level; + /* Did the client submit this REPORT request via the HTTPv2 "me resource" and are we advertising support for as much? */ svn_boolean_t enable_v2_response; @@ -840,7 +843,7 @@ upd_apply_textdelta(void *file_baton, svn_txdelta_to_svndiff3(&(wb->handler), &(wb->handler_baton), base64_stream, file->uc->svndiff_version, - dav_svn__get_compression_level(), file->pool); + file->uc->compression_level, file->pool); *handler = window_handler; *handler_baton = wb; @@ -1150,6 +1153,7 @@ dav_svn__update_report(const dav_resourc } uc.svndiff_version = resource->info->svndiff_version; + uc.compression_level = dav_svn__get_compression_level(resource->info->r); uc.resource = resource; uc.output = output; uc.anchor = src_path; Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/repos.c Wed Oct 24 01:27:14 2012 @@ -1502,7 +1502,7 @@ get_parentpath_resource(request_rec *r, repos->xslt_uri = dav_svn__get_xslt_uri(r); repos->autoversioning = dav_svn__get_autoversioning_flag(r); repos->bulk_updates = dav_svn__get_bulk_updates_flag(r); - repos->v2_protocol = dav_svn__get_v2_protocol_flag(r); + repos->v2_protocol = dav_svn__check_httpv2_support(r); repos->base_url = ap_construct_url(r->pool, "", r); repos->special_uri = dav_svn__get_special_uri(r); repos->username = r->user; @@ -2082,7 +2082,7 @@ get_resource(request_rec *r, repos->bulk_updates = dav_svn__get_bulk_updates_flag(r); /* Are we advertising HTTP v2 protocol support? */ - repos->v2_protocol = dav_svn__get_v2_protocol_flag(r); + repos->v2_protocol = dav_svn__check_httpv2_support(r); /* Path to activities database */ repos->activities_db = dav_svn__get_activities_db(r); @@ -2223,8 +2223,12 @@ get_resource(request_rec *r, } /* Configure hook script environment variables. */ - svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r), - r->connection->pool, r->pool); + serr = svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r), + r->connection->pool, r->pool); + if (serr) + return dav_svn__sanitize_error(serr, + "Error settings hooks environment", + HTTP_INTERNAL_SERVER_ERROR, r); } /* cache the filesystem object */ @@ -3171,7 +3175,7 @@ typedef struct diff_ctx_t { } diff_ctx_t; -static svn_error_t * +static svn_error_t * __attribute__((warn_unused_result)) write_to_filter(void *baton, const char *buffer, apr_size_t *len) { diff_ctx_t *dc = baton; @@ -3192,7 +3196,7 @@ write_to_filter(void *baton, const char } -static svn_error_t * +static svn_error_t * __attribute__((warn_unused_result)) close_filter(void *baton) { diff_ctx_t *dc = baton; @@ -3642,7 +3646,7 @@ deliver(const dav_resource *resource, ap /* get a handler/baton for writing into the output stream */ svn_txdelta_to_svndiff3(&handler, &h_baton, o_stream, resource->info->svndiff_version, - dav_svn__get_compression_level(), + dav_svn__get_compression_level(resource->info->r), resource->pool); /* got everything set up. read in delta windows and shove them into Modified: subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c (original) +++ subversion/branches/auto-props-sdc/subversion/mod_dav_svn/version.c Wed Oct 24 01:27:14 2012 @@ -37,7 +37,9 @@ #include "svn_props.h" #include "svn_dav.h" #include "svn_base64.h" +#include "svn_version.h" #include "private/svn_repos_private.h" +#include "private/svn_subr_private.h" #include "private/svn_dav_protocol.h" #include "private/svn_log.h" #include "private/svn_fspath.h" @@ -195,7 +197,7 @@ get_option(const dav_resource *resource, /* If we're allowed (by configuration) to do so, advertise support for ephemeral transaction properties. */ - if (dav_svn__get_ephemeral_txnprops_flag(r)) + if (dav_svn__check_ephemeral_txnprops_support(r)) { apr_table_addn(r->headers_out, "DAV", SVN_DAV_NS_DAV_SVN_EPHEMERAL_TXNPROPS); @@ -246,12 +248,15 @@ get_option(const dav_resource *resource, /* The list of Subversion's custom POSTs. You'll want to keep this in sync with the handling of these suckers in handle_post_request(). */ - static const char * posts_list[] = { - "create-txn", - "create-txn-with-props", - NULL + int i; + svn_version_t *master_version = dav_svn__get_master_version(r); + struct posts_versions_t { + const char *post_name; + svn_version_t min_version; + } posts_versions[] = { + { "create-txn", { 1, 7, 0, "" } }, + { "create-txn-with-props", { 1, 8, 0, "" } }, }; - const char **this_post = posts_list; apr_table_set(r->headers_out, SVN_DAV_ROOT_URI_HEADER, repos_root_uri); apr_table_set(r->headers_out, SVN_DAV_ME_RESOURCE_HEADER, @@ -277,12 +282,20 @@ get_option(const dav_resource *resource, dav_svn__get_vtxn_stub(r), (char *)NULL)); /* Report the supported POST types. */ - while (*this_post) + for (i = 0; i < sizeof(posts_versions)/sizeof(posts_versions[0]); ++i) { + /* If we're proxying to a master server and its version + number is declared, we can selectively filter out POST + types that it doesn't support. */ + if (master_version + && (! svn_version__at_least(master_version, + posts_versions[i].min_version.major, + posts_versions[i].min_version.minor, + posts_versions[i].min_version.patch))) + continue; + apr_table_addn(r->headers_out, SVN_DAV_SUPPORTED_POSTS_HEADER, - apr_pstrcat(resource->pool, *this_post, - (char *)NULL)); - this_post++; + apr_pstrdup(resource->pool, posts_versions[i].post_name)); } } Modified: subversion/branches/auto-props-sdc/subversion/po/pl.po URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/po/pl.po?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/po/pl.po [UTF-8] (original) +++ subversion/branches/auto-props-sdc/subversion/po/pl.po [UTF-8] Wed Oct 24 01:27:14 2012 @@ -2225,7 +2225,7 @@ msgstr "Nieznany typ systemu plików: '% #: ../libsvn_fs/fs-loader.c:313 #, c-format msgid "Can't allocate FS mutex" -msgstr "Nie udało się utworzyć semefora FS" +msgstr "Nie udało się utworzyć semafora FS" #: ../libsvn_fs/fs-loader.c:348 #, c-format @@ -3675,7 +3675,7 @@ msgstr "Uzyskano nierozpoznane kodowanie #: ../libsvn_ra_neon/get_locks.c:425 ../libsvn_ra_neon/get_locks.c:429 #: ../libsvn_ra_serf/locks.c:566 msgid "Server does not support locking features" -msgstr "Serwer nie obsługuje blokowania zatwiedzeń" +msgstr "Serwer nie obsługuje blokowania zatwierdzeń" #: ../libsvn_ra_neon/lock.c:196 msgid "Invalid creation date header value in response." @@ -3703,7 +3703,7 @@ msgstr "'%s' nie jest zablokowane w repo #: ../libsvn_ra_neon/lock.c:553 msgid "Failed to fetch lock information" -msgstr "Nieudało się pobrać informacji o blokadzie" +msgstr "Nie udało się pobrać informacji o blokadzie" #: ../libsvn_ra_neon/log.c:169 ../libsvn_ra_serf/log.c:228 #, c-format @@ -4751,7 +4751,7 @@ msgstr "Błąd podczas zamykania pliku n #: ../libsvn_repos/hooks.c:379 #, c-format msgid "Failed to run '%s' hook; broken symlink" -msgstr "Niepowiodło się uruchomienie skryptu hook '%s'; uszkodzone dowiązanie symboliczne" +msgstr "Nie powiodło się uruchomienie skryptu hook '%s'; uszkodzone dowiązanie symboliczne" #: ../libsvn_repos/hooks.c:589 msgid "" @@ -4863,7 +4863,7 @@ msgstr "Brak uprawnień do otwarcia kata #: ../libsvn_repos/reporter.c:1234 #, c-format msgid "Target path '%s' does not exist" -msgstr "Docelowa śieżka '%s' nie istnieje" +msgstr "Docelowa ścieżka '%s' nie istnieje" #: ../libsvn_repos/reporter.c:1242 msgid "Cannot replace a directory from within" @@ -5215,7 +5215,7 @@ msgstr "W pliku '%s' w linii %d: asercja #: ../libsvn_subr/error.c:602 #, c-format msgid "In file '%s' line %d: internal malfunction" -msgstr "W pliku '%s' w linii %d: wewnątrzne niepoprawne funkcjonowanie" +msgstr "W pliku '%s' w linii %d: wewnętrzne niepoprawne funkcjonowanie" #: ../libsvn_subr/io.c:169 #, c-format @@ -5230,7 +5230,7 @@ msgstr "Nie można sprawdzić ścieżki #: ../libsvn_subr/io.c:457 ../libsvn_subr/io.c:3771 #, c-format msgid "Can't open '%s'" -msgstr "Nie mozna otworzyć '%s'" +msgstr "Nie można otworzyć '%s'" #: ../libsvn_subr/io.c:483 ../libsvn_subr/io.c:569 #, c-format @@ -6280,7 +6280,7 @@ msgstr "Format logów zbyt stary. Prosz� #: ../libsvn_wc/conflicts.c:299 msgid "Invalid 'conflict_result' argument" -msgstr "Błądny argument 'conflict_result'" +msgstr "Błędny argument 'conflict_result'" #: ../libsvn_wc/conflicts.c:409 #, c-format @@ -6731,7 +6731,7 @@ msgstr "Nieprawidłowy atrybut %s dla '% #: ../libsvn_wc/props.c:2643 #, c-format msgid "Invalid %s property on '%s': target '%s' is an absolute path or involves '..'" -msgstr "Błędny atrybut %s dla '%s': cel '%s' jest ścieżką bezwględną albo wykorzystuje '..'" +msgstr "Błędny atrybut %s dla '%s': cel '%s' jest ścieżką bezwzględną albo wykorzystuje '..'" #: ../libsvn_wc/questions.c:203 #, fuzzy, c-format @@ -8245,7 +8245,7 @@ msgstr "" "\n" "OSTRZEŻENIE: Dla kompatybilności z poprzednimi wersjami Subversion kopiowania\n" "wykonywane pomiędzy dwoma ścieżkami kopii roboczej (KR -> KR) nie kontaktują\n" -"się z reporytorium. W związku z tym nie mogą domyślnie propagować informacji\n" +"się z repozytorium. W związku z tym nie mogą domyślnie propagować informacji\n" "o łączeniach zmian ze źródła kopii do celu.\n" #: ../svn/main.c:505 @@ -8673,7 +8673,7 @@ msgstr "" " E Istniały (Existed)\n" " R Zastąpiony (Replaced)\n" "\n" -" Znaki w pierwszej kolumnia informują o samym obiekcie. Znaki w drugiej\n" +" Znaki w pierwszej kolumnie informują o samym obiekcie. Znaki w drugiej\n" " kolumnie informują o atrybutach obiektu. 'C' w trzeciej kolumnie wskazuje\n" " na konflikt drzewny, podczas gdy 'C' w pierwszej i drugiej kolumnie\n" " wskazuje odpowiednio na konflikt tekstowy w plikach i w atrybutach plików.\n" @@ -9663,7 +9663,7 @@ msgstr "Opis zmian jest ścieżką (chci #: ../svn/main.c:2065 msgid "The lock comment is a pathname (was -F intended?); use '--force-log' to override" -msgstr "Opis blokady jest ścieżką (chciano użyć -F?); użyj --force-log, bywymusić użycie takiego opisu" +msgstr "Opis blokady jest ścieżką (chciano użyć -F?); użyj --force-log, by wymusić użycie takiego opisu" #: ../svn/main.c:2079 msgid "--relocate and --depth are mutually exclusive" Modified: subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c (original) +++ subversion/branches/auto-props-sdc/subversion/svn/conflict-callbacks.c Wed Oct 24 01:27:14 2012 @@ -477,7 +477,8 @@ handle_text_conflict(svn_wc_conflict_res if (performed_edit) knows_something = TRUE; } - else if (strcmp(answer, "m") == 0 || strcmp(answer, ":-M") == 0) + else if (strcmp(answer, "m") == 0 || strcmp(answer, ":-g") == 0 || + strcmp(answer, "=>-") == 0 || strcmp(answer, ":>.") == 0) { if (desc->kind != svn_wc_conflict_kind_text) { @@ -803,7 +804,7 @@ svn_cl__conflict_func_interactive(svn_wc desc->local_abspath, subpool))); prompt = _("Select: (p) postpone, (mf) mine-full, " - "(tf) theirs-full, (h) help:"); + "(tf) theirs-full, (h) help: "); while (1) { @@ -855,7 +856,9 @@ svn_cl__conflict_func_interactive(svn_wc scratch_pool), readable_desc)); - prompt = _("Select: (p) postpone, (r) mark-resolved, (h) help: "); + prompt = _("Select: (p) postpone, (r) mark-resolved, " + "(mc) mine-conflict,\n" + " (tc) theirs-conflict, (h) help: "); while (1) { @@ -866,8 +869,10 @@ svn_cl__conflict_func_interactive(svn_wc if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0) { SVN_ERR(svn_cmdline_fprintf(stderr, subpool, - _(" (p) postpone - resolve the conflict later\n" - " (r) resolved - accept current working tree\n"))); + _(" (p) postpone - resolve the conflict later\n" + " (r) resolved - accept current working copy state\n" + " (mc) mine-conflict - prefer local change\n" + " (tc) theirs-conflict - prefer incoming change\n"))); } if (strcmp(answer, "p") == 0 || strcmp(answer, ":-p") == 0) { @@ -879,6 +884,16 @@ svn_cl__conflict_func_interactive(svn_wc (*result)->choice = svn_wc_conflict_choose_merged; break; } + else if (strcmp(answer, "mc") == 0) + { + (*result)->choice = svn_wc_conflict_choose_mine_conflict; + break; + } + else if (strcmp(answer, "tc") == 0) + { + (*result)->choice = svn_wc_conflict_choose_theirs_conflict; + break; + } } } Modified: subversion/branches/auto-props-sdc/subversion/svn/log-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/log-cmd.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svn/log-cmd.c (original) +++ subversion/branches/auto-props-sdc/subversion/svn/log-cmd.c Wed Oct 24 01:27:14 2012 @@ -626,7 +626,13 @@ log_entry_receiver_xml(void *baton, /* */ svn_xml_make_open_tag(&sb, pool, svn_xml_protect_pcdata, "path", "action", action, - "kind", svn_cl__node_kind_str_xml(log_item->node_kind), NULL); + "kind", svn_cl__node_kind_str_xml( + log_item->node_kind), + "text-mods", svn_tristate__to_word( + log_item->text_modified), + "prop-mods", svn_tristate__to_word( + log_item->props_modified), + NULL); } /* xxx */ svn_xml_escape_cdata_cstring(&sb, path, pool); Modified: subversion/branches/auto-props-sdc/subversion/svn/main.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/main.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svn/main.c (original) +++ subversion/branches/auto-props-sdc/subversion/svn/main.c Wed Oct 24 01:27:14 2012 @@ -1630,7 +1630,8 @@ add_search_pattern_to_latest_group(svn_c /*** Main. ***/ -/* Report and clear the error ERR, and return EXIT_FAILURE. */ +/* Report and clear the error ERR, and return EXIT_FAILURE. Suppress the + * error message if it is SVN_ERR_IO_PIPE_WRITE_ERROR. */ #define EXIT_ERROR(err) \ svn_cmdline_handle_exit_error(err, NULL, "svn: ") @@ -1663,6 +1664,8 @@ sub_main(int argc, const char *argv[], a svn_boolean_t interactive_conflicts = FALSE; svn_boolean_t use_notifier = TRUE; apr_hash_t *changelists; + const char *sqlite_exclusive; + apr_hash_t *cfg_hash; received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int)); @@ -2384,14 +2387,111 @@ sub_main(int argc, const char *argv[], a opt_state.end_revision = APR_ARRAY_IDX(opt_state.revision_ranges, 0, svn_opt_revision_range_t *)->end; + err = svn_config_get_config(&cfg_hash, opt_state.config_dir, pool); + if (err) + { + /* Fallback to default config if the config directory isn't readable + or is not a directory. */ + if (APR_STATUS_IS_EACCES(err->apr_err) + || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err)) + { + svn_handle_warning2(stderr, err, "svn: "); + svn_error_clear(err); + cfg_hash = NULL; + } + else + return EXIT_ERROR(err); + } + /* Create a client context object. */ command_baton.opt_state = &opt_state; - SVN_INT_ERR(svn_client_create_context(&ctx, pool)); + SVN_INT_ERR(svn_client_create_context2(&ctx, cfg_hash, pool)); command_baton.ctx = ctx; + /* Relocation is infinite-depth only. */ + if (opt_state.relocate) + { + if (opt_state.depth != svn_depth_unknown) + { + err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL, + _("--relocate and --depth are mutually " + "exclusive")); + return EXIT_ERROR(err); + } + if (! descend) + { + err = svn_error_create( + SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL, + _("--relocate and --non-recursive (-N) are mutually " + "exclusive")); + return EXIT_ERROR(err); + } + } + + /* Only a few commands can accept a revision range; the rest can take at + most one revision number. */ + if (subcommand->cmd_func != svn_cl__blame + && subcommand->cmd_func != svn_cl__diff + && subcommand->cmd_func != svn_cl__log + && subcommand->cmd_func != svn_cl__mergeinfo + && subcommand->cmd_func != svn_cl__merge) + { + if (opt_state.end_revision.kind != svn_opt_revision_unspecified) + { + err = svn_error_create(SVN_ERR_CLIENT_REVISION_RANGE, NULL, NULL); + return EXIT_ERROR(err); + } + } + + /* -N has a different meaning depending on the command */ + if (descend == FALSE) + { + if (subcommand->cmd_func == svn_cl__status) + { + opt_state.depth = svn_depth_immediates; + } + else if (subcommand->cmd_func == svn_cl__revert + || subcommand->cmd_func == svn_cl__add + || subcommand->cmd_func == svn_cl__commit) + { + /* In pre-1.5 Subversion, some commands treated -N like + --depth=empty, so force that mapping here. Anyway, with + revert it makes sense to be especially conservative, + since revert can lose data. */ + opt_state.depth = svn_depth_empty; + } + else + { + opt_state.depth = svn_depth_files; + } + } + + cfg_config = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG, + APR_HASH_KEY_STRING); + + /* Update the options in the config */ + if (opt_state.config_options) + { + svn_error_clear( + svn_cmdline__apply_config_options(ctx->config, + opt_state.config_options, + "svn: ", "--config-option")); + } + + svn_config_get(cfg_config, &sqlite_exclusive, + SVN_CONFIG_SECTION_WORKING_COPY, + SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE, + NULL); + if (!sqlite_exclusive) + svn_config_set(cfg_config, + SVN_CONFIG_SECTION_WORKING_COPY, + SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE, + "true"); + /* If we're running a command that could result in a commit, verify that any log message we were given on the command line makes - sense (unless we've also been instructed not to care). */ + sense (unless we've also been instructed not to care). This may + access the working copy so do it after setting the locking mode. */ if ((! opt_state.force_log) && (subcommand->cmd_func == svn_cl__commit || subcommand->cmd_func == svn_cl__copy @@ -2466,92 +2566,6 @@ sub_main(int argc, const char *argv[], a } } - /* Relocation is infinite-depth only. */ - if (opt_state.relocate) - { - if (opt_state.depth != svn_depth_unknown) - { - err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL, - _("--relocate and --depth are mutually " - "exclusive")); - return EXIT_ERROR(err); - } - if (! descend) - { - err = svn_error_create( - SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL, - _("--relocate and --non-recursive (-N) are mutually " - "exclusive")); - return EXIT_ERROR(err); - } - } - - /* Only a few commands can accept a revision range; the rest can take at - most one revision number. */ - if (subcommand->cmd_func != svn_cl__blame - && subcommand->cmd_func != svn_cl__diff - && subcommand->cmd_func != svn_cl__log - && subcommand->cmd_func != svn_cl__mergeinfo - && subcommand->cmd_func != svn_cl__merge) - { - if (opt_state.end_revision.kind != svn_opt_revision_unspecified) - { - err = svn_error_create(SVN_ERR_CLIENT_REVISION_RANGE, NULL, NULL); - return EXIT_ERROR(err); - } - } - - /* -N has a different meaning depending on the command */ - if (descend == FALSE) - { - if (subcommand->cmd_func == svn_cl__status) - { - opt_state.depth = svn_depth_immediates; - } - else if (subcommand->cmd_func == svn_cl__revert - || subcommand->cmd_func == svn_cl__add - || subcommand->cmd_func == svn_cl__commit) - { - /* In pre-1.5 Subversion, some commands treated -N like - --depth=empty, so force that mapping here. Anyway, with - revert it makes sense to be especially conservative, - since revert can lose data. */ - opt_state.depth = svn_depth_empty; - } - else - { - opt_state.depth = svn_depth_files; - } - } - - err = svn_config_get_config(&(ctx->config), - opt_state.config_dir, pool); - if (err) - { - /* Fallback to default config if the config directory isn't readable - or is not a directory. */ - if (APR_STATUS_IS_EACCES(err->apr_err) - || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err)) - { - svn_handle_warning2(stderr, err, "svn: "); - svn_error_clear(err); - } - else - return EXIT_ERROR(err); - } - - cfg_config = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG, - APR_HASH_KEY_STRING); - - /* Update the options in the config */ - if (opt_state.config_options) - { - svn_error_clear( - svn_cmdline__apply_config_options(ctx->config, - opt_state.config_options, - "svn: ", "--config-option")); - } - /* XXX: Only diff_cmd for now, overlay rest later and stop passing opt_state altogether? */ if (opt_state.diff.diff_cmd) Modified: subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c (original) +++ subversion/branches/auto-props-sdc/subversion/svn/merge-cmd.c Wed Oct 24 01:27:14 2012 @@ -104,9 +104,9 @@ ensure_wc_path_has_repo_revision(const c return SVN_NO_ERROR; } -/* Symmetric, merge-tracking merge, used for sync or reintegrate purposes. */ +/* Automatic, merge-tracking merge, used for sync or reintegrate purposes. */ static svn_error_t * -symmetric_merge(const char *source_path_or_url, +automatic_merge(const char *source_path_or_url, const svn_opt_revision_t *source_revision, const char *target_wcpath, svn_depth_t depth, @@ -120,16 +120,16 @@ symmetric_merge(const char *source_path_ svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { - svn_client__symmetric_merge_t *merge; + svn_client_automatic_merge_t *merge; /* Find the 3-way merges needed (and check suitability of the WC). */ - SVN_ERR(svn_client__find_symmetric_merge(&merge, - source_path_or_url, source_revision, - target_wcpath, allow_mixed_rev, - allow_local_mods, allow_switched_subtrees, - ctx, scratch_pool, scratch_pool)); + SVN_ERR(svn_client_find_automatic_merge(&merge, + source_path_or_url, source_revision, + target_wcpath, allow_mixed_rev, + allow_local_mods, allow_switched_subtrees, + ctx, scratch_pool, scratch_pool)); - if (svn_client__symmetric_merge_is_reintegrate_like(merge)) + if (svn_client_automatic_merge_is_reintegrate_like(merge)) { if (record_only) return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL, @@ -157,10 +157,10 @@ symmetric_merge(const char *source_path_ } /* Perform the 3-way merges */ - SVN_ERR(svn_client__do_symmetric_merge(merge, target_wcpath, depth, - force, record_only, - dry_run, merge_options, - ctx, scratch_pool)); + SVN_ERR(svn_client_do_automatic_merge(merge, target_wcpath, depth, + force, record_only, + dry_run, merge_options, + ctx, scratch_pool)); return SVN_NO_ERROR; } @@ -428,7 +428,7 @@ svn_cl__merge(apr_getopt_t *os, /* Postpone conflict resolution during the merge operation. * If any conflicts occur we'll run the conflict resolver later. */ - /* Do a symmetric merge if just one source and no revisions. */ + /* Do an automatic merge if just one source and no revisions. */ if ((! two_sources_specified) && (! opt_state->reintegrate) && (! opt_state->ignore_ancestry) @@ -440,7 +440,7 @@ svn_cl__merge(apr_getopt_t *os, ctx, pool), _("Source and target must be different but related branches")); - merge_err = symmetric_merge(sourcepath1, &peg_revision1, targetpath, + merge_err = automatic_merge(sourcepath1, &peg_revision1, targetpath, opt_state->depth, opt_state->force, opt_state->record_only, Modified: subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c (original) +++ subversion/branches/auto-props-sdc/subversion/svn/mergeinfo-cmd.c Wed Oct 24 01:27:14 2012 @@ -205,7 +205,7 @@ mergeinfo_summary( svn_client_ctx_t *ctx, apr_pool_t *pool) { - svn_client__symmetric_merge_t *the_merge; + svn_client_automatic_merge_t *the_merge; svn_client__pathrev_t *yca, *base, *right, *target; svn_boolean_t target_is_wc, reintegrate_like; @@ -213,22 +213,22 @@ mergeinfo_summary( && (target_revision->kind == svn_opt_revision_unspecified || target_revision->kind == svn_opt_revision_working); if (target_is_wc) - SVN_ERR(svn_client__find_symmetric_merge( + SVN_ERR(svn_client_find_automatic_merge( &the_merge, source_path_or_url, source_revision, target_path_or_url, TRUE, TRUE, TRUE, /* allow_* */ ctx, pool, pool)); else - SVN_ERR(svn_client__find_symmetric_merge_no_wc( + SVN_ERR(svn_client_find_automatic_merge_no_wc( &the_merge, source_path_or_url, source_revision, target_path_or_url, target_revision, ctx, pool, pool)); - SVN_ERR(svn_client__symmetric_merge_get_locations( + SVN_ERR(svn_client__automatic_merge_get_locations( &yca, &base, &right, &target, the_merge, pool)); - reintegrate_like = svn_client__symmetric_merge_is_reintegrate_like(the_merge); + reintegrate_like = svn_client_automatic_merge_is_reintegrate_like(the_merge); SVN_ERR(mergeinfo_diagram(yca, base, right, target, target_is_wc, reintegrate_like, Modified: subversion/branches/auto-props-sdc/subversion/svn/proplist-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svn/proplist-cmd.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svn/proplist-cmd.c (original) +++ subversion/branches/auto-props-sdc/subversion/svn/proplist-cmd.c Wed Oct 24 01:27:14 2012 @@ -86,7 +86,7 @@ proplist_receiver_xml(void *baton, (! opt_state->verbose), TRUE, iterpool)); svn_xml_make_close_tag(&sb, iterpool, "target"); - svn_cl__error_checked_fputs(sb->data, stdout); + SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout)); } svn_pool_destroy(iterpool); } Modified: subversion/branches/auto-props-sdc/subversion/svnadmin/main.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svnadmin/main.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svnadmin/main.c (original) +++ subversion/branches/auto-props-sdc/subversion/svnadmin/main.c Wed Oct 24 01:27:14 2012 @@ -43,6 +43,7 @@ #include "svn_xml.h" #include "private/svn_opt_private.h" +#include "private/svn_named_atomic.h" #include "svn_private_config.h" @@ -115,7 +116,8 @@ open_repos(svn_repos_t **repos, apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS, APR_HASH_KEY_STRING, "1"); apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, - APR_HASH_KEY_STRING, "1"); + APR_HASH_KEY_STRING, + svn_named_atomic__is_efficient() ? "1" : "0"); /* now, open the requested repository */ SVN_ERR(svn_repos_open2(repos, path, fs_config, pool)); Modified: subversion/branches/auto-props-sdc/subversion/svnrdump/load_editor.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svnrdump/load_editor.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svnrdump/load_editor.c (original) +++ subversion/branches/auto-props-sdc/subversion/svnrdump/load_editor.c Wed Oct 24 01:27:14 2012 @@ -704,6 +704,7 @@ new_node_record(void **node_baton, apr_size_t residual_close_count; apr_array_header_t *residual_open_path; int i; + apr_size_t n; /* Before attempting to handle the action, call open_directory for all the path components and set the directory baton @@ -720,7 +721,7 @@ new_node_record(void **node_baton, /* First close all as many directories as there are after skip_ancestor, and then open fresh directories */ - for (i = 0; i < residual_close_count; i ++) + for (n = 0; n < residual_close_count; n ++) { /* Don't worry about destroying the actual rb->db object, since the pool we're using has the lifetime of one Modified: subversion/branches/auto-props-sdc/subversion/svnrdump/svnrdump.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svnrdump/svnrdump.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svnrdump/svnrdump.c (original) +++ subversion/branches/auto-props-sdc/subversion/svnrdump/svnrdump.c Wed Oct 24 01:27:14 2012 @@ -270,7 +270,7 @@ init_client_context(svn_client_ctx_t **c SVN_ERR(svn_ra_initialize(pool)); SVN_ERR(svn_config_ensure(config_dir, pool)); - SVN_ERR(svn_client_create_context(&ctx, pool)); + SVN_ERR(svn_client_create_context2(&ctx, NULL, pool)); SVN_ERR(svn_config_get_config(&(ctx->config), config_dir, pool)); Modified: subversion/branches/auto-props-sdc/subversion/svnserve/main.c URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/svnserve/main.c?rev=1401527&r1=1401526&r2=1401527&view=diff ============================================================================== --- subversion/branches/auto-props-sdc/subversion/svnserve/main.c (original) +++ subversion/branches/auto-props-sdc/subversion/svnserve/main.c Wed Oct 24 01:27:14 2012 @@ -150,6 +150,7 @@ void winservice_notify_stop(void) #define SVNSERVE_OPT_CACHE_REVPROPS 267 #define SVNSERVE_OPT_SINGLE_CONN 268 #define SVNSERVE_OPT_CLIENT_SPEED 269 +#define SVNSERVE_OPT_VIRTUAL_HOST 270 static const apr_getopt_option_t svnserve__options[] = { @@ -277,6 +278,10 @@ static const apr_getopt_option_t svnserv " " "[mode: tunnel]")}, {"help", 'h', 0, N_("display this help")}, + {"virtual-host", SVNSERVE_OPT_VIRTUAL_HOST, 0, + N_("virtual host mode (look for repo in directory\n" + " " + "of provided hostname)")}, {"version", SVNSERVE_OPT_VERSION, 0, N_("show program version information")}, {"quiet", 'q', 0, @@ -503,6 +508,7 @@ int main(int argc, const char *argv[]) params.authzdb = NULL; params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT; params.log_file = NULL; + params.vhost = FALSE; params.username_case = CASE_ASIS; params.memory_cache_size = (apr_uint64_t)-1; params.cache_fulltexts = TRUE; @@ -694,7 +700,11 @@ int main(int argc, const char *argv[]) pool)); break; - case SVNSERVE_OPT_LOG_FILE: + case SVNSERVE_OPT_VIRTUAL_HOST: + params.vhost = TRUE; + break; + + case SVNSERVE_OPT_LOG_FILE: SVN_INT_ERR(svn_utf_cstring_to_utf8(&log_filename, arg, pool)); log_filename = svn_dirent_internal_style(log_filename, pool); SVN_INT_ERR(svn_dirent_get_absolute(&log_filename, log_filename, @@ -952,7 +962,7 @@ int main(int argc, const char *argv[]) settings.single_threaded = TRUE; if (handling_mode == connection_mode_thread) { -#ifdef APR_HAS_THREADS +#if APR_HAS_THREADS settings.single_threaded = FALSE; #else /* No requests will be processed at all