On Tue, Aug 18, 2009 at 23:08, Paul T. Burba<pburba_at_collab.net> wrote:
>...
> +++ trunk/subversion/libsvn_client/switch.c   Tue Aug 18 16:08:45 2009     (r38830)
> @@ -196,20 +196,18 @@ svn_client__switch_internal(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(&target_abspath, target, pool));
Thus: this is not going to work correctly.
I'd suggest:
target_abspath = svn_dirent_join(svn_wc__adm_access_abspath(...), target, ...)
> + Â Â Â SVN_ERR(svn_wc__node_get_kind(&target_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
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386551
Received on 2009-08-23 20:39:23 CEST