Private APIs don't need versioning. Just change all callers.
On Wed, Jul 15, 2009 at 22:16, Hyrum K. Wright<hyrum_at_hyrumwright.org> wrote:
> Author: hwright
> Date: Wed Jul 15 13:16:30 2009
> New Revision: 38426
>
> Log:
> Rev a private API to use a working copy context.
>
> * subversion/include/private/svn_wc_private.h
> Â (svn_wc__get_tree_conflict): Use a wc context and abspath pair.
>
> * subversion/libsvn_wc/adm_ops.c
> Â (revert_internal, resolve_found_entry_callback),
> * subversion/libsvn_wc/status.c
> Â (assemble_status, get_dir_status),
> * subversion/libsvn_wc/questions.c
> Â (svn_wc_conflicted_p2),
> * subversion/libsvn_wc/entries.c
> Â (visit_tc_too_error_handler, svn_wc__walk_entries_and_tc),
> * subversion/libsvn_wc/update_editor.c
> Â (already_in_a_tree_conflict):
> Â Â Update callers to use svn_wc__get_tree_conflict2() with an absolute path.
>
> * subversion/libsvn_wc/tree_conflicts.c
> Â (svn_wc__add_tree_conflict): Update to use svn_wc__get_tree_conflict2() with
> Â Â an absolute path.
> Â (svn_wc__get_tree_conflict): Update parameters, add an assertion, and update
> Â Â wrapping call to svn_wc__get_tree_conflict2().
> Â (svn_wc__get_tree_conflict2): Take an absolute path, and assert that what we
> Â Â got.
>
> * subversion/libsvn_client/info.c
> Â (found_entry_baton): Add a wc context.
> Â (info_found_entry_callback, info_error_handler): Update callers to
> Â Â svn_wc__get_tree_conflict().
> Â (crawl_entries): Initialize the working copy context.
>
> * subversion/libsvn_client/merge.c
> Â (tree_conflict, tree_conflict_on_add): Update callers to
> Â Â svn_wc__get_tree_conflict().
>
> * subversion/libsvn_client/commit_util.c
> Â (svn_client__harvest_committables): Same.
>
> Modified:
> Â trunk/subversion/include/private/svn_wc_private.h
> Â trunk/subversion/libsvn_client/commit_util.c
> Â trunk/subversion/libsvn_client/info.c
> Â trunk/subversion/libsvn_client/merge.c
> Â trunk/subversion/libsvn_wc/adm_ops.c
> Â trunk/subversion/libsvn_wc/entries.c
> Â trunk/subversion/libsvn_wc/questions.c
> Â trunk/subversion/libsvn_wc/status.c
> Â trunk/subversion/libsvn_wc/tree_conflicts.c
> Â trunk/subversion/libsvn_wc/update_editor.c
>
> Modified: trunk/subversion/include/private/svn_wc_private.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/private/svn_wc_private.h?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/include/private/svn_wc_private.h  Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/include/private/svn_wc_private.h  Wed Jul 15 13:16:30 2009     (r38426)
> @@ -146,17 +146,19 @@ svn_wc__set_file_external_location(svn_w
>
> Â /** Set @a *tree_conflict to a newly allocated @c
> Â * svn_wc_conflict_description_t structure describing the tree
> - * conflict state of @a victim_path, or to @c NULL if @a victim_path
> - * is not in a state of tree conflict. @a adm_access is the admin
> - * access baton for @a victim_path. Use @a pool for all allocations.
> + * conflict state of @a victim_abspath, or to @c NULL if @a victim_abspath
> + * is not in a state of tree conflict. @a wc_ctx is a working copy context
> + * used to access @a victim_path. Â Allocate @a *tree_conflict in @a result_pool,
> + * use @a scratch_pool for temporary allocations.
> Â *
> - * @since New in 1.6.
> + * @since New in 1.7.
> Â */
> Â svn_error_t *
> Â svn_wc__get_tree_conflict(svn_wc_conflict_description_t **tree_conflict,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â const char *victim_path,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool);
> + Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_context_t *wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â const char *victim_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool);
>
> Â /** Record the tree conflict described by @a conflict in the WC.
> Â * @a adm_access must be a write-access baton for the parent directory of
>
> Modified: trunk/subversion/libsvn_client/commit_util.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/commit_util.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_client/commit_util.c     Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/libsvn_client/commit_util.c     Wed Jul 15 13:16:30 2009     (r38426)
> @@ -943,6 +943,7 @@ svn_client__harvest_committables(apr_has
> Â Â Â svn_wc_adm_access_t *adm_access;
> Â Â Â const svn_wc_entry_t *entry;
> Â Â Â const char *target;
> + Â Â Â const char *target_abspath;
> Â Â Â svn_error_t *err;
>
> Â Â Â svn_pool_clear(subpool);
> @@ -957,6 +958,8 @@ svn_client__harvest_committables(apr_has
> Â Â Â else
> Â Â Â Â target = svn_wc_adm_access_path(parent_adm);
>
> + Â Â Â SVN_ERR(svn_dirent_get_absolute(&target_abspath, target, subpool));
> +
> Â Â Â /* No entry? Â This TARGET isn't even under version control! */
> Â Â Â SVN_ERR(svn_wc_adm_probe_retrieve(&adm_access, parent_adm,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â target, subpool));
> @@ -969,7 +972,8 @@ svn_client__harvest_committables(apr_has
> Â Â Â if (err && (err->apr_err == SVN_ERR_ENTRY_NOT_FOUND))
> Â Â Â Â {
> Â Â Â Â Â svn_wc_conflict_description_t *conflict = NULL;
> - Â Â Â Â Â svn_wc__get_tree_conflict(&conflict, target, adm_access, pool);
> + Â Â Â Â Â svn_wc__get_tree_conflict(&conflict, ctx->wc_ctx, target_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, subpool);
> Â Â Â Â Â if (conflict != NULL)
> Â Â Â Â Â Â {
> Â Â Â Â Â Â Â svn_error_clear(err);
>
> Modified: trunk/subversion/libsvn_client/info.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/info.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_client/info.c    Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/libsvn_client/info.c    Wed Jul 15 13:16:30 2009     (r38426)
> @@ -258,6 +258,7 @@ struct found_entry_baton
> Â apr_hash_t *changelist_hash;
> Â svn_info_receiver_t receiver;
> Â void *receiver_baton;
> + Â svn_wc_context_t *wc_ctx;
> Â svn_wc_adm_access_t *adm_access; Â /* adm access baton for root of walk */
> Â };
>
> @@ -269,6 +270,7 @@ info_found_entry_callback(const char *pa
> Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> Â {
> Â struct found_entry_baton *fe_baton = walk_baton;
> + Â const char *local_abspath;
>
> Â /* We're going to receive dirents twice; Â we want to ignore the
> Â Â Â first one (where it's a child of a parent dir), and only print
> @@ -277,17 +279,14 @@ info_found_entry_callback(const char *pa
> Â Â Â && (strcmp(entry->name, SVN_WC_ENTRY_THIS_DIR)))
> Â Â return SVN_NO_ERROR;
>
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> Â if (SVN_WC__CL_MATCH(fe_baton->changelist_hash, entry))
> Â Â {
> Â Â Â svn_info_t *info;
> - Â Â Â svn_wc_adm_access_t *adm_access;
>
> Â Â Â SVN_ERR(build_info_from_entry(&info, entry, path, pool));
> - Â Â Â SVN_ERR(svn_wc_adm_probe_try3(&adm_access, fe_baton->adm_access, path,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â FALSE /* read-only */, 0 /* levels */,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â NULL, NULL, pool));
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict(&info->tree_conflict, path, adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict(&info->tree_conflict, fe_baton->wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â local_abspath, pool, pool));
> Â Â Â SVN_ERR(fe_baton->receiver(fe_baton->receiver_baton, path, info, pool));
> Â Â }
> Â return SVN_NO_ERROR;
> @@ -309,14 +308,12 @@ info_error_handler(const char *path,
> Â if (err && (err->apr_err == SVN_ERR_UNVERSIONED_RESOURCE))
> Â Â {
> Â Â Â struct found_entry_baton *fe_baton = walk_baton;
> - Â Â Â svn_wc_adm_access_t *adm_access;
> Â Â Â svn_wc_conflict_description_t *tree_conflict;
> + Â Â Â const char *local_abspath;
>
> - Â Â Â SVN_ERR(svn_wc_adm_probe_try3(&adm_access, fe_baton->adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_dirname(path, pool),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â FALSE, 0, NULL, NULL, pool));
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, path, adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> + Â Â Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, fe_baton->wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â local_abspath, pool, pool));
>
> Â Â Â if (tree_conflict)
> Â Â Â Â {
> @@ -367,6 +364,7 @@ crawl_entries(const char *wcpath,
> Â fe_baton.receiver = receiver;
> Â fe_baton.receiver_baton = receiver_baton;
> Â fe_baton.adm_access = adm_access;
> + Â fe_baton.wc_ctx = ctx->wc_ctx;
> Â return svn_wc_walk_entries3(wcpath, adm_access,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &entry_walk_callbacks, &fe_baton,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â depth, FALSE, ctx->cancel_func,
>
> Modified: trunk/subversion/libsvn_client/merge.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/merge.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_client/merge.c    Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/libsvn_client/merge.c    Wed Jul 15 13:16:30 2009     (r38426)
> @@ -526,6 +526,7 @@ tree_conflict(merge_cmd_baton_t *merge_b
> Â {
> Â svn_wc_conflict_description_t *conflict;
> Â svn_wc_conflict_description_t *existing_conflict;
> + Â const char *conflict_abspath;
>
> Â if (merge_b->record_only || merge_b->dry_run)
> Â Â return SVN_NO_ERROR;
> @@ -534,8 +535,11 @@ tree_conflict(merge_cmd_baton_t *merge_b
> Â SVN_ERR(make_tree_conflict(&conflict, merge_b, adm_access, victim_path,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â node_kind, action, reason));
>
> - Â SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict, conflict->path,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, merge_b->pool));
> + Â SVN_ERR(svn_dirent_get_absolute(&conflict_abspath, conflict->path,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â merge_b->pool));
> + Â SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict, merge_b->ctx->wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â conflict_abspath, merge_b->pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â merge_b->pool));
>
> Â if (existing_conflict != NULL)
> Â Â /* Re-adding an existing tree conflict victim is an error. */
> @@ -559,6 +563,7 @@ tree_conflict_on_add(merge_cmd_baton_t *
> Â {
> Â svn_wc_conflict_description_t *existing_conflict;
> Â svn_wc_conflict_description_t *conflict;
> + Â const char *conflict_abspath;
>
> Â if (merge_b->record_only || merge_b->dry_run)
> Â Â return SVN_NO_ERROR;
> @@ -568,8 +573,11 @@ tree_conflict_on_add(merge_cmd_baton_t *
> Â SVN_ERR(make_tree_conflict(&conflict, merge_b, adm_access, victim_path,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â node_kind, action, reason));
>
> - Â SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict, conflict->path,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, merge_b->pool));
> + Â SVN_ERR(svn_dirent_get_absolute(&conflict_abspath, conflict->path,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â merge_b->pool));
> + Â SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict, merge_b->ctx->wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â conflict_abspath, merge_b->pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â merge_b->pool));
>
> Â if (existing_conflict != NULL)
> Â Â {
>
> Modified: trunk/subversion/libsvn_wc/adm_ops.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/adm_ops.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_wc/adm_ops.c     Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/libsvn_wc/adm_ops.c     Wed Jul 15 13:16:30 2009     (r38426)
> @@ -2219,6 +2219,9 @@ revert_internal(svn_wc__db_t *db,
> Â const svn_wc_entry_t *entry;
> Â svn_wc_adm_access_t *dir_access;
> Â svn_wc_conflict_description_t *tree_conflict;
> + Â const char *local_abspath;
> +
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
>
> Â /* Check cancellation here, so recursive calls get checked early. */
> Â if (cancel_func)
> @@ -2230,7 +2233,8 @@ revert_internal(svn_wc__db_t *db,
> Â /* Safeguard 1: the item must be versioned for any reversion to make sense,
> Â Â Â except that a tree conflict can exist on an unversioned item. */
> Â SVN_ERR(svn_wc_entry(&entry, path, dir_access, FALSE, pool));
> - Â SVN_ERR(svn_wc__get_tree_conflict2(&tree_conflict, path, db, pool, pool));
> + Â SVN_ERR(svn_wc__get_tree_conflict2(&tree_conflict, local_abspath, db, pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> Â if (entry == NULL && tree_conflict == NULL)
> Â Â return svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â _("Cannot revert unversioned item '%s'"), path);
> @@ -2282,7 +2286,8 @@ revert_internal(svn_wc__db_t *db,
>
> Â Â Â /* Clear any tree conflict on the path, even if it is not a versioned
> Â Â Â Â Â resource. */
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, path, db, pool, pool));
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, local_abspath, db, pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> Â Â Â if (conflict)
> Â Â Â Â {
> Â Â Â Â Â SVN_ERR(svn_wc__del_tree_conflict(path, parent_access, pool));
> @@ -2938,6 +2943,9 @@ resolve_found_entry_callback(const char
> Â struct resolve_callback_baton *baton = walk_baton;
> Â svn_boolean_t resolved = FALSE;
> Â svn_boolean_t wc_root = FALSE;
> + Â const char *local_abspath;
> +
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
>
> Â /* We're going to receive dirents twice; Â we want to ignore the
> Â Â Â first one (where it's a child of a parent dir), and only process
> @@ -2988,7 +2996,7 @@ resolve_found_entry_callback(const char
> Â Â Â SVN_ERR(svn_wc_adm_probe_retrieve(&parent_adm_access, baton->adm_access,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â conflict_dir, pool));
>
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, path, baton->db,
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, local_abspath, baton->db,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool));
> Â Â Â if (conflict)
> Â Â Â Â {
>
> Modified: trunk/subversion/libsvn_wc/entries.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/entries.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_wc/entries.c     Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/libsvn_wc/entries.c     Wed Jul 15 13:16:30 2009     (r38426)
> @@ -3561,6 +3561,9 @@ visit_tc_too_error_handler(const char *p
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> Â {
> Â struct visit_tc_too_baton_t *baton = walk_baton;
> + Â const char *local_abspath;
> +
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
>
> Â /* If this is an unversioned tree conflict victim, call the "found entry"
> Â Â * callback. This can occur on the root node of the walk; we do not expect
> @@ -3570,7 +3573,7 @@ visit_tc_too_error_handler(const char *p
> Â Â Â svn_wc_conflict_description_t *conflict;
>
> Â Â Â /* See if there is any tree conflict on this path. */
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, path, baton->db,
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, local_abspath, baton->db,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool));
>
> Â Â Â /* If so, don't regard it as an error but call the "found entry"
> @@ -3608,10 +3611,13 @@ svn_wc__walk_entries_and_tc(const char *
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> Â {
> Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> + Â const char *local_abspath;
> Â svn_error_t *err;
> Â svn_wc_adm_access_t *path_adm_access;
> Â const svn_wc_entry_t *entry;
>
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> +
> Â /* Is 'path' versioned? Set path_adm_access accordingly. */
> Â /* First: Get item's adm access (meaning parent's if it's a file). */
> Â err = svn_wc_adm_probe_retrieve(&path_adm_access, adm_access, path, pool);
> @@ -3658,7 +3664,8 @@ svn_wc__walk_entries_and_tc(const char *
> Â Â Â Â * call the "found entry" callback with a null "entry" parameter. */
> Â Â Â svn_wc_conflict_description_t *conflict;
>
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, path, db, pool, pool));
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, local_abspath, db, pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> Â Â Â if (conflict)
> Â Â Â Â SVN_ERR(walk_callbacks->found_entry(path, NULL, walk_baton, pool));
> Â Â }
>
> Modified: trunk/subversion/libsvn_wc/questions.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/questions.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_wc/questions.c    Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/libsvn_wc/questions.c    Wed Jul 15 13:16:30 2009     (r38426)
> @@ -47,6 +47,7 @@
> Â #include "translate.h"
> Â #include "wc_db.h"
> Â #include "lock.h"
> +#include "tree_conflicts.h"
>
> Â #include "svn_private_config.h"
> Â #include "private/svn_wc_private.h"
> @@ -405,7 +406,10 @@ svn_wc_conflicted_p2(svn_boolean_t *text
> Â svn_node_kind_t kind;
> Â const svn_wc_entry_t *entry;
> Â const char* dir_path = svn_dirent_dirname(path, pool);
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> + Â const char *local_abspath;
>
> + Â SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
> Â SVN_ERR(svn_wc_entry(&entry, path, adm_access, TRUE, pool));
>
> Â if (text_conflicted_p)
> @@ -468,7 +472,8 @@ svn_wc_conflicted_p2(svn_boolean_t *text
> Â Â Â svn_wc_conflict_description_t *conflict;
>
> Â Â Â SVN_ERR_ASSERT(adm_access != NULL);
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict(&conflict, path, adm_access, pool));
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, local_abspath, db, pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> Â Â Â *tree_conflicted_p = (conflict != NULL);
> Â Â }
>
>
> Modified: trunk/subversion/libsvn_wc/status.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/status.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_wc/status.c Wed Jul 15 03:48:37 2009 Â Â Â Â (r38425)
> +++ trunk/subversion/libsvn_wc/status.c Wed Jul 15 13:16:30 2009 Â Â Â Â (r38426)
> @@ -314,7 +314,8 @@ assemble_status(svn_wc_status2_t **statu
> Â /* Find out whether the path is a tree conflict victim.
> Â Â * This function will set tree_conflict to NULL if the path
> Â Â * is not a victim. */
> - Â SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, path, adm_access, pool));
> + Â SVN_ERR(svn_wc__get_tree_conflict2(&tree_conflict, local_abspath, db, pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
>
> Â if (! entry)
> Â Â {
> @@ -867,6 +868,7 @@ get_dir_status(struct edit_baton *eb,
> Â apr_hash_index_t *hi;
> Â const svn_wc_entry_t *dir_entry;
> Â const char *path = svn_wc_adm_access_path(adm_access);
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> Â const char *local_abspath;
> Â apr_hash_t *dirents;
> Â apr_array_header_t *patterns = NULL;
> @@ -980,9 +982,13 @@ get_dir_status(struct edit_baton *eb,
> Â Â Â else
> Â Â Â Â {
> Â Â Â Â Â svn_wc_conflict_description_t *tree_conflict;
> - Â Â Â Â Â SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_join(path, entry, subpool),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, subpool));
> + Â Â Â Â Â const char *abspath;
> +
> + Â Â Â Â Â SVN_ERR(svn_dirent_get_absolute(&abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_join(path, entry, subpool),
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â subpool));
> + Â Â Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&tree_conflict, abspath, db,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â subpool, subpool));
> Â Â Â Â Â if (tree_conflict)
> Â Â Â Â Â Â {
> Â Â Â Â Â Â Â /* A tree conflict will block commit, so we'll pass TRUE
>
> Modified: trunk/subversion/libsvn_wc/tree_conflicts.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/tree_conflicts.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_wc/tree_conflicts.c Wed Jul 15 03:48:37 2009 Â Â Â Â (r38425)
> +++ trunk/subversion/libsvn_wc/tree_conflicts.c Wed Jul 15 13:16:30 2009 Â Â Â Â (r38426)
> @@ -30,6 +30,7 @@
> Â #include "log.h"
> Â #include "entries.h"
> Â #include "lock.h"
> +#include "wc.h"
>
> Â #include "private/svn_skel.h"
> Â #include "private/svn_wc_private.h"
> @@ -520,10 +521,14 @@ svn_wc__add_tree_conflict(const svn_wc_c
> Â {
> Â svn_wc_conflict_description_t *existing_conflict;
> Â svn_stringbuf_t *log_accum = NULL;
> + Â svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
> + Â const char *conflict_abspath;
> +
> + Â SVN_ERR(svn_dirent_get_absolute(&conflict_abspath, conflict->path, pool));
>
> Â /* Re-adding an existing tree conflict victim is an error. */
> - Â SVN_ERR(svn_wc__get_tree_conflict(&existing_conflict, conflict->path,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â adm_access, pool));
> + Â SVN_ERR(svn_wc__get_tree_conflict2(&existing_conflict, conflict_abspath, db,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool, pool));
> Â if (existing_conflict != NULL)
> Â Â return svn_error_create(SVN_ERR_WC_CORRUPT, NULL,
> Â Â Â Â Â Â Â Â Â Â Â Â Â _("Attempt to add tree conflict that already exists"));
> @@ -620,27 +625,29 @@ svn_wc__loggy_del_tree_conflict(svn_stri
>
> Â svn_error_t *
> Â svn_wc__get_tree_conflict(svn_wc_conflict_description_t **tree_conflict,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â const char *victim_path,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_adm_access_t *adm_access,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *pool)
> + Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc_context_t *wc_ctx,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â const char *victim_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool)
> Â {
> + Â SVN_ERR_ASSERT(svn_dirent_is_absolute(victim_abspath));
> +
> Â return svn_error_return(svn_wc__get_tree_conflict2(
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â tree_conflict,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â victim_path,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc__adm_get_db(adm_access),
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â pool));
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â victim_abspath,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â wc_ctx->db,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool));
> Â }
>
>
> Â svn_error_t *
> Â svn_wc__get_tree_conflict2(svn_wc_conflict_description_t **tree_conflict,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â const char *victim_path,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â const char *victim_abspath,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_wc__db_t *db,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *result_pool,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â apr_pool_t *scratch_pool)
> Â {
> - Â const char *victim_abspath;
> Â const char *parent_abspath;
> Â const char *victim_name;
> Â svn_error_t *err;
> @@ -648,7 +655,8 @@ svn_wc__get_tree_conflict2(svn_wc_confli
> Â const svn_wc_entry_t *entry;
> Â int i;
>
> - Â SVN_ERR(svn_dirent_get_absolute(&victim_abspath, victim_path, scratch_pool));
> + Â SVN_ERR_ASSERT(svn_dirent_is_absolute(victim_abspath));
> +
> Â svn_dirent_split(victim_abspath, &parent_abspath, &victim_name,
> Â Â Â Â Â Â Â Â Â Â scratch_pool);
> Â err = svn_wc__get_entry(&entry, db, parent_abspath, FALSE,
> @@ -665,7 +673,7 @@ svn_wc__get_tree_conflict2(svn_wc_confli
> Â Â }
>
> Â SVN_ERR(svn_wc__read_tree_conflicts(&conflicts, entry->tree_conflict_data,
> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_dirname(victim_path,
> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â svn_dirent_dirname(victim_abspath,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â scratch_pool),
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â result_pool));
>
>
> Modified: trunk/subversion/libsvn_wc/update_editor.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/update_editor.c?pathrev=38426&r1=38425&r2=38426
> ==============================================================================
> --- trunk/subversion/libsvn_wc/update_editor.c  Wed Jul 15 03:48:37 2009     (r38425)
> +++ trunk/subversion/libsvn_wc/update_editor.c  Wed Jul 15 13:16:30 2009     (r38426)
> @@ -1806,7 +1806,8 @@ already_in_a_tree_conflict(const char **
> Â Â Â ancestor = APR_ARRAY_IDX(ancestors, i, const char *);
>
> Â Â Â svn_pool_clear(iterpool);
> - Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, ancestor, db, pool,
> + Â Â Â SVN_ERR(svn_dirent_get_absolute(&ancestor_abspath, ancestor, iterpool));
> + Â Â Â SVN_ERR(svn_wc__get_tree_conflict2(&conflict, ancestor_abspath, db, pool,
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â iterpool));
> Â Â Â if (conflict != NULL)
> Â Â Â Â {
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2371578
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371582
Received on 2009-07-15 22:34:07 CEST