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 F22651077D for ; Tue, 10 Feb 2015 11:42:07 +0000 (UTC) Received: (qmail 71688 invoked by uid 500); 10 Feb 2015 11:42:02 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 71537 invoked by uid 500); 10 Feb 2015 11:42:02 -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 71361 invoked by uid 99); 10 Feb 2015 11:42:02 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Feb 2015 11:42:02 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 6C112AC04EA for ; Tue, 10 Feb 2015 11:42:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1658686 [3/19] - in /subversion/branches/pin-externals: ./ build/generator/ build/generator/templates/ subversion/bindings/swig/ subversion/include/ subversion/libsvn_client/ subversion/libsvn_fs_fs/ subversion/libsvn_fs_x/ subversion/libs... Date: Tue, 10 Feb 2015 11:41:59 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150210114202.6C112AC04EA@hades.apache.org> Modified: subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c?rev=1658686&r1=1658685&r2=1658686&view=diff ============================================================================== --- subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c (original) +++ subversion/branches/pin-externals/subversion/libsvn_wc/wc_db_update_move.c Tue Feb 10 11:41:57 2015 @@ -135,6 +135,44 @@ verify_write_lock(svn_wc__db_wcroot_t *w return SVN_NO_ERROR; } +/* In our merge conflicts we record the move_op_src path, which is essentially + the depth at which what was moved is marked deleted. The problem is that + this depth is not guaranteed to be stable, because somebody might just + remove another ancestor, or revert one. + + To work around this problem we locate the layer below this path, and use + that to pinpoint whatever is moved. + + For a path SRC_RELPATH that was deleted by an operation rooted at + DELETE_OP_DEPTH find the op-depth at which the node was originally added. + */ +static svn_error_t * +find_src_op_depth(int *src_op_depth, + svn_wc__db_wcroot_t *wcroot, + const char *src_relpath, + int delete_op_depth, + apr_pool_t *scratch_pool) +{ + svn_sqlite__stmt_t *stmt; + svn_boolean_t have_row; + + SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, + STMT_SELECT_HIGHEST_WORKING_NODE)); + SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, + src_relpath, delete_op_depth)); + + SVN_ERR(svn_sqlite__step(&have_row, stmt)); + if (have_row) + *src_op_depth = svn_sqlite__column_int(stmt, 0); + SVN_ERR(svn_sqlite__reset(stmt)); + if (!have_row) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("'%s' is not deleted"), + path_for_error_message(wcroot, src_relpath, + scratch_pool)); + + return SVN_NO_ERROR; +} /* * Receiver code. @@ -500,33 +538,33 @@ mark_tc_on_op_root(node_move_baton_t *nm apr_pool_t *scratch_pool) { update_move_baton_t *b = nmb->umb; - const char *conflict_root_relpath = nmb->dst_relpath; - const char *move_dst_relpath, *dummy1; - const char *dummy2, *move_src_op_root_relpath; + const char *move_dst_relpath; svn_skel_t *conflict; SVN_ERR_ASSERT(nmb->shadowed && !nmb->pb->shadowed); nmb->skip = TRUE; - SVN_ERR(svn_wc__db_op_depth_moved_to(&move_dst_relpath, - &dummy1, - &dummy2, - &move_src_op_root_relpath, - b->dst_op_depth, - b->wcroot, conflict_root_relpath, - scratch_pool, scratch_pool)); + if (old_kind == svn_node_none) + move_dst_relpath = NULL; + else + SVN_ERR(svn_wc__db_scan_moved_to_internal(NULL, &move_dst_relpath, NULL, + b->wcroot, nmb->dst_relpath, + b->dst_op_depth, + scratch_pool, scratch_pool)); - SVN_ERR(create_node_tree_conflict(&conflict, nmb, conflict_root_relpath, + SVN_ERR(create_node_tree_conflict(&conflict, nmb, nmb->dst_relpath, old_kind, new_kind, old_repos_relpath, (move_dst_relpath ? svn_wc_conflict_reason_moved_away : svn_wc_conflict_reason_deleted), - action, move_src_op_root_relpath, + action, move_dst_relpath + ? nmb->dst_relpath + : NULL, scratch_pool, scratch_pool)); - SVN_ERR(update_move_list_add(b->wcroot, conflict_root_relpath, + SVN_ERR(update_move_list_add(b->wcroot, nmb->dst_relpath, svn_wc_notify_tree_conflict, new_kind, svn_wc_notify_state_inapplicable, @@ -602,15 +640,15 @@ mark_parent_edited(node_move_baton_t *nm static svn_error_t * tc_editor_add_directory(node_move_baton_t *nmb, const char *relpath, + svn_node_kind_t old_kind, apr_hash_t *props, apr_pool_t *scratch_pool) { update_move_baton_t *b = nmb->umb; const char *move_dst_repos_relpath; const char *local_abspath; - svn_node_kind_t old_kind; + svn_node_kind_t wc_kind; svn_skel_t *work_item = NULL; - svn_wc_notify_action_t action = svn_wc_notify_update_add; svn_skel_t *conflict = NULL; SVN_ERR(mark_parent_edited(nmb, scratch_pool)); @@ -650,32 +688,31 @@ tc_editor_add_directory(node_move_baton_ /* Check for unversioned tree-conflict */ local_abspath = svn_dirent_join(b->wcroot->abspath, relpath, scratch_pool); - SVN_ERR(svn_io_check_path(local_abspath, &old_kind, scratch_pool)); - switch (old_kind) + SVN_ERR(svn_io_check_path(local_abspath, &wc_kind, scratch_pool)); + if (wc_kind == old_kind) + wc_kind = svn_node_none; /* Node will be gone once we install */ + + if (wc_kind != svn_node_none) { - case svn_node_file: - default: SVN_ERR(create_node_tree_conflict(&conflict, nmb, relpath, - old_kind, svn_node_dir, + wc_kind, svn_node_dir, move_dst_repos_relpath, svn_wc_conflict_reason_unversioned, svn_wc_conflict_action_add, NULL, scratch_pool, scratch_pool)); nmb->skip = TRUE; - action = svn_wc_notify_tree_conflict; - break; - - case svn_node_none: + } + else + { SVN_ERR(svn_wc__wq_build_dir_install(&work_item, b->db, local_abspath, scratch_pool, scratch_pool)); - /* Fall through */ - case svn_node_dir: - break; } SVN_ERR(update_move_list_add(b->wcroot, relpath, - action, + (old_kind == svn_node_none) + ? svn_wc_notify_update_add + : svn_wc_notify_update_replace, svn_node_dir, svn_wc_notify_state_inapplicable, svn_wc_notify_state_inapplicable, @@ -686,13 +723,14 @@ tc_editor_add_directory(node_move_baton_ static svn_error_t * tc_editor_add_file(node_move_baton_t *nmb, const char *relpath, + svn_node_kind_t old_kind, const svn_checksum_t *checksum, apr_hash_t *props, apr_pool_t *scratch_pool) { update_move_baton_t *b = nmb->umb; const char *move_dst_repos_relpath; - svn_node_kind_t old_kind; + svn_node_kind_t wc_kind; const char *local_abspath; svn_skel_t *work_item = NULL; svn_skel_t *conflict = NULL; @@ -735,12 +773,15 @@ tc_editor_add_file(node_move_baton_t *nm /* Check for unversioned tree-conflict */ local_abspath = svn_dirent_join(b->wcroot->abspath, relpath, scratch_pool); - SVN_ERR(svn_io_check_path(local_abspath, &old_kind, scratch_pool)); + SVN_ERR(svn_io_check_path(local_abspath, &wc_kind, scratch_pool)); + + if (wc_kind == old_kind) + wc_kind = svn_node_none; /* Node will be gone once we install */ - if (old_kind != svn_node_none) + if (wc_kind != svn_node_none) { SVN_ERR(create_node_tree_conflict(&conflict, nmb, relpath, - old_kind, svn_node_file, + wc_kind, svn_node_file, move_dst_repos_relpath, svn_wc_conflict_reason_unversioned, svn_wc_conflict_action_add, NULL, @@ -761,7 +802,9 @@ tc_editor_add_file(node_move_baton_t *nm } SVN_ERR(update_move_list_add(b->wcroot, relpath, - svn_wc_notify_update_add, + (old_kind == svn_node_none) + ? svn_wc_notify_update_add + : svn_wc_notify_update_replace, svn_node_file, svn_wc_notify_state_inapplicable, svn_wc_notify_state_inapplicable, @@ -788,6 +831,7 @@ create_conflict_markers(svn_skel_t **wor const working_node_version_t *old_version, const working_node_version_t *new_version, svn_node_kind_t kind, + svn_boolean_t set_operation, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { @@ -808,19 +852,22 @@ create_conflict_markers(svn_skel_t **wor = svn_relpath_join(conflicted_version->path_in_repos, part, scratch_pool); original_version->path_in_repos = repos_relpath; - if (operation == svn_wc_operation_update) - { - SVN_ERR(svn_wc__conflict_skel_set_op_update( - conflict_skel, original_version, - conflicted_version, - scratch_pool, scratch_pool)); - } - else + if (set_operation) { - SVN_ERR(svn_wc__conflict_skel_set_op_switch( - conflict_skel, original_version, - conflicted_version, - scratch_pool, scratch_pool)); + if (operation == svn_wc_operation_update) + { + SVN_ERR(svn_wc__conflict_skel_set_op_update( + conflict_skel, original_version, + conflicted_version, + scratch_pool, scratch_pool)); + } + else + { + SVN_ERR(svn_wc__conflict_skel_set_op_switch( + conflict_skel, original_version, + conflicted_version, + scratch_pool, scratch_pool)); + } } /* According to this func's doc string, it is "Currently only used for @@ -905,11 +952,26 @@ tc_editor_alter_directory(node_move_bato svn_wc_notify_state_t prop_state; apr_hash_t *actual_props; apr_array_header_t *propchanges; + svn_node_kind_t wc_kind; + svn_boolean_t obstructed = FALSE; SVN_ERR(mark_node_edited(nmb, scratch_pool)); if (nmb->skip) return SVN_NO_ERROR; + SVN_ERR(svn_io_check_path(local_abspath, &wc_kind, scratch_pool)); + if (wc_kind != svn_node_none && wc_kind != svn_node_dir) + { + SVN_ERR(create_node_tree_conflict(&conflict_skel, nmb, dst_relpath, + wc_kind, svn_node_dir, + NULL /* local obstruction relpath */, + svn_wc_conflict_reason_obstructed, + svn_wc_conflict_action_edit, + NULL, + scratch_pool, scratch_pool)); + obstructed = TRUE; + } + old_version.location_and_kind = b->old_version; new_version.location_and_kind = b->new_version; @@ -924,7 +986,7 @@ tc_editor_alter_directory(node_move_bato &old_version, &new_version, scratch_pool, scratch_pool)); - if (conflict_skel) + if (prop_state == svn_wc_notify_state_conflicted) { const char *move_dst_repos_relpath; @@ -940,7 +1002,7 @@ tc_editor_alter_directory(node_move_bato b->db, move_dst_repos_relpath, conflict_skel, b->operation, &old_version, &new_version, - svn_node_dir, + svn_node_dir, !obstructed, scratch_pool, scratch_pool)); } @@ -993,11 +1055,26 @@ tc_editor_alter_file(node_move_baton_t * enum svn_wc_merge_outcome_t merge_outcome; svn_wc_notify_state_t prop_state, content_state; svn_skel_t *work_item, *work_items = NULL; + svn_node_kind_t wc_kind; + svn_boolean_t obstructed = FALSE; SVN_ERR(mark_node_edited(nmb, scratch_pool)); if (nmb->skip) return SVN_NO_ERROR; + SVN_ERR(svn_io_check_path(local_abspath, &wc_kind, scratch_pool)); + if (wc_kind != svn_node_none && wc_kind != svn_node_file) + { + SVN_ERR(create_node_tree_conflict(&conflict_skel, nmb, dst_relpath, + wc_kind, svn_node_file, + NULL /* local obstruction relpath */, + svn_wc_conflict_reason_obstructed, + svn_wc_conflict_action_edit, + NULL, + scratch_pool, scratch_pool)); + obstructed = TRUE; + } + old_version.location_and_kind = b->old_version; new_version.location_and_kind = b->new_version; @@ -1012,7 +1089,8 @@ tc_editor_alter_file(node_move_baton_t * &old_version, &new_version, scratch_pool, scratch_pool)); - if (!svn_checksum_match(new_version.checksum, old_version.checksum)) + if (!obstructed + && !svn_checksum_match(new_version.checksum, old_version.checksum)) { svn_boolean_t is_locally_modified; @@ -1092,7 +1170,7 @@ tc_editor_alter_file(node_move_baton_t * SVN_ERR(create_conflict_markers(&work_item, local_abspath, b->db, move_dst_repos_relpath, conflict_skel, b->operation, &old_version, &new_version, - svn_node_file, + svn_node_file, !obstructed, scratch_pool, scratch_pool)); work_items = svn_wc__wq_merge(work_items, work_item, scratch_pool); @@ -1111,15 +1189,15 @@ tc_editor_alter_file(node_move_baton_t * static svn_error_t * tc_editor_delete(node_move_baton_t *nmb, const char *relpath, + svn_node_kind_t old_kind, + svn_node_kind_t new_kind, apr_pool_t *scratch_pool) { update_move_baton_t *b = nmb->umb; svn_sqlite__stmt_t *stmt; const char *move_dst_repos_relpath; svn_node_kind_t move_dst_kind; - svn_boolean_t must_delete_wc_nodes = FALSE; const char *local_abspath; - svn_boolean_t have_row; svn_boolean_t is_modified, is_all_deletes; svn_skel_t *work_items = NULL; svn_skel_t *conflict = NULL; @@ -1141,7 +1219,7 @@ tc_editor_delete(node_move_baton_t *nmb, { SVN_ERR(mark_tc_on_op_root(nmb, move_dst_kind, - svn_node_unknown, + new_kind, move_dst_repos_relpath, svn_wc_conflict_action_delete, scratch_pool)); @@ -1156,41 +1234,34 @@ tc_editor_delete(node_move_baton_t *nmb, { svn_wc_conflict_reason_t reason; - if (!is_all_deletes) - { - /* No conflict means no NODES rows at the relpath op-depth - so it's easy to convert the modified tree into a copy. + /* No conflict means no NODES rows at the relpath op-depth + so it's easy to convert the modified tree into a copy. - Note the following assumptions for relpath: - * it is not shadowed - * it is not the/an op-root. (or we can't make us a copy) - */ + Note the following assumptions for relpath: + * it is not shadowed + * it is not the/an op-root. (or we can't make us a copy) + */ - SVN_ERR(svn_wc__db_op_make_copy_internal(b->wcroot, relpath, - NULL, NULL, scratch_pool)); + SVN_ERR(svn_wc__db_op_make_copy_internal(b->wcroot, relpath, + NULL, NULL, scratch_pool)); + + reason = svn_wc_conflict_reason_edited; - reason = svn_wc_conflict_reason_edited; - } - else - { - reason = svn_wc_conflict_reason_deleted; - must_delete_wc_nodes = TRUE; - } SVN_ERR(create_node_tree_conflict(&conflict, nmb, relpath, - move_dst_kind, svn_node_none, + move_dst_kind, new_kind, move_dst_repos_relpath, reason, - svn_wc_conflict_action_delete, NULL, + (new_kind == svn_node_none) + ? svn_wc_conflict_action_delete + : svn_wc_conflict_action_replace, + NULL, scratch_pool, scratch_pool)); nmb->skip = TRUE; } else - must_delete_wc_nodes = TRUE; - - if (must_delete_wc_nodes) { apr_pool_t *iterpool = svn_pool_create(scratch_pool); - svn_node_kind_t del_kind; const char *del_abspath; + svn_boolean_t have_row; /* Get all descendants of the node in reverse order (so children are handled before their parents, but not strictly depth first) */ @@ -1203,6 +1274,7 @@ tc_editor_delete(node_move_baton_t *nmb, { svn_error_t *err; svn_skel_t *work_item; + svn_node_kind_t del_kind; svn_pool_clear(iterpool); @@ -1228,12 +1300,7 @@ tc_editor_delete(node_move_baton_t *nmb, } SVN_ERR(svn_sqlite__reset(stmt)); - SVN_ERR(svn_wc__db_depth_get_info(NULL, &del_kind, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, - b->wcroot, relpath, b->dst_op_depth, - iterpool, iterpool)); - if (del_kind == svn_node_dir) + if (old_kind == svn_node_dir) SVN_ERR(svn_wc__wq_build_dir_remove(&work_items, b->db, b->wcroot->abspath, local_abspath, FALSE /* recursive */, @@ -1241,17 +1308,22 @@ tc_editor_delete(node_move_baton_t *nmb, else SVN_ERR(svn_wc__wq_build_file_remove(&work_items, b->db, b->wcroot->abspath, local_abspath, - iterpool, iterpool)); + scratch_pool, iterpool)); - svn_pool_destroy(iterpool); + svn_pool_destroy(iterpool); } - SVN_ERR(update_move_list_add(b->wcroot, relpath, - svn_wc_notify_update_delete, - move_dst_kind, - svn_wc_notify_state_inapplicable, - svn_wc_notify_state_inapplicable, - conflict, work_items, scratch_pool)); + /* Only notify if add_file/add_dir is not going to notify */ + if (conflict || (new_kind == svn_node_none)) + SVN_ERR(update_move_list_add(b->wcroot, relpath, + svn_wc_notify_update_delete, + move_dst_kind, + svn_wc_notify_state_inapplicable, + svn_wc_notify_state_inapplicable, + conflict, work_items, scratch_pool)); + else if (work_items) + SVN_ERR(svn_wc__db_wq_add_internal(b->wcroot, work_items, + scratch_pool)); return SVN_NO_ERROR; } @@ -1350,30 +1422,26 @@ get_info(apr_hash_t **props, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { - apr_hash_t *hash_children; - apr_array_header_t *sorted_children; - svn_error_t *err; svn_wc__db_status_t status; const char *repos_relpath; - int i; + svn_node_kind_t db_kind; + svn_error_t *err; - err = svn_wc__db_depth_get_info(&status, kind, NULL, &repos_relpath, NULL, + err = svn_wc__db_depth_get_info(&status, &db_kind, NULL, &repos_relpath, NULL, NULL, NULL, NULL, NULL, checksum, NULL, NULL, props, wcroot, local_relpath, op_depth, result_pool, scratch_pool); /* If there is no node at this depth, or only a node that describes a delete - of a lower layer we report this node as not existing. - - But when a node is reported as DELETED, but has a repository location it - is really a not-present node that must be reported as being there */ + of a lower layer we report this node as not existing. */ if ((err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND) - || (!err && status == svn_wc__db_status_deleted)) + || (!err && status != svn_wc__db_status_added + && status != svn_wc__db_status_normal)) { svn_error_clear(err); - if (kind && (err || !repos_relpath)) + if (kind) *kind = svn_node_none; if (checksum) *checksum = NULL; @@ -1387,47 +1455,35 @@ get_info(apr_hash_t **props, else SVN_ERR(err); + if (kind) + *kind = db_kind; - SVN_ERR(svn_wc__db_get_children_op_depth(&hash_children, wcroot, - local_relpath, op_depth, - scratch_pool, scratch_pool)); - - sorted_children = svn_sort__hash(hash_children, - svn_sort_compare_items_lexically, - scratch_pool); - - *children = apr_array_make(result_pool, sorted_children->nelts, - sizeof(const char *)); - for (i = 0; i < sorted_children->nelts; ++i) - APR_ARRAY_PUSH(*children, const char *) - = apr_pstrdup(result_pool, APR_ARRAY_IDX(sorted_children, i, - svn_sort__item_t).key); - - return SVN_NO_ERROR; -} - -/* Return TRUE if SRC_CHILDREN and DST_CHILDREN represent the same - children, FALSE otherwise. SRC_CHILDREN and DST_CHILDREN are - sorted arrays of basenames of type 'const char *'. */ -static svn_boolean_t -children_match(apr_array_header_t *src_children, - apr_array_header_t *dst_children) { int i; + if (children && db_kind == svn_node_dir) + { + svn_sqlite__stmt_t *stmt; + svn_boolean_t have_row; - if (src_children->nelts != dst_children->nelts) - return FALSE; + *children = apr_array_make(result_pool, 16, sizeof(const char *)); + SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, + STMT_SELECT_OP_DEPTH_CHILDREN_EXISTS)); + SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath, + op_depth)); + SVN_ERR(svn_sqlite__step(&have_row, stmt)); + while (have_row) + { + const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL); - for(i = 0; i < src_children->nelts; ++i) - { - const char *src_child = - APR_ARRAY_IDX(src_children, i, const char *); - const char *dst_child = - APR_ARRAY_IDX(dst_children, i, const char *); + APR_ARRAY_PUSH(*children, const char *) + = svn_relpath_basename(child_relpath, result_pool); - if (strcmp(src_child, dst_child)) - return FALSE; + SVN_ERR(svn_sqlite__step(&have_row, stmt)); + } + SVN_ERR(svn_sqlite__reset(stmt)); } + else if (children) + *children = apr_array_make(result_pool, 0, sizeof(const char *)); - return TRUE; + return SVN_NO_ERROR; } /* Return TRUE if SRC_PROPS and DST_PROPS contain the same properties, @@ -1482,7 +1538,8 @@ update_moved_away_node(node_move_baton_t if (src_kind == svn_node_none || (dst_kind != svn_node_none && src_kind != dst_kind)) { - SVN_ERR(tc_editor_delete(nmb, dst_relpath, scratch_pool)); + SVN_ERR(tc_editor_delete(nmb, dst_relpath, dst_kind, src_kind, + scratch_pool)); } if (nmb->skip) @@ -1492,12 +1549,12 @@ update_moved_away_node(node_move_baton_t { if (src_kind == svn_node_file || src_kind == svn_node_symlink) { - SVN_ERR(tc_editor_add_file(nmb, dst_relpath, + SVN_ERR(tc_editor_add_file(nmb, dst_relpath, dst_kind, src_checksum, src_props, scratch_pool)); } else if (src_kind == svn_node_dir) { - SVN_ERR(tc_editor_add_directory(nmb, dst_relpath, + SVN_ERR(tc_editor_add_directory(nmb, dst_relpath, dst_kind, src_props, scratch_pool)); } } @@ -1609,9 +1666,6 @@ static svn_error_t * drive_tree_conflict_editor(update_move_baton_t *b, const char *src_relpath, const char *dst_relpath, - svn_wc_operation_t operation, - svn_wc_conflict_reason_t local_change, - svn_wc_conflict_action_t incoming_change, svn_wc_conflict_version_t *old_version, svn_wc_conflict_version_t *new_version, svn_wc__db_wcroot_t *wcroot, @@ -1622,16 +1676,6 @@ drive_tree_conflict_editor(update_move_b node_move_baton_t nmb = { 0 }; SVN_ERR(verify_write_lock(wcroot, src_relpath, scratch_pool)); SVN_ERR(verify_write_lock(wcroot, dst_relpath, scratch_pool)); - /* - * Refuse to auto-resolve unsupported tree conflicts. - */ - /* ### Only handle conflicts created by update/switch operations for now. */ - if (operation != svn_wc_operation_update && - operation != svn_wc_operation_switch) - return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("Cannot auto-resolve tree-conflict on '%s'"), - path_for_error_message(wcroot, src_relpath, - scratch_pool)); nmb.umb = b; nmb.src_relpath = src_relpath; @@ -1726,7 +1770,7 @@ update_moved_away_conflict_victim(svn_wc svn_wc_operation_t operation, svn_wc_conflict_reason_t local_change, svn_wc_conflict_action_t incoming_change, - const char *move_src_op_root_relpath, + const char *delete_relpath, svn_wc_conflict_version_t *old_version, svn_wc_conflict_version_t *new_version, svn_cancel_func_t cancel_func, @@ -1734,28 +1778,39 @@ update_moved_away_conflict_victim(svn_wc apr_pool_t *scratch_pool) { update_move_baton_t umb = { NULL }; - svn_sqlite__stmt_t *stmt; - svn_boolean_t have_row; - const char *dummy1, *dummy2, *dummy3; - const char *move_root_dst_abspath; - const char *move_root_dst_relpath; + const char *src_relpath, *dst_relpath; - /* ### assumes wc write lock already held */ + SVN_ERR_ASSERT(svn_relpath_skip_ancestor(delete_relpath, victim_relpath)); /* Construct editor baton. */ - SVN_ERR(svn_wc__db_op_depth_moved_to( - &dummy1, &move_root_dst_relpath, &dummy2, &dummy3, - relpath_depth(move_src_op_root_relpath) - 1, - wcroot, victim_relpath, scratch_pool, scratch_pool)); - if (move_root_dst_relpath == NULL) + + SVN_ERR(find_src_op_depth(&umb.src_op_depth, wcroot, + victim_relpath, relpath_depth(delete_relpath), + scratch_pool)); + + SVN_ERR(svn_wc__db_scan_moved_to_internal(&src_relpath, &dst_relpath, NULL, + wcroot, victim_relpath, + umb.src_op_depth, + scratch_pool, scratch_pool)); + + if (dst_relpath == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("The node '%s' has not been moved away"), path_for_error_message(wcroot, victim_relpath, scratch_pool)); - move_root_dst_abspath - = svn_dirent_join(wcroot->abspath, move_root_dst_relpath, scratch_pool); - SVN_ERR(svn_wc__write_check(db, move_root_dst_abspath, scratch_pool)); + SVN_ERR(verify_write_lock(wcroot, dst_relpath, scratch_pool)); + + /* + * Refuse to auto-resolve unsupported tree conflicts. + */ + /* ### Only handle conflicts created by update/switch operations for now. */ + if (operation != svn_wc_operation_update && + operation != svn_wc_operation_switch) + return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, + _("Cannot auto-resolve tree-conflict on '%s'"), + path_for_error_message(wcroot, src_relpath, + scratch_pool)); umb.operation = operation; umb.old_version= old_version; @@ -1763,22 +1818,8 @@ update_moved_away_conflict_victim(svn_wc umb.db = db; umb.wcroot = wcroot; - umb.dst_op_depth = relpath_depth(move_root_dst_relpath); - - SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, - STMT_SELECT_HIGHEST_WORKING_NODE)); - SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, - move_src_op_root_relpath, - relpath_depth(move_src_op_root_relpath))); - SVN_ERR(svn_sqlite__step(&have_row, stmt)); - if (have_row) - umb.src_op_depth = svn_sqlite__column_int(stmt, 0); - SVN_ERR(svn_sqlite__reset(stmt)); - if (!have_row) - return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, - _("'%s' is not deleted"), - path_for_error_message(wcroot, victim_relpath, - scratch_pool)); + umb.dst_op_depth = relpath_depth(dst_relpath); + umb.dst_op_depth = relpath_depth(dst_relpath); if (umb.src_op_depth == 0) SVN_ERR(suitable_for_move(wcroot, victim_relpath, scratch_pool)); @@ -1791,9 +1832,7 @@ update_moved_away_conflict_victim(svn_wc /* ... and drive it. */ SVN_ERR(drive_tree_conflict_editor(&umb, victim_relpath, - move_root_dst_relpath, - operation, - local_change, incoming_change, + dst_relpath, umb.old_version, umb.new_version, wcroot, @@ -2268,17 +2307,27 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc if (local_relpath[0] != '\0') { - const char *dummy1, *move_dst_op_root_relpath; - const char *move_src_root_relpath, *move_src_op_root_relpath; + const char *move_dst_op_root_relpath; + const char *move_src_root_relpath, *delete_relpath; + svn_error_t *err; /* Is the root of the update moved away? (Impossible for the wcroot) */ - SVN_ERR(svn_wc__db_op_depth_moved_to(&dummy1, &move_dst_op_root_relpath, - &move_src_root_relpath, - &move_src_op_root_relpath, 0, - wcroot, local_relpath, - scratch_pool, scratch_pool)); - if (move_src_root_relpath) + err = svn_wc__db_scan_moved_to_internal(&move_src_root_relpath, + &move_dst_op_root_relpath, + &delete_relpath, + wcroot, local_relpath, + 0 /* BASE */, + scratch_pool, scratch_pool); + + if (err) + { + if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND) + return svn_error_trace(err); + + svn_error_clear(err); + } + else if (move_src_root_relpath) { if (strcmp(move_src_root_relpath, local_relpath)) { @@ -2298,7 +2347,7 @@ svn_wc__db_bump_moved_away(svn_wc__db_wc { SVN_ERR(bump_mark_tree_conflict(wcroot, move_src_root_relpath, - move_src_op_root_relpath, + delete_relpath, move_dst_op_root_relpath, db, scratch_pool)); } @@ -2330,17 +2379,17 @@ resolve_delete_raise_moved_away(svn_wc__ STMT_CREATE_UPDATE_MOVE_LIST)); SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, - STMT_SELECT_OP_DEPTH_MOVED_PAIR)); + STMT_SELECT_MOVED_DESCENDANTS_SHD)); SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath, relpath_depth(local_relpath))); SVN_ERR(svn_sqlite__step(&have_row, stmt)); while(have_row) { svn_error_t *err; - const char *src_relpath = svn_sqlite__column_text(stmt, 0, NULL); - svn_node_kind_t src_kind = svn_sqlite__column_token(stmt, 1, kind_map); - const char *dst_relpath = svn_sqlite__column_text(stmt, 2, NULL); + const char *src_relpath = svn_sqlite__column_text(stmt, 1, NULL); + svn_node_kind_t src_kind = svn_sqlite__column_token(stmt, 2, kind_map); const char *src_repos_relpath = svn_sqlite__column_text(stmt, 3, NULL); + const char *dst_relpath = svn_sqlite__column_text(stmt, 4, NULL); svn_skel_t *conflict; svn_pool_clear(iterpool); @@ -2419,63 +2468,40 @@ svn_wc__db_resolve_delete_raise_moved_aw } static svn_error_t * -break_move(svn_wc__db_wcroot_t *wcroot, - const char *src_relpath, - int src_op_depth, - const char *dst_relpath, - apr_pool_t *scratch_pool) +break_moved_away(svn_wc__db_wcroot_t *wcroot, + const char *local_relpath, + int op_depth, + apr_pool_t *scratch_pool) { - svn_sqlite__stmt_t *stmt; + const char *dst_relpath; + int src_op_depth; + const char *delete_relpath; - SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, - STMT_CLEAR_MOVED_TO_RELPATH)); - SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, src_relpath, - src_op_depth)); - SVN_ERR(svn_sqlite__step_done(stmt)); + SVN_ERR(find_src_op_depth(&src_op_depth, wcroot, + local_relpath, op_depth, + scratch_pool)); - /* The destination is always an op-root, so we can calculate the depth - from there. */ - SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, - STMT_CLEAR_MOVED_HERE_RECURSIVE)); - SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, - dst_relpath, relpath_depth(dst_relpath))); - SVN_ERR(svn_sqlite__step_done(stmt)); - return SVN_NO_ERROR; -} + SVN_ERR(svn_wc__db_scan_moved_to_internal(NULL, &dst_relpath, + &delete_relpath, + wcroot, local_relpath, + src_op_depth, + scratch_pool, scratch_pool)); -svn_error_t * -svn_wc__db_resolve_break_moved_away_internal(svn_wc__db_wcroot_t *wcroot, - const char *local_relpath, - int op_depth, - apr_pool_t *scratch_pool) -{ - const char *dummy1, *move_dst_op_root_relpath; - const char *dummy2, *move_src_op_root_relpath; + SVN_ERR_ASSERT(dst_relpath != NULL && delete_relpath != NULL); - /* We want to include the passed op-depth, but the function does a > check */ - SVN_ERR(svn_wc__db_op_depth_moved_to(&dummy1, &move_dst_op_root_relpath, - &dummy2, - &move_src_op_root_relpath, - op_depth - 1, - wcroot, local_relpath, - scratch_pool, scratch_pool)); - - SVN_ERR_ASSERT(move_src_op_root_relpath != NULL - && move_dst_op_root_relpath != NULL); - - SVN_ERR(break_move(wcroot, local_relpath, - relpath_depth(move_src_op_root_relpath), - move_dst_op_root_relpath, - scratch_pool)); + SVN_ERR(svn_wc__db_op_break_move_internal(wcroot, local_relpath, + relpath_depth(delete_relpath), + dst_relpath, NULL, + scratch_pool)); return SVN_NO_ERROR; } static svn_error_t * -break_moved_away_children_internal(svn_wc__db_wcroot_t *wcroot, - const char *local_relpath, - apr_pool_t *scratch_pool) +break_moved_away_children(svn_wc__db_wcroot_t *wcroot, + const char *local_relpath, + apr_pool_t *scratch_pool) { svn_sqlite__stmt_t *stmt; svn_boolean_t have_row; @@ -2485,7 +2511,7 @@ break_moved_away_children_internal(svn_w STMT_CREATE_UPDATE_MOVE_LIST)); SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, - STMT_SELECT_MOVED_DESCENDANTS)); + STMT_SELECT_MOVED_DESCENDANTS_SRC)); SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath, relpath_depth(local_relpath))); SVN_ERR(svn_sqlite__step(&have_row, stmt)); @@ -2493,15 +2519,16 @@ break_moved_away_children_internal(svn_w iterpool = svn_pool_create(scratch_pool); while (have_row) { - const char *src_relpath = svn_sqlite__column_text(stmt, 0, NULL); - const char *dst_relpath = svn_sqlite__column_text(stmt, 1, NULL); - int src_op_depth = svn_sqlite__column_int(stmt, 2); + int src_op_depth = svn_sqlite__column_int(stmt, 0) ; + const char *src_relpath = svn_sqlite__column_text(stmt, 1, NULL); + const char *dst_relpath = svn_sqlite__column_text(stmt, 4, NULL); svn_error_t *err; svn_pool_clear(iterpool); - err = break_move(wcroot, src_relpath, src_op_depth, dst_relpath, - iterpool); + err = svn_wc__db_op_break_move_internal(wcroot, + src_relpath, src_op_depth, + dst_relpath, NULL, iterpool); if (! err) { @@ -2549,11 +2576,10 @@ svn_wc__db_resolve_break_moved_away(svn_ src_relpath = svn_dirent_skip_ancestor(wcroot->abspath, src_op_root_abspath); SVN_ERR_ASSERT(src_relpath != NULL); - SVN_WC__DB_WITH_TXN( - svn_wc__db_resolve_break_moved_away_internal(wcroot, local_relpath, - relpath_depth(src_relpath), - scratch_pool), - wcroot); + SVN_WC__DB_WITH_TXN(break_moved_away(wcroot, local_relpath, + relpath_depth(src_relpath), + scratch_pool), + wcroot); if (notify_func) { @@ -2591,7 +2617,7 @@ svn_wc__db_resolve_break_moved_away_chil VERIFY_USABLE_WCROOT(wcroot); SVN_WC__DB_WITH_TXN( - break_moved_away_children_internal(wcroot, local_relpath, scratch_pool), + break_moved_away_children(wcroot, local_relpath, scratch_pool), wcroot); SVN_ERR(svn_wc__db_update_move_list_notify(wcroot, Modified: subversion/branches/pin-externals/subversion/mod_dav_svn/util.c URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/mod_dav_svn/util.c?rev=1658686&r1=1658685&r2=1658686&view=diff ============================================================================== --- subversion/branches/pin-externals/subversion/mod_dav_svn/util.c (original) +++ subversion/branches/pin-externals/subversion/mod_dav_svn/util.c Tue Feb 10 11:41:57 2015 @@ -116,51 +116,51 @@ dav_svn__convert_err(svn_error_t *serr, const char *message, apr_pool_t *pool) { - dav_error *derr; + dav_error *derr; - /* Remove the trace-only error chain links. We need predictable - protocol behavior regardless of whether or not we're in a - debugging build. */ - svn_error_t *purged_serr = svn_error_purge_tracing(serr); - - /* ### someday mod_dav_svn will send back 'rich' error tags, much - finer grained than plain old svn_error_t's. But for now, all - svn_error_t's are marshalled to the client via the single - generic tag nestled within a block. */ - - /* Examine the Subverion error code, and select the most - appropriate HTTP status code. If no more appropriate HTTP - status code maps to the Subversion error code, use the one - suggested status provided by the caller. */ - switch (purged_serr->apr_err) - { - case SVN_ERR_FS_NOT_FOUND: - status = HTTP_NOT_FOUND; - break; - case SVN_ERR_UNSUPPORTED_FEATURE: - status = HTTP_NOT_IMPLEMENTED; - break; - case SVN_ERR_FS_LOCK_OWNER_MISMATCH: - case SVN_ERR_FS_PATH_ALREADY_LOCKED: - status = HTTP_LOCKED; - break; - case SVN_ERR_FS_PROP_BASEVALUE_MISMATCH: - status = HTTP_PRECONDITION_FAILED; - break; - /* add other mappings here */ - } - - derr = build_error_chain(pool, purged_serr, status); - if (message != NULL - && !svn_error_find_cause(purged_serr, SVN_ERR_REPOS_HOOK_FAILURE)) - /* Don't hide hook failures; we might hide the error text */ - derr = dav_push_error(pool, status, purged_serr->apr_err, - message, derr); + /* Remove the trace-only error chain links. We need predictable + protocol behavior regardless of whether or not we're in a + debugging build. */ + svn_error_t *purged_serr = svn_error_purge_tracing(serr); + + /* ### someday mod_dav_svn will send back 'rich' error tags, much + finer grained than plain old svn_error_t's. But for now, all + svn_error_t's are marshalled to the client via the single + generic tag nestled within a block. */ + + /* Examine the Subverion error code, and select the most + appropriate HTTP status code. If no more appropriate HTTP + status code maps to the Subversion error code, use the one + suggested status provided by the caller. */ + switch (purged_serr->apr_err) + { + case SVN_ERR_FS_NOT_FOUND: + status = HTTP_NOT_FOUND; + break; + case SVN_ERR_UNSUPPORTED_FEATURE: + status = HTTP_NOT_IMPLEMENTED; + break; + case SVN_ERR_FS_LOCK_OWNER_MISMATCH: + case SVN_ERR_FS_PATH_ALREADY_LOCKED: + status = HTTP_LOCKED; + break; + case SVN_ERR_FS_PROP_BASEVALUE_MISMATCH: + status = HTTP_PRECONDITION_FAILED; + break; + /* add other mappings here */ + } + + derr = build_error_chain(pool, purged_serr, status); + if (message != NULL + && !svn_error_find_cause(purged_serr, SVN_ERR_REPOS_HOOK_FAILURE)) + /* Don't hide hook failures; we might hide the error text */ + derr = dav_push_error(pool, status, purged_serr->apr_err, + message, derr); - /* Now, destroy the Subversion error. */ - svn_error_clear(serr); + /* Now, destroy the Subversion error. */ + svn_error_clear(serr); - return derr; + return derr; } @@ -571,11 +571,12 @@ dav_svn__sanitize_error(svn_error_t *ser "%s", purged_serr->message); } - svn_error_clear(serr); - } - return dav_svn__convert_err(safe_err, http_status, - apr_psprintf(r->pool, "%s", safe_err->message), - r->pool); + svn_error_clear(serr); + } + + return dav_svn__convert_err(safe_err, http_status, + apr_psprintf(r->pool, "%s", safe_err->message), + r->pool); } @@ -856,7 +857,7 @@ dav_svn__parse_request_skel(svn_skel_t * *skel = NULL; status = request_body_to_string(&skel_str, r, pool); if (status != OK) - return OK; + return status; *skel = svn_skel__parse(skel_str->data, skel_str->len, pool); return OK; Modified: subversion/branches/pin-externals/subversion/svn/resolve-cmd.c URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/svn/resolve-cmd.c?rev=1658686&r1=1658685&r2=1658686&view=diff ============================================================================== --- subversion/branches/pin-externals/subversion/svn/resolve-cmd.c (original) +++ subversion/branches/pin-externals/subversion/svn/resolve-cmd.c Tue Feb 10 11:41:57 2015 @@ -123,7 +123,7 @@ svn_cl__resolve(apr_getopt_t *os, svn_pool_destroy(iterpool); if (had_error) - return svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS, NULL, + return svn_error_create(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Failure occurred resolving one or more " "conflicts")); Modified: subversion/branches/pin-externals/subversion/tests/cmdline/authz_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/cmdline/authz_tests.py?rev=1658686&r1=1658685&r2=1658686&view=diff ============================================================================== --- subversion/branches/pin-externals/subversion/tests/cmdline/authz_tests.py (original) +++ subversion/branches/pin-externals/subversion/tests/cmdline/authz_tests.py Tue Feb 10 11:41:57 2015 @@ -176,7 +176,7 @@ def authz_read_access(sbox): expected_err = ".*svn: E170001: Authorization failed.*" # create some folders with spaces in their names - svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', '-m', 'logmsg', + svntest.actions.run_and_verify_svn(None, [], 'mkdir', '-m', 'logmsg', fws_url, fws_empty_folder_url) write_restrictive_svnserve_conf(sbox.repo_dir) @@ -193,73 +193,65 @@ def authz_read_access(sbox): (svntest.main.wc_author + " = r")}) # read a remote file - svntest.actions.run_and_verify_svn(None, ["This is the file 'iota'.\n"], + svntest.actions.run_and_verify_svn(["This is the file 'iota'.\n"], [], 'cat', iota_url) # read a remote file, readably by user specific exception - svntest.actions.run_and_verify_svn(None, ["This is the file 'chi'.\n"], + svntest.actions.run_and_verify_svn(["This is the file 'chi'.\n"], [], 'cat', chi_url) # read a remote file, unreadable: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cat', lambda_url) # read a remote file, unreadable through recursion: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cat', alpha_url) # read a remote file, user specific authorization is ignored because * = rw - svntest.actions.run_and_verify_svn(None, ["This is the file 'pi'.\n"], + svntest.actions.run_and_verify_svn(["This is the file 'pi'.\n"], [], 'cat', pi_url) # open a remote folder(ls) - svntest.actions.run_and_verify_svn("ls remote root folder", - ["A/\n", "iota\n"], + svntest.actions.run_and_verify_svn(["A/\n", "iota\n"], [], 'ls', root_url) # open a remote folder(ls), unreadable: should fail - svntest.actions.run_and_verify_svn(None, - None, svntest.verify.AnyOutput, 'ls', + svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput, 'ls', B_url) # open a remote folder(ls) with spaces, should succeed - svntest.actions.run_and_verify_svn(None, - None, [], 'ls', + svntest.actions.run_and_verify_svn(None, [], 'ls', fws_empty_folder_url) # open a remote folder(ls), unreadable through recursion: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ls', E_url) # copy a remote file - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', iota_url, D_url, '-m', 'logmsg') # copy a remote file, source is unreadable: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '-m', 'logmsg', lambda_url, D_url) # copy a remote folder - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', C_url, D_url, '-m', 'logmsg') # copy a remote folder, source is unreadable: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '-m', 'logmsg', E_url, D_url) @@ -270,15 +262,13 @@ def authz_read_access(sbox): # into two operations, a committed copy followed by a committed # deletion. But the editor drive required to do these atomically # today is prohibitive. - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'mv', '-m', 'logmsg', alpha_url, F_alpha_url) ## copy a remote file, source/target ancestor is readonly ## we fail here due to issue #3242. - #svntest.actions.run_and_verify_svn(None, - # None, [], + #svntest.actions.run_and_verify_svn(# None, [], # 'cp', '-m', 'logmsg', # alpha_url, F_alpha_url) @@ -312,64 +302,55 @@ def authz_write_access(sbox): D_url = A_url + '/D' # copy a remote file, target is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '-m', 'logmsg', lambda_url, D_url) # copy a remote folder, target is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '-m', 'logmsg', E_url, D_url) # delete a file, target is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'rm', '-m', 'logmsg', iota_url) # delete a folder, target is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'rm', '-m', 'logmsg', D_url) # create a folder, target is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'mkdir', '-m', 'logmsg', A_url+'/newfolder') # move a remote file, source is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'mv', '-m', 'logmsg', mu_url, C_url) # move a remote folder, source is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'mv', '-m', 'logmsg', D_url, C_url) # move a remote file, target is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'mv', '-m', 'logmsg', lambda_url, D_url) # move a remote folder, target is readonly: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'mv', '-m', 'logmsg', B_url, D_url) @@ -396,7 +377,7 @@ def authz_checkout_test(sbox): write_authz_file(sbox, { "/": "* ="}) # checkout a working copy, should fail - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'co', sbox.repo_url, local_dir) # 2nd part: now enable read access @@ -540,17 +521,17 @@ def authz_log_and_tracing_test(sbox): rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho') svntest.main.file_append(rho_path, 'new appended text for rho') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'add file rho', sbox.wc_dir) svntest.main.file_append(rho_path, 'extra change in rho') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'changed file rho', sbox.wc_dir) # copy a remote file - svntest.actions.run_and_verify_svn(None, None, [], 'cp', + svntest.actions.run_and_verify_svn(None, [], 'cp', rho_path, D_url, '-m', 'copy rho to readable area') @@ -570,8 +551,7 @@ def authz_log_and_tracing_test(sbox): # changed file in this rev. is not readable anymore, so author and date # should be hidden, like this: # r2 | (no author) | (no date) | 1 line - svntest.actions.run_and_verify_svn(None, - ".*(no author).*(no date).*|-+\n|\n", [], + svntest.actions.run_and_verify_svn(".*(no author).*(no date).*|-+\n|\n", [], 'log', '-r', '2', '--limit', '1', wc_dir) @@ -583,20 +563,19 @@ def authz_log_and_tracing_test(sbox): # if we do the same thing directly on the unreadable file, we get: # svn: Item is not readable - svntest.actions.run_and_verify_svn(None, None, expected_err2, + svntest.actions.run_and_verify_svn(None, expected_err2, 'log', rho_path) # while the HEAD rev of the copy is readable in /A/D, its parent in # /A/D/G is not, so don't spill any info there either. - svntest.actions.run_and_verify_svn(None, - ".*(no author).*(no date).*|-+\n|\n", [], + svntest.actions.run_and_verify_svn(".*(no author).*(no date).*|-+\n|\n", [], 'log', '-r', '2', '--limit', '1', D_url) # Test that only author/date are shown for partially visible revisions. svntest.actions.enable_revprop_changes(sbox.repo_dir) write_authz_file(sbox, { "/": "* = rw"}) svntest.actions.run_and_verify_svn( - None, None, [], # message, expected_stdout, expected_stderr + None, [], # expected_stdout, expected_stderr 'ps', '--revprop', '-r1', 'foobar', 'foo bar', sbox.repo_url) svntest.actions.run_and_verify_log_xml( expected_revprops=[{'svn:author': svntest.main.wc_author, 'svn:date': '', @@ -612,7 +591,7 @@ def authz_log_and_tracing_test(sbox): ## cat # now see if we can look at the older version of rho - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cat', '-r', '2', D_url+'/rho') if sbox.repo_url.startswith('http'): @@ -620,19 +599,19 @@ def authz_log_and_tracing_test(sbox): else: expected_err2 = ".*svn: E220001: Unreadable path encountered; access denied.*" - svntest.actions.run_and_verify_svn(None, None, expected_err2, + svntest.actions.run_and_verify_svn(None, expected_err2, 'cat', '-r', '2', G_url+'/rho') ## diff # we shouldn't see the diff of a file in an unreadable path - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'diff', '-r', 'HEAD', G_url+'/rho') - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'diff', '-r', '2', D_url+'/rho') - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'diff', '-r', '2:4', D_url+'/rho') # test whether read access is correctly granted and denied @@ -660,16 +639,14 @@ def authz_aliases(sbox): iota_url = root_url + '/iota' # copy a remote file, target is readonly for jconstant: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '--username', svntest.main.wc_author2, '-m', 'logmsg', iota_url, B_url) # try the same action, but as user jray (alias of jrandom), should work. - svntest.actions.run_and_verify_svn(None, - None, [], + svntest.actions.run_and_verify_svn(None, [], 'cp', '-m', 'logmsg', iota_url, B_url) @@ -700,8 +677,7 @@ def authz_validate(sbox): expected_err = ".*@undefined_group.*" # validation of this authz file should fail, so no repo access - svntest.actions.run_and_verify_svn("ls remote folder", - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ls', A_url) @@ -720,8 +696,7 @@ devs = @devs1, dev3, dev4""" }) expected_err = ".*Circular dependency.*" # validation of this authz file should fail, so no repo access - svntest.actions.run_and_verify_svn("ls remote folder", - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ls', A_url) @@ -735,8 +710,7 @@ users = @devs1, @devs2, user1, user2""" # validation of this authz file should *not* fail (where formerly, # it complained about circular dependencies that do not, in fact, # exist), so this is business as usual. - svntest.actions.run_and_verify_svn("ls remote folder", - ['B/\n', 'C/\n', 'D/\n', 'mu\n'], + svntest.actions.run_and_verify_svn(['B/\n', 'C/\n', 'D/\n', 'mu\n'], [], 'ls', A_url) @@ -767,15 +741,13 @@ def authz_locking(sbox): mu_path = os.path.join(wc_dir, 'A', 'mu') # lock a file url, target is readonly: should fail - svntest.actions.run_and_verify_svn2(None, - None, expected_err, expected_status, + svntest.actions.run_and_verify_svn2(None, expected_err, expected_status, 'lock', '-m', 'lock msg', iota_url) # lock a file path, target is readonly: should fail - svntest.actions.run_and_verify_svn2(None, - None, expected_err, expected_status, + svntest.actions.run_and_verify_svn2(None, expected_err, expected_status, 'lock', '-m', 'lock msg', iota_path) @@ -784,8 +756,7 @@ def authz_locking(sbox): # Get a lock on /A/mu and try to commit it. # lock a file path, target is writeable: should succeed - svntest.actions.run_and_verify_svn(None, - None, [], + svntest.actions.run_and_verify_svn(None, [], 'lock', '-m', 'lock msg', mu_path) @@ -817,8 +788,7 @@ def authz_locking(sbox): expected_err = ".*svn: warning: W160039: Unlock.*[Ff]orbidden.*" expected_status = 0 - svntest.actions.run_and_verify_svn2(None, - None, expected_err, expected_status, + svntest.actions.run_and_verify_svn2(None, expected_err, expected_status, 'lock', '-m', 'lock msg', mu_path, @@ -858,23 +828,23 @@ def authz_svnserve_anon_access_read(sbox "/A/D" : "* = r" }) # Perform a checkout of /A/B, expecting to see no errors. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'checkout', B_url, B_path) # Anonymous users should be able to check out /A/D. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'checkout', D_url, D_path) # Now try a switch. svntest.main.safe_rmtree(D_path) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'switch', D_url, B_path) # Check out /A/B with an unknown username, expect error. svntest.actions.run_and_verify_svn( - None, None, + None, ".*Authentication error from server: Username not found.*", 'checkout', '--non-interactive', @@ -882,12 +852,12 @@ def authz_svnserve_anon_access_read(sbox B_url, B_path + '_unsuccessful') # Check out a second copy of /A/B, make changes for later merge. - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'checkout', B_url, other_B_path) other_alpha_path = os.path.join(other_B_path, 'E', 'alpha') svntest.main.file_append(other_alpha_path, "fish\n") - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'commit', '-m', 'log msg', other_B_path) @@ -896,7 +866,7 @@ def authz_svnserve_anon_access_read(sbox # authz here, not the semantics of the merge. (Merges had been # failing in authz, for the reasons summarized in # http://subversion.tigris.org/issues/show_bug.cgi?id=2712#desc13.) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'merge', '-c', '2', B_url, B_path) @@ -1020,7 +990,7 @@ def multiple_matches(sbox): # Prohibit access and commit fails write_authz_file(sbox, {'/': 'jrandom ='}) - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '-m', 'fail copy', root_url, root_url + '/fail') @@ -1067,7 +1037,7 @@ def wc_wc_copy_revert(sbox): expected_status.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta') svntest.actions.run_and_verify_status(sbox.wc_dir, expected_status) - svntest.actions.run_and_verify_svn(None, None, + svntest.actions.run_and_verify_svn(None, 'svn: E155035: Cannot copy.*excluded by server', 'cp', sbox.ospath('A'), sbox.ospath('A2')) @@ -1080,17 +1050,17 @@ def wc_wc_copy_revert(sbox): '! - ? ? ' + sbox.ospath('A2/B/E') + '\n', ]) expected_output.match_all = False - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'st', '--verbose', sbox.ospath('A2')) # Issue 4025, info SEGV on incomplete working node - svntest.actions.run_and_verify_svn(None, None, + svntest.actions.run_and_verify_svn(None, 'svn: E145000: .*unrecognized node kind', 'info', sbox.ospath('A2/B/E')) # Issue 4026, copy assertion on incomplete working node - svntest.actions.run_and_verify_svn(None, None, + svntest.actions.run_and_verify_svn(None, 'svn: E145001: cannot handle node kind', 'cp', sbox.ospath('A2/B'), sbox.ospath('B3')) @@ -1099,10 +1069,10 @@ def wc_wc_copy_revert(sbox): '! - ? ? ' + sbox.ospath('B3/E') + '\n', ]) expected_output.match_all = False - svntest.actions.run_and_verify_svn(None, expected_output, [], + svntest.actions.run_and_verify_svn(expected_output, [], 'st', '--verbose', sbox.ospath('B3')) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'revert', '--recursive', sbox.ospath('A2'), sbox.ospath('B3')) @@ -1140,8 +1110,7 @@ def authz_recursive_ls(sbox): 'A/D/gamma', 'iota', ] - svntest.actions.run_and_verify_svn('recursive ls from /', - map(lambda x: x + '\n', expected_entries), + svntest.actions.run_and_verify_svn(map(lambda x: x + '\n', expected_entries), [], 'ls', '-R', sbox.repo_url) @@ -1176,7 +1145,7 @@ def case_sensitive_authz(sbox): # test the case-sensitivity of the path inside the repo write_authz_file(sbox, {"/": "jrandom = r", "/A/mu": "jrandom =", "/a/Mu": "jrandom = rw"}) - svntest.actions.run_and_verify_svn2(None, None, + svntest.actions.run_and_verify_svn2(None, expected_error_for_cat, 1, 'cat', mu_url) @@ -1209,7 +1178,7 @@ def case_sensitive_authz(sbox): os.path.basename(sbox.repo_dir) + ":/A/mu": "jrandom =", mixed_case_repo_dir + ":/A/mu": "jrandom = rw"} write_authz_file(sbox, {}, sec_mixed_case) - svntest.actions.run_and_verify_svn2(None, None, + svntest.actions.run_and_verify_svn2(None, expected_error_for_cat, 1, 'cat', mu_url) @@ -1229,8 +1198,7 @@ def case_sensitive_authz(sbox): write_authz_file(sbox, {"/": "jrandom = r", "/A": "jrandom = r", "/A/mu": "jrandom = rw"}) - svntest.actions.run_and_verify_svn2('No error', - svntest.verify.AnyOutput, [], + svntest.actions.run_and_verify_svn2(svntest.verify.AnyOutput, [], 0, 'cat', mu_url) # Commit the file. svntest.actions.run_and_verify_commit(wc_dir, @@ -1294,9 +1262,9 @@ def wc_delete(sbox): expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1) expected_err = ".*svn: E155035: .*excluded by server*" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'rm', sbox.ospath('A/B/E'), '--force') - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'rm', sbox.ospath('A')) expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1) @@ -1317,7 +1285,7 @@ def wc_commit_error_handling(sbox): # Creating editor fail: unfriendly error expected_err = "(svn: E175013: .*[Ff]orbidden.*)|" + \ "(svn: E170001: Authorization failed)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') write_authz_file(sbox, {'/' : '* = rw', @@ -1328,7 +1296,7 @@ def wc_commit_error_handling(sbox): expected_err = "(svn: E195023: Changing directory '.*Z' is forbidden)|" + \ "(svn: E220004: Access denied)|" + \ "(svn: E175013: Access to '.*Z' forbidden)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') sbox.simple_revert('A/Z') @@ -1341,7 +1309,7 @@ def wc_commit_error_handling(sbox): expected_err = "(svn: E195023: Changing file '.*zeta' is forbidden)|" + \ "(svn: E220004: Access denied)|" + \ "(svn: E175013: Access to '.*zeta' forbidden)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') sbox.simple_revert('A/zeta') @@ -1351,7 +1319,7 @@ def wc_commit_error_handling(sbox): # on editor->edit_close(). expected_err = "(svn: E175013: .*[Ff]orbidden.*)|" + \ "(svn: E220004: Access denied)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') sbox.simple_revert('A/D') @@ -1363,7 +1331,7 @@ def wc_commit_error_handling(sbox): expected_err = "(svn: E195023: Changing file '.*lambda' is forbidden.*)|" + \ "(svn: E220004: Access denied)|" + \ "(svn: E175013: Access to '.*lambda' forbidden)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') sbox.simple_revert('A/B/lambda') @@ -1374,7 +1342,7 @@ def wc_commit_error_handling(sbox): expected_err = "(svn: E195023: Changing file '.*lambda' is forbidden.*)|" + \ "(svn: E220004: Access denied)|" + \ "(svn: E175013: Access to '.*lambda' forbidden)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') sbox.simple_revert('A/B/lambda') @@ -1385,7 +1353,7 @@ def wc_commit_error_handling(sbox): expected_err = "(svn: E195023: Changing directory '.*F' is forbidden.*)|" + \ "(svn: E220004: Access denied)|" + \ "(svn: E175013: Access to '.*F' forbidden)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') sbox.simple_revert('A/B/F') @@ -1395,7 +1363,7 @@ def wc_commit_error_handling(sbox): expected_err = "(svn: E195023: Changing file '.*mu' is forbidden.*)|" + \ "(svn: E220004: Access denied)|" + \ "(svn: E175013: Access to '.*mu' forbidden)" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'ci', wc_dir, '-m', '') @@ -1415,15 +1383,15 @@ def upgrade_absent(sbox): # Attempt to use the working copy, this should give an error expected_stderr = wc_is_too_old_regex - svntest.actions.run_and_verify_svn(None, None, expected_stderr, + svntest.actions.run_and_verify_svn(None, expected_stderr, 'info', sbox.wc_dir) # Now upgrade the working copy - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'upgrade', sbox.wc_dir) # Relocate to allow finding the repository - svntest.actions.run_and_verify_svn(None, None, [], 'relocate', + svntest.actions.run_and_verify_svn(None, [], 'relocate', 'svn://127.0.0.1/authz_tests-2', sbox.repo_url, sbox.wc_dir) @@ -1515,37 +1483,34 @@ def authz_svnserve_groups(sbox): expected_err = ".*svn: E170001: Authorization failed.*" # read a remote file - svntest.actions.run_and_verify_svn(None, ["This is the file 'lambda'.\n"], + svntest.actions.run_and_verify_svn(["This is the file 'lambda'.\n"], [], 'cat', lambda_url) # read a remote file - svntest.actions.run_and_verify_svn(None, ["This is the file 'pi'.\n"], + svntest.actions.run_and_verify_svn(["This is the file 'pi'.\n"], [], 'cat', pi_url) # read a remote file, unreadable: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cat', alpha_url) # copy a remote file, source is unreadable: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '-m', 'logmsg', alpha_url, B_url) # copy a remote folder - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'cp', '-m', 'logmsg', F_url, D_url) # copy a remote folder, source is unreadable: should fail - svntest.actions.run_and_verify_svn(None, - None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'cp', '-m', 'logmsg', E_url, D_url) @@ -1561,7 +1526,7 @@ def authz_del_from_subdir(sbox): write_restrictive_svnserve_conf(sbox.repo_dir) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'rm', sbox.repo_url + '/A/mu', '-m', '') @@ -1573,14 +1538,14 @@ def log_diff_dontdothat(sbox): ddt_url = sbox.repo_url.replace('/svn-test-work/', '/ddt-test-work/') - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'log', sbox.repo_url, '-c', 1, '--diff') # We should expect a PASS or a proper error message instead of # svn: E175009: XML parsing failed: (403 Forbidden) expected_err = ".*E175013: Access to '.*authz_tests-28.*' forbidden" - svntest.actions.run_and_verify_svn(None, None, expected_err, + svntest.actions.run_and_verify_svn(None, expected_err, 'log', ddt_url, '-c', 1, '--diff') @@ -1606,7 +1571,7 @@ def authz_file_external_to_authz(sbox): svntest.actions.run_and_verify_update(wc_dir, None, None, expected_status) - svntest.actions.run_and_verify_svn(None, None, [], + svntest.actions.run_and_verify_svn(None, [], 'cp', repo_url + '/A', repo_url + '/Z', '-m', 'Add Z') @@ -1622,6 +1587,37 @@ def authz_file_external_to_authz(sbox): svntest.actions.run_and_verify_update(wc_dir, None, None, expected_status) +@Skip(svntest.main.is_ra_type_file) +def authz_log_censor_revprops(sbox): + "log censors revprops for partially visible revs" + + sbox.build(create_wc = False) + + svntest.actions.enable_revprop_changes(sbox.repo_dir) + write_restrictive_svnserve_conf(sbox.repo_dir) + write_authz_file(sbox, {"/" : "* = rw"}) + + # Add the revision property 's'. + svntest.actions.run_and_verify_svn(None, [], 'ps', '--revprop', + '-r1', 's', 'secret', sbox.repo_url) + + # With blanket access, both 'svn:author' and 's' are a part of the output. + svntest.actions.run_and_verify_log_xml( + expected_revprops=[{'svn:author': svntest.main.wc_author, 's': 'secret'}], + args=['--with-revprop', 'svn:author', '--with-revprop', 's', + '-r1', sbox.repo_url]) + + # Make the revision partially visible, but ask for both 'svn:author' and + # 's'. The second revision property should be censored out, as we only + # allow 'svn:author' and 'svn:date' for partially visible revisions. + # This used to fail around trunk@1658379. + write_authz_file(sbox, {"/" : "* = rw", "/A/B" : "* = "}) + + svntest.actions.run_and_verify_log_xml( + expected_revprops=[{'svn:author': svntest.main.wc_author}], + args=['--with-revprop', 'svn:author', '--with-revprop', 's', + '-r1', sbox.repo_url]) + ######################################################################## # Run the tests @@ -1657,6 +1653,7 @@ test_list = [ None, authz_del_from_subdir, log_diff_dontdothat, authz_file_external_to_authz, + authz_log_censor_revprops, ] serial_only = True Modified: subversion/branches/pin-externals/subversion/tests/cmdline/autoprop_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/cmdline/autoprop_tests.py?rev=1658686&r1=1658685&r2=1658686&view=diff ============================================================================== --- subversion/branches/pin-externals/subversion/tests/cmdline/autoprop_tests.py (original) +++ subversion/branches/pin-externals/subversion/tests/cmdline/autoprop_tests.py Tue Feb 10 11:41:57 2015 @@ -318,7 +318,7 @@ def fail_add_mixed_eol_style(sbox): expected_stderr = "svn: E200009: File '.*" + filename + \ "' has inconsistent newlines" + \ "|" + "svn: E135000: Inconsistent line ending style\n" - run_and_verify_svn(None, [], expected_stderr, + run_and_verify_svn([], expected_stderr, 'add', filepath, *parameters) expected_status = svntest.wc.State(sbox.wc_dir, @@ -466,7 +466,7 @@ def inheritable_autoprops_test(sbox, cmd sbox.simple_propset(SVN_PROP_INHERITABLE_AUTOPROPS, '*.py = svn:mime-type=text/x-python', 'A/D') - svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + svntest.actions.run_and_verify_svn(None, [], 'ci', '-m', 'Add some ' + SVN_PROP_INHERITABLE_AUTOPROPS + ' properties', wc_dir) @@ -674,7 +674,7 @@ def svn_prop_inheritable_autoprops_props sbox.build() svntest.actions.run_and_verify_svn( - None, None, + None, ".*Cannot set '" + SVN_PROP_INHERITABLE_AUTOPROPS + "' on a file.*", 'ps', SVN_PROP_INHERITABLE_AUTOPROPS, '*.c=svn:eol-style=native', sbox.ospath('iota')) @@ -718,9 +718,9 @@ def svn_prop_inheritable_autoprops_unver os.chdir(saved_wd) # Check the resulting autoprops. - svntest.actions.run_and_verify_svn(None, 'native\n', [], + svntest.actions.run_and_verify_svn('native\n', [], 'pg', 'svn:eol-style', foo_path) - svntest.actions.run_and_verify_svn(None, 'CR\n', [], + svntest.actions.run_and_verify_svn('CR\n', [], 'pg', 'svn:eol-style', bar_path) ########################################################################