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>
]]]
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_opt__arg_canonicalize_url(true_target, *true_target,
+ pool);
+ else
+ svn_opt__arg_canonicalize_path(true_target, *true_target,
+ pool);
+
return SVN_NO_ERROR;
}
Received on 2010-11-04 10:32:22 CET