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

Re: svn commit: r39733 - in trunk/subversion: include/private libsvn_client libsvn_wc tests/cmdline

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 1 Oct 2009 09:32:35 -0400

I'll also note that *conceptually* this patch should not be needed.
That the proper change is to the access baton code to restore its
previous API.

In fact, I'm going to suggest either fixing the baton code, or writing
an api-errata explaining the change in behavior.

Thanks,
-g

On Thu, Oct 1, 2009 at 08:44, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
> Author: rhuijben
> Date: Thu Oct  1 05:44:40 2009
> New Revision: 39733
>
> Log:
> Following up on r39729, fix the 'tree conflicts: tree missing, leaf del'
> test by adding a temporary api for checking on working copy obstructions.
>
> Note that this class of obstructions will be gone once we move to a
> central db.
>
> Also mark the remaining merge test failure XFail, until further
> investigation.
>
> * subversion/include/private/svn_wc_private.h
>  (svn_wc__temp_node_obstructed): New function.
>
> * subversion/libsvn_client/merge.c
>  (obstructed_or_missing): Check for working copy obstructions.
>
> * subversion/libsvn_wc/node.c
>  (svn_wc__temp_node_obstructed): New function.
>
> * subversion/tests/cmdline/merge_tests.py
>  (test_list): Mark merge_into_missing XFail.
>
> Modified:
>   trunk/subversion/include/private/svn_wc_private.h
>   trunk/subversion/libsvn_client/merge.c
>   trunk/subversion/libsvn_wc/node.c
>   trunk/subversion/tests/cmdline/merge_tests.py
>
> 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=39733&r1=39732&r2=39733
> ==============================================================================
> --- trunk/subversion/include/private/svn_wc_private.h   Thu Oct  1 05:19:26 2009        (r39732)
> +++ trunk/subversion/include/private/svn_wc_private.h   Thu Oct  1 05:44:40 2009        (r39733)
> @@ -426,6 +426,16 @@ svn_wc__node_walk_children(svn_wc_contex
>                            void *cancel_baton,
>                            apr_pool_t *scratch_pool);
>
> +/**
> + * Gets booleans indicating whether LOCAL_ABSPATH is obstructed.
> + */
> +svn_error_t *
> +svn_wc__temp_node_obstructed(svn_boolean_t *obstructed,
> +                             svn_wc_context_t *wc_ctx,
> +                             const char *local_abspath,
> +                             apr_pool_t *scratch_pool);
> +
> +
>  #ifdef __cplusplus
>  }
>  #endif /* __cplusplus */
>
> Modified: trunk/subversion/libsvn_client/merge.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/merge.c?pathrev=39733&r1=39732&r2=39733
> ==============================================================================
> --- trunk/subversion/libsvn_client/merge.c      Thu Oct  1 05:19:26 2009        (r39732)
> +++ trunk/subversion/libsvn_client/merge.c      Thu Oct  1 05:44:40 2009        (r39733)
> @@ -417,13 +417,14 @@ obstructed_or_missing(const char *path,
>   svn_error_t *err;
>   const svn_wc_entry_t *entry;
>   svn_node_kind_t kind_expected, kind_on_disk;
> +  svn_boolean_t obstructed;
>   const char *local_abspath;
>
>   err = svn_dirent_get_absolute(&local_abspath, path, pool);
>
>   if (!err)
>     err = svn_wc__maybe_get_entry(&entry, merge_b->ctx->wc_ctx, local_abspath,
> -                                  svn_node_unknown, TRUE, FALSE, pool, pool);
> +                                  svn_node_unknown, FALSE, FALSE, pool, pool);
>   if (err)
>     {
>       svn_error_clear(err);
> @@ -433,6 +434,19 @@ obstructed_or_missing(const char *path,
>   if (entry && entry->absent)
>     return svn_wc_notify_state_missing;
>
> +  /* svn_wc__maybe_get_entry ignores node kind errors, so check if we
> +     didn't get the parent stub */
> +  if (entry && entry->kind == svn_node_dir && *entry->name != '\0')
> +    return svn_wc_notify_state_missing; /* Only found parent entry */
> +
> +  err = svn_wc__temp_node_obstructed(&obstructed, merge_b->ctx->wc_ctx,
> +                                     local_abspath, pool);
> +
> +  if (err)
> +    svn_error_clear(err);
> +  else if (obstructed)
> +    return svn_wc_notify_state_obstructed;
> +
>   kind_expected = node_kind_working(path, merge_b, entry);
>   kind_on_disk = node_kind_on_disk(path, merge_b, pool);
>
>
> Modified: trunk/subversion/libsvn_wc/node.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/node.c?pathrev=39733&r1=39732&r2=39733
> ==============================================================================
> --- trunk/subversion/libsvn_wc/node.c   Thu Oct  1 05:19:26 2009        (r39732)
> +++ trunk/subversion/libsvn_wc/node.c   Thu Oct  1 05:44:40 2009        (r39733)
> @@ -433,3 +433,18 @@ svn_wc__node_walk_children(svn_wc_contex
>                                    walk_callback, walk_baton, walk_depth,
>                                    cancel_func, cancel_baton, scratch_pool));
>  }
> +
> +svn_error_t *
> +svn_wc__temp_node_obstructed(svn_boolean_t *obstructed,
> +                             svn_wc_context_t *wc_ctx,
> +                             const char *local_abspath,
> +                             apr_pool_t *scratch_pool)
> +{
> +  svn_boolean_t available;
> +
> +  SVN_ERR(svn_wc__adm_available(&available, NULL, obstructed,
> +                                wc_ctx->db, local_abspath, scratch_pool));
> +
> +  return SVN_NO_ERROR;
> +}
> +
>
> Modified: trunk/subversion/tests/cmdline/merge_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/merge_tests.py?pathrev=39733&r1=39732&r2=39733
> ==============================================================================
> --- trunk/subversion/tests/cmdline/merge_tests.py       Thu Oct  1 05:19:26 2009        (r39732)
> +++ trunk/subversion/tests/cmdline/merge_tests.py       Thu Oct  1 05:44:40 2009        (r39733)
> @@ -16427,8 +16427,8 @@ test_list = [ None,
>                          server_has_mergeinfo),
>               SkipUnless(merge_skips_obstructions,
>                          server_has_mergeinfo),
> -              SkipUnless(merge_into_missing,
> -                         server_has_mergeinfo),
> +              XFail(SkipUnless(merge_into_missing,
> +                               server_has_mergeinfo)),
>               SkipUnless(dry_run_adds_file_with_prop,
>                          server_has_mergeinfo),
>               merge_binary_with_common_ancestry,
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2402489
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402515
Received on 2009-10-01 15:32:51 CEST

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