Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: svn commit: r38830 - in trunk/subversion: include/private libsvn_client libsvn_wc

subversion
Discussion topic

Back to topic list

Re: svn commit: r38830 - in trunk/subversion: include/private libsvn_client libsvn_wc

Author gstein
Full name Greg Stein
Date 2009-08-23 11:39:00 PDT
Message On Tue, Aug 18, 2009 at 23:08, Paul T. Burba<pburba at collab dot net> wrote:
>...
> +++ trunk/subversion/lib​svn_client/switch.c     Tue Aug 18 16:08:45 2009        (r38830)
> @@ -196,20 +196,18 @@ svn_client__switch_i​nternal(svn_revnum_t​
>   /* We may need to crop the tree if the depth is sticky */
>   if (depth_is_sticky && depth < svn_depth_infinity)
>     {
> -      const svn_wc_entry_t *target_entry;
> +      const char *target_abspath;
> +      svn_node_kind_t target_kind;
>
> -      SVN_ERR(svn_wc_entry(
> -          &target_entry,
> -          svn_dirent_join(svn​_wc_adm_access_path(​adm_access), target, pool),
> -          adm_access, TRUE, pool));

Target is relative to the access baton's directory.

> -
> -      if (target_entry && target_entry->kind == svn_node_dir)
> -        {
> -          SVN_ERR(svn_wc_crop​_tree(adm_access, target, depth,
> -                                   ctx->notify_func2, ctx->notify_baton2,
> -                                   ctx->cancel_func, ctx->cancel_baton,
> -                                   pool));
> -        }
> +      SVN_ERR(svn_dirent_​get_absolute(&ta​rget_abspath, target, pool));

Thus: this is not going to work correctly.

I'd suggest:

  target_abspath = svn_dirent_join(svn_​wc__adm_access_abspa​th(...), target, ...)

> +      SVN_ERR(svn_wc__nod​e_get_kind(&targ​et_kind, ctx->wc_ctx,
> +                                    target_abspath, TRUE, pool));
> +
> +      if (target_kind == svn_node_dir)
> +        SVN_ERR(svn_wc_crop​_tree(adm_access, target, depth,
> +                                 ctx->notify_func2, ctx->notify_baton2,
> +                                 ctx->cancel_func, ctx->cancel_baton,
> +                                 pool));
>     }

>...

Cheers,
-g

« Previous message in topic | 1 of 2 | Next message in topic »

Messages

Show all messages in topic

Re: svn commit: r38830 - in trunk/subversion: include/private libsvn_client libsvn_wc gstein Greg Stein 2009-08-23 11:39:00 PDT
     Re: svn commit: r38830 - in trunk/subversion: include/private libsvn_client libsvn_wc Paul Burba <ptburba at gmail dot com> Paul Burba <ptburba at gmail dot com> 2009-08-24 08:12:58 PDT
Messages per page: