[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1354973 - in /subversion/trunk/subversion/libsvn_wc: conflicts.c conflicts.h props.c

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 28 Jun 2012 12:57:14 -0400

On Thu, Jun 28, 2012 at 8:17 AM, <rhuijben_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/conflicts.h Thu Jun 28 12:17:06 2012
>...
> +/* Return a boolean in *COMPLETE indicating whether CONFLICT_SKEL contains
> +   everything needed for installing in the working copy database.
> +
> +   This typically checks if CONFLICT_SKEL contains at least one conflict
> +   and an operation.
> +
> +   Perform temporary allocations in SCRATCH_POOL
> +   */
> +svn_error_t *
> +svn_wc__conflict_skel_is_complete(svn_boolean_t *complete,
> +                                  svn_skel_t *conflict_skel,
> +                                  apr_pool_t *scratch_pool);

const

Is that pool *really* necessary? I'm going to say "no", so drop it and
since this is a private API, we can easily add it if/when necessary.

> +
>
>  /* Set 'update' as the conflicting operation in CONFLICT_SKEL.
>    Allocate data stored in the skel in RESULT_POOL.
>
> -   BASE_REVISION is the revision the node was at before the update.
> -   TARGET_REVISION is the revision being updated to.
> +   ORIGINAL specifies the BASE node before updating.
>
> -   Do temporary allocations in SCRATCH_POOL. */
> +   It is an error to set another operation to a conflict skel that
> +   already has an operation.
> +
> +   Do temporary allocations in SCRATCH_POOL. The new skel data is
> +   completely stored in RESULT-POOL. */
>  svn_error_t *
>  svn_wc__conflict_skel_set_op_update(svn_skel_t *conflict_skel,
> -                                    svn_revnum_t base_revision,
> -                                    svn_revnum_t target_revision,
> +                                    svn_wc_conflict_version_t *original,
>                                     apr_pool_t *result_pool,
>                                     apr_pool_t *scratch_pool);

const

Sense a pattern, yet? :-P

>
> @@ -74,91 +95,164 @@ svn_wc__conflict_skel_set_op_update(svn_
>  /* Set 'switch' as the conflicting operation in CONFLICT_SKEL.
>    Allocate data stored in the skel in RESULT_POOL.
>
> -   BASE_REVISION is the revision the node was at before the switch.
> -   TARGET_REVISION is the revision being switched to.
> -   REPOS_RELPATH is the path being switched to, relative to the
> -   repository root.
> +   ORIGINAL specifies the BASE node before switching.
> +
> +   It is an error to set another operation to a conflict skel that
> +   already has an operation.
>
>    Do temporary allocations in SCRATCH_POOL. */
>  svn_error_t *
>  svn_wc__conflict_skel_set_op_switch(svn_skel_t *conflict_skel,
> -                                    svn_revnum_t base_revision,
> -                                    svn_revnum_t target_revision,
> -                                    const char *repos_relpath,
> +                                    svn_wc_conflict_version_t *original,
> +                                    apr_pool_t *result_pool,
>                                     apr_pool_t *scratch_pool);

const

>
>
>  /* Set 'merge' as conflicting operation in CONFLICT_SKEL.
>    Allocate data stored in the skel in RESULT_POOL.
>
> -   REPOS_UUID is the UUID of the repository accessed via REPOS_ROOT_URL.
> -
> -   LEFT_REPOS_RELPATH and RIGHT_REPOS_RELPATH paths to the merge-left
> -   and merge-right merge sources, relative to REPOS_URL
> +   LEFT and RIGHT paths are the merge-left and merge-right merge
> +   sources of the merge.
>
> -   LEFT_REVISION is the merge-left revision.
> -   RIGHT_REVISION is the merge-right revision.
> +   It is an error to set another operation to a conflict skel that
> +   already has an operation.
>
>    Do temporary allocations in SCRATCH_POOL. */
>  svn_error_t *
>  svn_wc__conflict_skel_set_op_merge(svn_skel_t *conflict_skel,
> -                                   const char *repos_uuid,
> -                                   const char *repos_root_url,
> -                                   svn_revnum_t left_revision,
> -                                   const char *left_repos_relpath,
> -                                   svn_revnum_t right_revision,
> -                                   const char *right_repos_relpath,
> +                                   svn_wc_conflict_version_t *left,
> +                                   svn_wc_conflict_version_t *right,
>                                    apr_pool_t *result_pool,
>                                    apr_pool_t *scratch_pool);

double-const! :-)

>...
> +   It is an error to add another text conflict to a conflict skel that
> +   already contains a text conflict.
>
>    Do temporary allocations in SCRATCH_POOL.
>  */
>  svn_error_t *
> -svn_wc__conflict_skel_add_text_conflict(
> -  svn_skel_t *conflict_skel,
> -  const svn_checksum_t *original_checksum,
> -  const svn_checksum_t *mine_checksum,
> -  const svn_checksum_t *incoming_checksum,
> -  apr_pool_t *result_pool,
> -  apr_pool_t *scratch_pool);
> +svn_wc__conflict_skel_add_prop_conflict(svn_skel_t *conflict_skel,

What's that part in the docstring about adding a text conflict? This
is adding a prop conflict.

> +                                        svn_wc__db_t *db,
> +                                        const char *wri_abspath,
> +                                        const char *marker_abspath,
> +                                        apr_hash_t *original_props,
> +                                        apr_hash_t *mine_props,
> +                                        apr_hash_t *their_props,
> +                                        apr_hash_t *conflicted_prop_names,
> +                                        apr_pool_t *result_pool,
> +                                        apr_pool_t *scratch_pool);

As I mentioned in conflict-storage-2.0, there are four sets of
properties. Do we just never generating the incoming-base properties?

>...
> + * Output arguments can be NULL if the value is not necessary
> + * Allocate the result in RESULT_POOL. Perform temporary allocations in
> + * SCRATCH_POOL.
> + */
> +svn_error_t *
> +svn_wc__conflict_read_prop_conflict(const char **marker_abspath,
> +                                    apr_hash_t **original_props,
> +                                    apr_hash_t **mine_props,
> +                                    apr_hash_t **their_props,
> +                                    apr_hash_t **conflicted_prop_names,
> +                                    svn_wc__db_t *db,
> +                                    const char *wri_abspath,
> +                                    svn_skel_t *conflict_skel,
> +                                    apr_pool_t *result_pool,
> +                                    apr_pool_t *scratch_pool);

const on CONFLICT_SKEL.

> +
> +/* (Temporary) helper to create the (intermediate) data necessary for the
> +   property marker workqueue data from the conflict skel */
> +svn_error_t *
> +svn_wc__conflict_create_property_marker_skel(svn_skel_t **marker_skel,
> +                                             svn_skel_t *conflict_skel,
> +                                             apr_pool_t *result_pool,
> +                                             apr_pool_t *scratch_pool);

const

>...
> +svn_wc__conflict_invoke_resolver(svn_wc__db_t *db,
> +                                 const char *local_abspath,
> +                                 svn_skel_t *conflict_skel,
> +                                 svn_wc_conflict_resolver_func2_t *resolver_func,
> +                                 void *resolver_baton,
> +                                 apr_pool_t *scratch_pool);

const

>...

Cheers,
-g
Received on 2012-06-28 18:57:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.