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

Re: Canonicalize path/URL inside svn_opt__split_arg_at_peg_revision

From: Noorul Islam K M <noorul_at_collab.net>
Date: Sun, 07 Nov 2010 23:47:17 +0530

Noorul Islam K M <noorul_at_collab.net> writes:

> Noorul Islam K M <noorul_at_collab.net> writes:
>
>> Log
>>
>> [[[
>>
>> Since svn_opt__split_arg_at_peg_revision() is called from two major
>> wrappers svn_opt__args_to_target_array() and svn_opt_parse_path(), move
>> canonicalize code into svn_opt__split_arg_at_peg_revision().
>>
>> * subversion/libsvn_subr/opt.c
>> (svn_opt__split_arg_at_peg_revision): Canonicalize path/URL.
>> (svn_opt__args_to_target_array): No need to canonicalize path/URL as
>> the code is now in svn_opt__split_arg_at_peg_revision().
>>
>> Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
>>
>> ]]]
>>
>
> Forgot to wrap calls inside SVN_ERR(). Please ignore last
> patch. Attached is the updated one.
>
> Thanks and Regards
> Noorul
>
> Index: subversion/libsvn_subr/opt.c
> ===================================================================
> --- subversion/libsvn_subr/opt.c (revision 1030801)
> +++ subversion/libsvn_subr/opt.c (working copy)
> @@ -848,18 +848,10 @@
> utf8_target, pool));
>
> /* URLs and wc-paths get treated differently. */
> - if (svn_path_is_url(true_target))
> + if (! svn_path_is_url(true_target))
> {
> - SVN_ERR(svn_opt__arg_canonicalize_url(&true_target, true_target,
> - pool));
> - }
> - else /* not a url, so treat as a path */
> - {
> const char *base_name;
>
> - SVN_ERR(svn_opt__arg_canonicalize_path(&true_target, true_target,
> - pool));
> -
> /* If the target has the same name as a Subversion
> working copy administrative dir, skip it. */
> base_name = svn_dirent_basename(true_target, pool);
> @@ -976,6 +968,14 @@
> *peg_revision = "";
> }
>
> + /* Canonicalize path/URL. */
> + if (svn_path_is_url(*true_target))
> + SVN_ERR(svn_opt__arg_canonicalize_url(true_target, *true_target,
> + pool));
> + else
> + SVN_ERR(svn_opt__arg_canonicalize_path(true_target, *true_target,
> + pool));
> +
> return SVN_NO_ERROR;
> }
>

Please ignore this patch. Looks like it is complicated. Some of the
tests are failing because of this.

Thanks and Regards
Noorul
Received on 2010-11-07 19:18:23 CET

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.