Author: rinrab
Date: Mon Jun 9 12:17:12 2025
New Revision: 1926277
URL: http://svn.apache.org/viewvc?rev=1926277&view=rev
Log:
Use svn_opt_args_to_target_array3() instead of svn_opt__args_to_target_array()
and drop it.
* subversion/include/private/svn_opt_private.h
(svn_opt__args_to_target_array): Remove.
(svn_opt__process_target_array): Use description of svn_opt__args_to_target_array().
* subversion/libsvn_client/cmdline.c
(svn_client_args_to_target_array2): Adjust description.
* subversion/libsvn_subr/opt.c
(svn_opt__args_to_target_array): Remove.
* subversion/libsvn_wc/adm_files.c
(svn_wc_set_adm_dir): Adjust comment to reference new function.
* subversion/svnadmin/svnadmin.c
* subversion/svnsync/svnsync.c
(...): Use the public func and adjust comments.
Modified:
subversion/trunk/subversion/include/private/svn_opt_private.h
subversion/trunk/subversion/libsvn_client/cmdline.c
subversion/trunk/subversion/libsvn_subr/opt.c
subversion/trunk/subversion/libsvn_wc/adm_files.c
subversion/trunk/subversion/svnadmin/svnadmin.c
subversion/trunk/subversion/svnsync/svnsync.c
Modified: subversion/trunk/subversion/include/private/svn_opt_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_opt_private.h?rev=1926277&r1=1926276&r2=1926277&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_opt_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_opt_private.h Mon Jun 9 12:17:12 2025
@@ -90,16 +90,13 @@ svn_opt__arg_canonicalize_path(const cha
apr_pool_t *pool);
/*
- * Pull remaining target arguments from OS into *TARGETS_P,
- * converting them to UTF-8, followed by targets from KNOWN_TARGETS
- * (which might come from, for example, the "--targets" command line
- * option), which are already in UTF-8.
+ * Processes arguments from from @a utf8_input_targets into @a targets_p.
*
* On each URL target, do some IRI-to-URI encoding and some
* auto-escaping. On each local path, canonicalize case and path
* separators.
*
- * Allocate *TARGETS_P and its elements in POOL.
+ * Allocate @a targets_p and its elements in @a pool.
*
* If a path has the same name as a Subversion working copy
* administrative directory, return SVN_ERR_RESERVED_FILENAME_SPECIFIED;
@@ -110,12 +107,6 @@ svn_opt__arg_canonicalize_path(const cha
* the operation before returning the error(s).
*/
svn_error_t *
-svn_opt__args_to_target_array(apr_array_header_t **targets_p,
- apr_getopt_t *os,
- const apr_array_header_t *known_targets,
- apr_pool_t *pool);
-
-svn_error_t *
svn_opt__process_target_array(apr_array_header_t **targets_p,
apr_array_header_t *utf8_input_targets,
const apr_array_header_t *known_targets,
Modified: subversion/trunk/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cmdline.c?rev=1926277&r1=1926276&r2=1926277&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cmdline.c (original)
+++ subversion/trunk/subversion/libsvn_client/cmdline.c Mon Jun 9 12:17:12 2025
@@ -110,7 +110,7 @@ check_root_url_of_target(const char **ro
return SVN_NO_ERROR;
}
-/* Note: This is substantially copied from svn_opt__args_to_target_array() in
+/* Note: This is substantially copied from svn_opt__process_target_array() in
* order to move to libsvn_client while maintaining backward compatibility. */
svn_error_t *
svn_client_args_to_target_array2(apr_array_header_t **targets_p,
Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1926277&r1=1926276&r2=1926277&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Mon Jun 9 12:17:12 2025
@@ -218,30 +218,6 @@ svn_opt_parse_path(svn_opt_revision_t *r
return SVN_NO_ERROR;
}
-svn_error_t *
-svn_opt__args_to_target_array(apr_array_header_t **targets_p,
- apr_getopt_t *os,
- const apr_array_header_t *known_targets,
- apr_pool_t *pool)
-{
- apr_array_header_t *utf8_input_targets =
- apr_array_make(pool, os->argc - os->ind, sizeof(const char *));
-
- for (; os->ind < os->argc; os->ind++)
- {
- /* The apr_getopt targets are still in native encoding. */
- const char *raw_target = os->argv[os->ind];
- const char *utf8_target;
-
- SVN_ERR(svn_utf_cstring_to_utf8(&utf8_target, raw_target, pool));
-
- APR_ARRAY_PUSH(utf8_input_targets, const char *) = utf8_target;
- }
-
- return svn_error_trace(svn_opt__process_target_array(
- targets_p, utf8_input_targets, known_targets, pool));
-}
-
/* Note: This is substantially copied into svn_client_args_to_target_array() in
* order to move to libsvn_client while maintaining backward compatibility. */
svn_error_t *
Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.c?rev=1926277&r1=1926276&r2=1926277&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.c Mon Jun 9 12:17:12 2025
@@ -83,7 +83,7 @@ svn_wc_set_adm_dir(const char *name, apr
FIXME:
An identical list is used in
- libsvn_subr/opt.c:svn_opt__args_to_target_array(),
+ libsvn_subr/opt.c:svn_opt__process_target_array(),
but that function can't use this list, because that use would
create a circular dependency between libsvn_wc and libsvn_subr.
Make sure changes to the lists are always synchronized! */
Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1926277&r1=1926276&r2=1926277&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Mon Jun 9 12:17:12 2025
@@ -2595,7 +2595,7 @@ subcommand_lslocks(apr_getopt_t *os, voi
apr_hash_index_t *hi;
apr_pool_t *iterpool = svn_pool_create(pool);
- SVN_ERR(svn_opt__args_to_target_array(&targets, os,
+ SVN_ERR(svn_opt_args_to_target_array3(&targets, os,
apr_array_make(pool, 0,
sizeof(const char *)),
pool));
Modified: subversion/trunk/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1926277&r1=1926276&r2=1926277&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/svnsync.c (original)
+++ subversion/trunk/subversion/svnsync/svnsync.c Mon Jun 9 12:17:12 2025
@@ -902,7 +902,7 @@ initialize_cmd(apr_getopt_t *os, void *b
apr_array_header_t *targets;
subcommand_baton_t *baton;
- SVN_ERR(svn_opt__args_to_target_array(&targets, os,
+ SVN_ERR(svn_opt_args_to_target_array3(&targets, os,
apr_array_make(pool, 0,
sizeof(const char *)),
pool));
@@ -1580,7 +1580,7 @@ synchronize_cmd(apr_getopt_t *os, void *
subcommand_baton_t *baton;
const char *to_url, *from_url;
- SVN_ERR(svn_opt__args_to_target_array(&targets, os,
+ SVN_ERR(svn_opt_args_to_target_array3(&targets, os,
apr_array_make(pool, 0,
sizeof(const char *)),
pool));
@@ -1785,7 +1785,7 @@ copy_revprops_cmd(apr_getopt_t *os, void
/* This is the old "... TO_URL REV[:REV2]" syntax.
Revisions come only from this argument. (We effectively
pop that last argument from the end of the argument list
- so svn_opt__args_to_target_array() can do its thang.) */
+ so svn_opt_args_to_target_array() can do its thang.) */
os->argc--;
if ((opt_baton->start_rev.kind != svn_opt_revision_unspecified)
@@ -1806,7 +1806,7 @@ copy_revprops_cmd(apr_getopt_t *os, void
SVN_ERR(resolve_revnums(&start_rev, &end_rev,
start_revision, end_revision));
- SVN_ERR(svn_opt__args_to_target_array(
+ SVN_ERR(svn_opt_args_to_target_array3(
&targets, os,
apr_array_make(pool, 1, sizeof(const char *)), pool));
if (targets->nelts != 1)
@@ -1823,7 +1823,7 @@ copy_revprops_cmd(apr_getopt_t *os, void
SVN_ERR(resolve_revnums(&start_rev, &end_rev,
opt_baton->start_rev, opt_baton->end_rev));
- SVN_ERR(svn_opt__args_to_target_array(
+ SVN_ERR(svn_opt_args_to_target_array3(
&targets, os,
apr_array_make(pool, 2, sizeof(const char *)), pool));
if (targets->nelts < 1)
@@ -1873,7 +1873,7 @@ info_cmd(apr_getopt_t *os, void *b, apr_
apr_hash_t *props;
svn_string_t *from_url, *from_uuid, *last_merged_rev;
- SVN_ERR(svn_opt__args_to_target_array(&targets, os,
+ SVN_ERR(svn_opt_args_to_target_array3(&targets, os,
apr_array_make(pool, 0,
sizeof(const char *)),
pool));
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.